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

List:       python-cpp-sig
Subject:    Re: [C++-sig] copy constructors and multiple instances
From:       Josh Stratton <strattonbrazil () gmail ! com>
Date:       2011-09-02 9:44:22
Message-ID: CAPVmgLgJweqWbcuktFpK9=RYJ6fxMNF5fUVKeNdN3vy5oa_DZA () mail ! gmail ! com
[Download RAW message or body]

This is where I'm calling the function inside Scene, by the way, and
getting that error.

object processFileFunc = _pyMainModule.attr("MeshImporter").attr("processFile");
processFileFunc(this, fileName); // right here, where the python func
takes a scene object and filename

I haven't touched this part of the code when since I was using
QSharedPointers, so I assume there's something I'm still not doing to
setup this mapping.

On Fri, Sep 2, 2011 at 1:24 AM, Hans Meine <hans_meine@gmx.net> wrote:
> Am Freitag, 2. September 2011, 04:31:24 schrieb Josh Stratton:
>> BOOST_PYTHON_MODULE(scene)
>> {
>>     class_<Scene, boost::noncopyable>("Scene");
>> }
>>
>> // later calling this
>> boost::python::register_ptr_to_python< boost::shared_ptr<Scene> >();
>> PyImport_AppendInittab("scene", &initscene);
>>
>> So is this all I really need for the mapping then?
>
> register_ptr_to_python deals with the boost::shared_ptr around a Scene, but of
> course you still need a converter for the latter, e.g. as registered by using
> class_ to describe your class.
>
> HTH
>  Hans
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
_______________________________________________
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