Re: tp_new, tp_alloc, tp_init

2011-12-08 Thread Gregory Ewing
Michael Hennebry wrote: I've been reading about writing extension types in C and am rather fuzzy about the relationship between tp_new, tp_alloc and tp_init. Most especially, why tp_new? It seems to me that tp_alloc and tp_init would be sufficient. tp_new and tp_init correspond to the Python

tp_new, tp_alloc, tp_init

2011-11-30 Thread Michael Hennebry
I've been reading about writing extension types in C and am rather fuzzy about the relationship between tp_new, tp_alloc and tp_init. Most especially, why tp_new? It seems to me that tp_alloc and tp_init would be sufficient. Most of my reading has been in the Noddy and Shoddy portions of