Revision: 870
http://svn.sourceforge.net/pygccxml/?rev=870&view=rev
Author: roman_yakovenko
Date: 2007-01-17 22:24:12 -0800 (Wed, 17 Jan 2007)
Log Message:
-----------
fixing spell errors
Modified Paths:
--------------
pyplusplus_dev/docs/troubleshooting_guide/automatic_conversion/tuple_conversion.hpp
Modified: pyplusplus_dev/docs/troubleshooting_guide/automatic_conversion/tuple_conversion.hpp
===================================================================
--- pyplusplus_dev/docs/troubleshooting_guide/automatic_conversion/tuple_conversion.hpp 2007-01-17 20:00:35 UTC (rev 869)
+++ pyplusplus_dev/docs/troubleshooting_guide/automatic_conversion/tuple_conversion.hpp 2007-01-18 06:24:12 UTC (rev 870)
@@ -37,14 +37,14 @@
* initialize the relevant members of the instance.
*
* "From" conversion
- * Lets start from analizing one of the use case Boost.Python library have to
+ * Lets start from analyzing one of the use case Boost.Python library have to
* deal with:
*
* void do_smth( const triplet& arg ){...}
*
- * In order to allow to call this function from Python, the library should keep
- * parameter "arg" alive untill the function returns. In other words, the library
- * should provide instances life-time managment. The provided interface is not
+ * In order to allow calling this function from Python, the library should keep
+ * parameter "arg" alive until the function returns. In other words, the library
+ * should provide instances life-time management. The provided interface is not
* ideal and could be improved. You have to implement two functions:
*
* void* convertible( PyObject* obj )
@@ -58,7 +58,7 @@
* The second object is some kind of memory allocator for one object. Basically
* it keeps a memory chunk. You will use the memory for object allocation.
*
- * For some unclear for me reason, the library implements "C style Inheritance"
+ * For some unclear for me reason, the library implements "C style Inheritance"
* ( http://www.embedded.com/97/fe29712.htm ). So, in order to create new
* object in the storage you have to cast to the "right" class:
*
@@ -73,10 +73,20 @@
*
* your_type_t* instance = new (memory_chunk) your_type_t();
*
- * Now, you can continue to initialize the instance. If "your_type_t" constructor
- * requires some arguments, well just "parse" the Python object before you call
- * the constructor.
+ * Now, you can continue to initialize the instance.
*
+ * instance->set_xyz = read xyz from obj
+ *
+ * If "your_type_t" constructor requires some arguments, "read" the Python
+ * object before you call the constructor:
+ *
+ * xyz_type xyz = read xyz from obj
+ * your_type_t* instance = new (memory_chunk) your_type_t(xyz);
+ *
+ * Hint:
+ * In most case you don't really need\have to work with C Python API. Let
+ * Boost.Python library to do some work for you!
+ *
**/
namespace boost{ namespace python{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|