1 Oct 01:00
Re: [python] Setting a pointer into an object
Robert Dailey <rcdailey <at> gmail.com>
2008-09-30 23:00:39 GMT
2008-09-30 23:00:39 GMT
On Tue, Sep 30, 2008 at 4:05 PM, Robert Dailey <rcdailey <at> gmail.com> wrote:
> On Tue, Sep 30, 2008 at 3:14 PM, David Abrahams <dave <at> boostpro.com> wrote:
>> Just wrap the class without exposing any of its interesting parts and
>> you should be fine:
>>
>> class_<SomeClassOfMine>("SomeClassOfMine");
>
> Thanks David.
>
> After I posted my original inquiry I found out through PyErr_Print()
> that it needed the class to be exposed to Python. However, I no longer
> wish to expose the class, but instead I want to define a global
> function in a python script that I'm loading.
>
> For example, I would add this function to the namespace that I pass
> into exec_file().
>
> The C++ function I want to expose looks like:
>
> static Rocket::Core::Context* GetContext( std::string const& context_name );
>
>
> All I'm doing is this:
>
> boost::python::object MyNewFunction( &GetContext );
>
> However, when I compile this I get:
>
> error C2027: use of undefined type
> 'boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<T>'
(Continue reading)
Maybe you want:
let(_a = 0)[ ++_a ]
and herein I think lies the general misconception about Phoenix
lambda (and possibly a flaw in the general API).
The bottom line is that lambda introduces a new scope. It is
)
Done, also committed the fix to trunk.
> It seems the x64 fix is the right way. Simply disabling the warning
> is a bad thing. But disabling and reenabling the warning in every
> place is a tedious job. Please find my try at this attached.
Can you file Trac-tickets for these and assign to the appropriate library
authors?
Many thanks, John.
_______________________________________________
Unsubscribe & other changes:
RSS Feed