[C++-sig] Pybindgen/pygccxml integration

Gustavo Carneiro gjcarneiro at gmail.com
Wed Jun 24 00:51:56 CEST 2009


2009/6/23 Ben Fitzpatrick <bfitzpatrick at vtiinstruments.com>

> Gustavo Carneiro wrote:
>
>>
>>
>> 2009/6/23 Ben Fitzpatrick <bfitzpatrick at vtiinstruments.com <mailto:
>> bfitzpatrick at vtiinstruments.com>>
>>
>>    Thanks for the suggestions!
>>
>>    I tried the first one, just as a test. I'd like to do the second
>>    programatically if I can, but I just wanted to make sure
>>    annotations were going to fix this. It still seems to be giving me
>>    the same error:
>>    (...)/pure_virtual.h:5: WrapperWarning: Parameter 'int * value'
>>    error (used in int pure_virtual_class::get_value(int * value)
>>    [member function]):
>>    <pybindgen.typehandlers.base.TypeConfigurationError instance at
>>    0xb780326c>
>>
>>     virtual int get_value(int* value) = 0;
>>
>>    Here is what I changed my code to:
>>
>>      // -#- @value(transfer_ownership=true) -#-
>>
>>     virtual int get_value(int* value)=0;
>>
>>
>> Apart from the blank line, seems OK.  Do you get a "unused annotation"
>> warning?
>>
>>
> That's odd, there wasn't a blank line in my original email. There certainly
> isn't one in the file.
> I do not get an unused annotation warning, or anything to suggest it
> noticed my annotation in the slightest. I am using Python2.4 on Debian Etch,
> with Pygccxml 0.9.5. The Python's a bit old, but everything else has been
> compiled or installed manually.


Well, with Python 2.5 it prints TypeConfigurationError('some message'),
which is rather more helpful.  You are not seeing the full error message,
just the (vague) exception type.

And did you run the unit tests (./waf check) ?  If the unit tests pass,
annotations supposedly are working...


>
>
>
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>



-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090623/88da67ac/attachment.htm>


More information about the Cplusplus-sig mailing list