Re: Python C-API Object Allocation

2009-02-24 Thread Stefan Behnel
> On Feb 21, 2009, at 10:01 AM, William Newbery wrote: >> Ive been learning the C-API lately so I can write python extensions >> for some of my c++ stuff. First thing that comes to (my) mind is that you probably do not want to write code against the bare C-API. Instead, give Cython a try. http://

Re: Python C-API Object Allocation

2009-02-23 Thread Philip Semanchuk
On Feb 21, 2009, at 10:01 AM, William Newbery wrote: Ive been learning the C-API lately so I can write python extensions for some of my c++ stuff. I want to use the new and delete operators for creating and destroying my objects. The problem is python seems to break it into several stage

Python C-API Object Allocation

2009-02-21 Thread William Newbery
Ive been learning the C-API lately so I can write python extensions for some of my c++ stuff. I want to use the new and delete operators for creating and destroying my objects. The problem is python seems to break it into several stages. tp_new, tp_init and tp_alloc for creation and tp_del, t