Issue 10943: abitype: Need better support to port C extension modules to the stable C API (original) (raw)

Issue10943

Created on 2011-01-19 08:38 by fhaxbox66@googlemail.com, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg126519 - (view) Author: Leo (fhaxbox66@googlemail.com) Date: 2011-01-19 08:38
I tried to port the extension module at http://code.google.com/p/pyhyphen/source/browse/3.x/hnjmodule.c to the stable C API using abitype.py. I gave up after the following exceptions: - execption raised for missing PyVarObject_HEAD: this could be rixed by deleting a /* */ comment before. I think abitype.py should properly skip comments rather than forcing the user to delete them. - the xxxmodule.c on which hnjmodule.c is based, defines a PyObject Str_type wherr tp_basicsize is 0 rather than sizeof(XXX). This causes abitype.py to raise a key error as '0' seems to be ignored by abitype.py. Finally, I suggest to add to the source tree a boiler plate C module conforming to the stable API such as xxxmodule-stable-api.c. This would help creating extensions from scratch.
msg126798 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2011-01-21 23:42
Notice that a boilerplate module is already available: xxlimited.c.
msg411894 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2022-01-27 16:30
Tools/scripts/abitype.py hasn't seen much maintenance in 11 years, but it also seems not to have seen much use. Patches would be accepted, but priority is low enough that I'm going to go ahead and close the issue.
History
Date User Action Args
2022-04-11 14:57:11 admin set github: 55152
2022-01-27 16:30:38 zach.ware set status: open -> closednosy: + zach.waremessages: + resolution: out of datestage: resolved
2011-01-21 23:42:08 loewis set nosy:loewis, fhaxbox66@googlemail.commessages: +
2011-01-21 21:43:11 r.david.murray set nosy: + loewis
2011-01-19 08:38:46 fhaxbox66@googlemail.com create