design question - python extensions in C++
Feb. 8, 2000
1:52 p.m.
John (Max) Skaller wrote:
Why not just use a dynamic cast? MyObject *o = dynamic_cast<MyObject *>(arg1);
This should work because the MyObject is derived from PyObject.
Because it wouldn't compile for me using GCC 2.95-2. The compiler states that it cannot dynamic cast from struct PyObject * to class MyObject *. I figured this was due to my limited understanding of dynamic_cast but perhaps this is a GCC bug. The GCC bug list does report several problems with dynamic cast, but none with such a simple application. I'll try to find out.
9711
Age (days ago)
9711
Last active (days ago)
0 comments
1 participants
participants (1)
-
BRAD VENNER