Being Bit(ten) and Byting Back

Sunday, April 03, 2005

Testing the Python Bindings for the MPEG Library...

Just started testing the Python bindings for the MPEG Library. Found my first bug of the day :-), there was a problem of how I was transferring the data from C++ world to Python World. Should have used the SWIG provided function to convert the std::vector object to create a new Python Object and then add it to the tuple.

There is one think I haven't managed to work out, is the number of warnings the VC7's compiler emits when compiling the C++ code that it emits. i thought of using #pragma's but I want to investigate a better way of suppressing those warnings.

Plus there is also the issue of SWIG's warnings. I have a bunch of classes that are derived from an abstract class that uses templates. The template arguments come from a library that I don't want to expose to Python. Now because SWIG emits Python bindings by parsing the C++ header files, SWIG complains that it can't find any information about those classes in the interface file. hmmm, I could use the protected inheritance. That way SWIG won't attempt to locate class information in the template class.

Fixed the bug in the C++ code, but a new problem in the Python client code... Turns out, that the proxy objects don't interoperate C++ to Python seamlessly. I will need to write some sort of translation code.

0 Comments:

Post a Comment

<< Home