How to instantiate a custom Python class inside a C extension?
Rhodri James
rhodri at kynesim.co.uk
Wed Apr 1 09:01:34 EDT 2020
On 01/04/2020 13:42, Musbur wrote:
> So when created from C, neither the "new" nor the "init" functions are
> called on the object, only "finalize". No wonder I get segfaults in the
> real life application.
>
> So how is this done right? Here's the C module:
I believe you do it in C as you would in Python: you call the Series class!
pyseries = PyObject_CallObject((PyObject *)&series_type, NULL);
--
Rhodri James *-* Kynesim Ltd
More information about the Python-list
mailing list