[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-cpp-sig
Subject:    Re: [C++-sig] Pybindgen/pygccxml integration
From:       Gustavo Carneiro <gjcarneiro () gmail ! com>
Date:       2009-06-23 22:51:56
Message-ID: a467ca4f0906231551w7712f807h7004455185331f72 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

> Gustavo Carneiro wrote:
>
>>
>>
>> 2009/6/23 Ben Fitzpatrick <bfitzpatrick@vtiinstruments.com <mailto:
>> bfitzpatrick@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@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

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">2009/6/23 Ben Fitzpatrick <span dir="ltr">&lt;<a \
href="mailto:bfitzpatrick@vtiinstruments.com">bfitzpatrick@vtiinstruments.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> Gustavo Carneiro wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"> <br>
<br>
2009/6/23 Ben Fitzpatrick &lt;<a href="mailto:bfitzpatrick@vtiinstruments.com" \
target="_blank">bfitzpatrick@vtiinstruments.com</a> &lt;mailto:<a \
href="mailto:bfitzpatrick@vtiinstruments.com" \
target="_blank">bfitzpatrick@vtiinstruments.com</a>&gt;&gt;<br>

<br></div><div class="im">
      Thanks for the suggestions!<br>
<br>
      I tried the first one, just as a test. I&#39;d like to do the second<br>
      programatically if I can, but I just wanted to make sure<br>
      annotations were going to fix this. It still seems to be giving me<br>
      the same error:<br>
      (...)/pure_virtual.h:5: WrapperWarning: Parameter &#39;int * value&#39;<br>
      error (used in int pure_virtual_class::get_value(int * value)<br>
      [member function]):<br>
      &lt;pybindgen.typehandlers.base.TypeConfigurationError instance at<br>
      0xb780326c&gt;<br>
<br>
       virtual int get_value(int* value) = 0;<br>
<br>
      Here is what I changed my code to:<br>
<br>
         // -#- @value(transfer_ownership=true) -#-<br>
<br>
       virtual int get_value(int* value)=0;<br>
<br>
<br>
Apart from the blank line, seems OK.   Do you get a &quot;unused annotation&quot; \
warning?<br>  <br>
</div></blockquote>
That&#39;s odd, there wasn&#39;t a blank line in my original email. There certainly \
isn&#39;t one in the file.<br> 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&#39;s a bit old, but everything else has been \
compiled or installed manually.</blockquote> <div><br>Well, with Python 2.5 it prints \
TypeConfigurationError(&#39;some message&#39;), which is rather more helpful.   You \
are not seeing the full error message, just the (vague) exception type.<br><br>And \
did you run the unit tests (./waf check) ?   If the unit tests pass, annotations \
supposedly are working...<br>  </div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"><div><div></div><div class="h5"><br> <br>
<br>
_______________________________________________<br>
Cplusplus-sig mailing list<br>
<a href="mailto:Cplusplus-sig@python.org" \
target="_blank">Cplusplus-sig@python.org</a><br> <a \
href="http://mail.python.org/mailman/listinfo/cplusplus-sig" \
target="_blank">http://mail.python.org/mailman/listinfo/cplusplus-sig</a><br> \
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Gustavo J. A. M. \
Carneiro<br>INESC Porto, Telecommunications and Multimedia Unit<br>&quot;The universe \
is always one step beyond logic.&quot; -- Frank Herbert<br>



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic