Boost logo

Boost Users :

Subject: Re: [Boost-users] Exposing C++ Instances to Python
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-25 10:56:43


AMDG

Leonhard Weber wrote:
> EngineCallback* test = new EngineCallback;
>
> // Entrypoint for Python to come ant fetch the Application Callback
> shared_ptr<EngineCallback> PyCallback( EngineCallback* &test );
> <snip>
> # test.py
> from EngineCallback import PyCallback
> from EngineCallback import EngineCallback
>
> test = PyCallback()
>

PyCallback takes one argument. Hence the exception below.
Did you intend to use the global "test" instead of taking test
as an argument in PyCallback?

> Traceback (most recent call last):
> File "test.py", line 5, in <module>
> test = PyCallback()
> Boost.Python.ArgumentError: Python argument types in
> EngineCallback.PyCallback()
> did not match C++ signature:
> PyCallback(EngineCallback* {lvalue})
>

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net