On Feb 11, 2009, at 7:28 PM, Gerrit Voss wrote:

>
> Hi,
>
> On Thu, 2009-02-12 at 09:06 +0800, Gerrit Voss wrote:
>> Hi,
>>
>> On Wed, 2009-02-11 at 16:29 -0600, Patrick Hartling wrote:
>>> Marcus Lindblom wrote:
>>>> Patrick Hartling wrote:
>>>>> I have made some big progress in getting PyOpenSG updated to the  
>>>>> OpenSG
>>>>> 2.0 trunk, but I have run up against problems related to class  
>>>>> templates
>>>>> with static data members.
>>>>
>>>> [snip]
>>>>
>
>> just a little curious, how do you handle this in general. None of the
>> FieldMask/FieldId elements has a definition so you actually can't  
>> take
>> the address of any of them, e.g
>>
>> fprintf(stderr, "%p\n", &Transform::MatrixFieldMask);
>>
>> fails as well.
>>
>> So there must be something somewhere that solves this for regular
>> classes and before adding definitions to the templates part (as your
>> patch does) I would like to have a short look there.
>>
>
> actually looking at an older py_osg checkout you don't seem to take
> the address but just the value, e.g.
>
> WindowBase.pypp.cpp:
>
>  bp::scope().attr("WidthFieldId") =
>     (int)OSG::WindowBase::WidthFieldId;
>
>
> which should be fine as you can't change the value so you don't really
> have to have a memory reference for it.
>
> Did this change ?


I think that this may have all been due to a misunderstanding on my  
part. I see that there is already special-case handling in PyOpenSG's  
gen_bindings.py file for this case occurring elsewhere. (Indeed, that  
handling was added by me about two years ago...) Overall, I get the  
impression that PyOpenSG is not even supposed to expose  
the ...FieldMask and ...FieldId members of OpenSG classes to Python,  
but this has not been handled consistently.

Sorry for the false alarm.

  -Patrick


--
Patrick L. Hartling
Senior Software Engineer, Priority 5
http://www.priority5.com/

The information transmitted in this communication is intended only for
the person or entity to which it is addressed and contains proprietary
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please destroy any copies, contact the sender
and delete the material from any computer.


------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to