G
Graeme
Hi All,
I am trying to use the standard template library to code an extension to
Python. However, at the core of the Python object mechanism the allocator
uses malloc() rather than new, so I need a way to manually initialise an
STL list - is there a way to do this?
I need to do something like:
obj = (obj *) malloc (sizeof(obj));
doSomethingMagic(obj->myList);
obj->myList.push_back(foo);
Cheers,
Graeme
I am trying to use the standard template library to code an extension to
Python. However, at the core of the Python object mechanism the allocator
uses malloc() rather than new, so I need a way to manually initialise an
STL list - is there a way to do this?
I need to do something like:
obj = (obj *) malloc (sizeof(obj));
doSomethingMagic(obj->myList);
obj->myList.push_back(foo);
Cheers,
Graeme