From b58503707f537035ae110387628055a1ca019bd9 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 12 Mar 2003 13:38:18 +0000 Subject: [PATCH] opaque pointer conversions from Gottfried.Ganssauge@haufe.de Acknowledgements for all [SVN r17839] --- doc/v2/acknowledgments.html | 30 ++++++++++++------- doc/v2/reference.html | 39 +++++++++++++++++++++++++ include/boost/python.hpp | 2 ++ include/boost/python/detail/dealloc.hpp | 15 ++++++++++ test/Jamfile | 2 ++ 5 files changed, 78 insertions(+), 10 deletions(-) create mode 100644 include/boost/python/detail/dealloc.hpp diff --git a/doc/v2/acknowledgments.html b/doc/v2/acknowledgments.html index 82cea6a2..3cc24edb 100644 --- a/doc/v2/acknowledgments.html +++ b/doc/v2/acknowledgments.html @@ -31,6 +31,15 @@

Dave Abrahams is the architect, designer, and implementor of Boost.Python.

+

Brett Calcott + contributed and maintains the Visual Studio project files and + documentation.

+ +

Gottfried + Ganßauge supplied support for opaque pointer conversions, + complete with documentation and a regression test (and I didn't + even have to ask him for those)! +

Joel de Guzman implemented the default argument support and wrote the excellent tutorial documentation.

@@ -63,6 +72,17 @@ use the new preproccessor metaprogramming constructs and helping us to work around buggy and slow C++ preprocessors.

+

Bruno da Silva de + Oliveira contributed the ingenious Pyste ("Pie-Steh") + code generator. + +

Nikolay Mladenov contributed + staticmethod support.

+ +

Martin Casado solved some sticky problems which allow us to build the + Boost.Python shared library for AIX's crazy dynamic linking model.

+

Achim Domma contributed some of the Object Wrappers and HTML templates for this documentation. Dave Hawkes contributed @@ -71,16 +91,6 @@ definition syntax. Pearu Pearson wrote some of the test cases that are in the current test suite.

-

Brett Calcott - contributed and maintains the Visual Studio project files and - documentation.

- -

Nikolay Mladenov contributed - staticmethod support.

- -

Martin Casado solved some sticky problems which allow us to build the - Boost.Python shared library for AIX's crazy dynamic linking model.

-

The development of this version of Boost.Python was funded in part by the Lawrence Livermore National Laboratories and by the Computational diff --git a/doc/v2/reference.html b/doc/v2/reference.html index ae2ec560..00644743 100644 --- a/doc/v2/reference.html +++ b/doc/v2/reference.html @@ -749,6 +749,22 @@ + +

return_opaque_pointer.hpp
+ +
+
+
Classes
+ +
+
+
+ return_opaque_pointer
+
+
+
+
+ @@ -806,6 +822,29 @@ +
opaque_pointer_converter.hpp
+ +
+
+
Classes
+ +
+
+
+ opaque_pointer_converter
+
+
+
Macros
+ +
+
+
+ BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID
+
+
+
+
+
to_python_converter.hpp
diff --git a/include/boost/python.hpp b/include/boost/python.hpp index db665d8d..bdca0b2f 100644 --- a/include/boost/python.hpp +++ b/include/boost/python.hpp @@ -44,12 +44,14 @@ # include # include # include +# include # include # include # include # include # include # include +# include # include # include # include diff --git a/include/boost/python/detail/dealloc.hpp b/include/boost/python/detail/dealloc.hpp new file mode 100644 index 00000000..8c4aaee7 --- /dev/null +++ b/include/boost/python/detail/dealloc.hpp @@ -0,0 +1,15 @@ +// Copyright Gottfried Ganßauge 2003. Permission to copy, use, +// modify, sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided +// "as is" without express or implied warranty, and with no claim as +// to its suitability for any purpose. + +# ifndef BOOST_PYTHON_DETAIL_DEALLOC_HPP_ +# define BOOST_PYTHON_DETAIL_DEALLOC_HPP_ +namespace boost { namespace python { namespace detail { + extern "C" inline void dealloc(PyObject* self) + { + PyObject_Del(self); + } +}}} // namespace boost::python::detail +# endif // BOOST_PYTHON_DETAIL_DEALLOC_HPP_ diff --git a/test/Jamfile b/test/Jamfile index 4a5b14d9..1852a2b2 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -124,6 +124,8 @@ bpl-test iterator : iterator.py iterator.cpp input_iterator.cpp ; bpl-test extract ; +bpl-test opaque ; + bpl-test pickle1 ; bpl-test pickle2 ; bpl-test pickle3 ;