[C++-sig] Is there any class member method number limit for boost.python?

2011-10-27 Thread Grant Tang
Hi, I have a class wrapped to Python which has 334 member .def(). After I added one more method, i.e. .def(), it shows segfault when I import this class it in Python. Strangely, this only happens on 64 bit CentOS 4.8 with gcc 3.4.6. It works fine with the 335th member method on 32 bit CentOS 4

Re: [C++-sig] question about implicit type conversion of vector to a custom type

2011-08-18 Thread Grant Tang
"Jim Bosch" wrote in message news:4e4d4f62.8020...@gmail.com... On 08/18/2011 09:37 AM, Grant Tang wrote: I change my vector<> conversion(see it in my last reply) to add specialization for int, float, string etc. I added type check in convertible() function: Sorry I didn

Re: [C++-sig] question about implicit type conversion of vector to a custom type

2011-08-18 Thread Grant Tang
"Jim Bosch" wrote in message news:4e4ad9d9.9000...@gmail.com... Unfortunately, there's no "best-match" type checking in Boost.Python; when trying to convert a Python object to a particular C++ type, it simply runs over a list of all the converters registered (using RTTI) for that C++ type.

Re: [C++-sig] question about implicit type conversion of vector to a custom type

2011-08-16 Thread Grant Tang
"Jim Bosch" wrote in message news:4e4ad9d9.9000...@gmail.com... On 08/16/2011 12:43 PM, Grant Tang wrote: This is a question about using implicitly_convertible to convert vector to another custom class type. I already have boost python type conversion code to convert Python list/

[C++-sig] question about implicit type conversion of vector to a custom type

2011-08-16 Thread Grant Tang
This is a question about using implicitly_convertible to convert vector to another custom class type. I already have boost python type conversion code to convert Python list/tuple to c++ vector, which works fine. There is another custom class EMObject, which is a thin wrapper to many builit-in typ