Revision: 1282
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1282&view=rev
Author: roman_yakovenko
Date: 2008-03-16 04:13:48 -0700 (Sun, 16 Mar 2008)
Log Message:
-----------
small update
Modified Paths:
--------------
pyplusplus_dev/docs/history/history.rest
Modified: pyplusplus_dev/docs/history/history.rest
===================================================================
--- pyplusplus_dev/docs/history/history.rest 2008-03-15 19:46:34 UTC (rev 1281)
+++ pyplusplus_dev/docs/history/history.rest 2008-03-16 11:13:48 UTC (rev 1282)
@@ -20,26 +20,17 @@
* Andy Miller
* Martin Preisler
* Meghana Haridev
+* Julian Scheid
-------------
-Project name
-------------
-
-In version 0.8.1 project has been renamed from "pyplusplus" to "Py++".
-There were few reasons to this:
-
-1. I like "Py++" more then "pyplusplus".
-
-2. "Py++" was the original name of the project: http://mail.python.org/pipermail/c++-sig/2005-July/009280.html
-
-3. Users always changed the name of the projects. I saw at least 6 different names.
-
-----------
Version SVN
-----------
-1. The algorithm, which calculates what member functions should be redefined in derived
- class wrappers was improved. For example:
+1. The algorithm, which calculates what member functions should be redefined in
+ derived class wrappers, was improved. Many thanks to Julian Scheid for the bug
+ fix.
+
+ The change explanation.
.. code-block:: C++
@@ -63,10 +54,13 @@
print "C.foo"
then when ``foo`` is invoked on this instance on the C++ side of things, the
- Python code won't be executed as the wrapper is missing.
+ Python code won't be executed as the wrapper was missing.
+ **Warning!** **There is a possibility that your generated code will not work!**
+ **Keep reading.**
+
If you use "function transformation" functionality, than it is possible the
- generated code will not compile. Consider next example:
+ generated code will **NOT** work. Consider next example:
.. code-block:: C++
@@ -89,44 +83,57 @@
foo = mb.mem_funs( 'foo' )
foo.add_transformation( FT.output(0) )
- The generated code of wrapper class, for class ``B``, will contain next code:
+ The generated code, for class ``B``, is:
.. code-block:: C++
- virtual void foo() {
- ...
- }
-
- static boost::python::tuple default_foo( ::B & inst ){
- ...
- }
+ namespace bp = boost::python;
+
+ struct B_wrapper : B, bp::wrapper< B > {
+ virtual void foo( int & i ) const { ... }
+
+ static boost::python::tuple default_foo( ::B const & inst )
+ { ... }
+
+ virtual void foo( int & i ) const
+ { ... }
+
+ static boost::python::object default_foo( ::A const & inst )
+ { ... }
+ };
+ ...
+ bp::class_< B_wrapper, bp::bases< A > >( "B" )
+ .def( "foo", (boost::python::tuple (*)( ::B const & ))( &B_wrapper::default_foo ) )
+ .def( "foo", (boost::python::object (*)( ::A const & ))( &B_wrapper::default_foo ) );
- virtual void foo() {
- ...
- }
-
- static boost::python::tuple default_foo( ::B & inst ){
- ...
- }
+ As you can see, after applying the transformation both functions have same
+ signature. Do you know what function will be called in some situation? I do -
+ the wrong one :-(.
- Yes, the functions will be defined twice! In the previous version, the functions
- were also defined twice but in the different classes. It was unclear, what
- function will be called in this or that situation.
+ Unfortunately, there is no easy work around or some trick that you can use,
+ which will not break the existing code. I see few solutions to the problem:
- If you have such situation, I suggest you to give aliases to the functions:
-
- .. code-block:: Python
-
-
- from pyplusplus import module_builder
- from pyplusplus import function_transformers as FT
+ * change the alias of the functions
+ .. code-block:: Python
- mb = module_builder_t( ... )
- for f in mb.mem_funs( 'foo' )
- foo.add_transformation( FT.output(0), alias=f.name + '_' + f.parent.name )
+ from pyplusplus import module_builder
+ from pyplusplus import function_transformers as FT
+ mb = module_builder_t( ... )
+ foo = mb.mem_funs( '::A::foo' ).add_transformation( FT.output(0), alias="foo_a" )
+ foo = mb.mem_funs( '::B::foo' ).add_transformation( FT.output(0), alias="foo_b" )
+
+ * use ``inout`` transformation - it preserves a function signature
+
+ * `Py++`_ can introduce a configuration, that will preserve the previous behaviour.
+ I think this is a wrong way to go and doing the API changes is the 'right'
+ longer term solution.
+
+ If you **absolutely need** to preserve API backward compatible, contact me
+ and I will introduce such configuration option.
+
+ Sorry for inconvenience.
-
-------------
Version 0.9.5
-------------
@@ -330,13 +337,16 @@
* ``is_immutable`` - returns ``True`` if exposed type is Python immutable type
+
-------------
Version 0.8.1
-------------
+
1. Georgiy Dernovoy contributed a patch, which allows `Py++`_ GUI to
save\\load last used header file.
+
2. `Py++`_ improved a lot functionality related to providing feedback to user:
* every package has its own logger
@@ -365,8 +375,23 @@
10. Bug fixes.
-11. Documentation was improved..
+11. Documentation was improved.
+
+Project name changed
+--------------------
+
+In this version the project has been renamed from "pyplusplus" to "Py++".
+There were few reasons to this:
+
+1. I like "Py++" more then "pyplusplus".
+
+2. "Py++" was the original name of the project: http://mail.python.org/pipermail/c++-sig/2005-July/009280.html
+
+3. Users always changed the name of the projects. I saw at least 6 different names.
+
+
+
-------------
Version 0.8.0
-------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|