[C++-sig] custom smart pointers
Roman Yakovenko
roman.yakovenko at gmail.com
Thu Aug 31 22:58:39 CEST 2006
On 8/31/06, David Abrahams <dave at boost-consulting.com> wrote:
> >From this I can't understand what you're doing or what errors you're
> getting. Please do what I tell everyone to do: make a _complete_,
> _minimal_ example that reproduces your problem and post that.
I attached 3 files. This is complete and minimal example.
custom_smart_ptr.h
file contains smart pointer class definition.
custom_smart_ptr_classes_to_be_exported.hpp
file contains definition of 2 classes: "base" and "derived" classes.
This file also defines "get_value" function. this function is
called from Python.
custom_smart_ptr_classes.cpp
file contains Boost.Python bindings.
Python code is next:
import custom_smart_ptr_classes as cspc
d = cspc.derived( 2 )
cspc.get_value( d )
The last line raises next exception:
ArgumentError: Python argument types in
custom_smart_ptr_classes.get_value(derived)
did not match C++ signature:
get_value(my_smart_ptr_t<base> a)
Thank you.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom_smart_ptr.h
Type: text/x-chdr
Size: 920 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060831/ba3138b5/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom_smart_ptr_classes_to_be_exported.hpp
Type: text/x-c++hdr
Size: 412 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060831/ba3138b5/attachment.hpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom_smart_ptr_classes.cpp
Type: text/x-c++src
Size: 2341 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060831/ba3138b5/attachment.cpp>
More information about the Cplusplus-sig
mailing list