python c api, how can I add function to class which defined in c layer

前端 未结 0 1346
你的背包
你的背包 2021-01-27 03:56

I defined a type spam.Foo follow Defining New Types.

Which like this.

PyObject *m;
m = Py_InitModule(MODULE_NAME, Spam_methods);

int rst = PyModule_AddObj         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题