[Pyme-help] Re: FTBFS: 'alloc2' undeclared
Status: Beta
Brought to you by:
belyi
From: Igor B. <be...@us...> - 2006-04-12 17:34:33
|
OK, I've looked at it and I'm sorry to say I don't think this is the right patch. It seems to me that the patch disables gpgme.i's "const char *" typemap definition by using SWIG's bug of not reporting invalid syntax but silently ignoring it to work around another SWIG bug of the typemap causing alloc2 and buf2 not to be declared while statements freeing them to be present. I'm still trying to find the right workaround for this. For now it seems SWIG 1.3.28 is not good version to use for pyme build. Thanks for finding this out! :-) Igor Arnaud Fontaine wrote: > Hello, > > This bug [0] is due to swig upgrade. Actually, pyme builds fine with > swig < 1.3.28. In swig 1.3.28, there is a new option, namely 'match', > for typemaps. > > I have attached the patch which fixes this bug. I have built and tested > pyme successfully using this patch. Could you please make an upgrade of > pyme for swig 1.3.28 ? Thanks a lot to Manuel Menal for his help for > tracking the bug. > > Regards, > Arnaud Fontaine > > [0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358648 > > > ------------------------------------------------------------------------ > > --- gpgme.i.old 2006-04-02 16:23:02.000000000 +0200 > +++ gpgme.i 2006-04-02 15:43:27.000000000 +0200 > @@ -23,7 +23,7 @@ > > // Allow use of None for strings. > > -%typemap(python,in) const char * { > +%typemap(match="in") const char * { > if ($input == Py_None) > $1 = NULL; > else if (PyString_Check($input)) > |