Title: abitype: Need better support to port C extension modules to the stable C API
Type: enhancement Stage:
Components: Extension Modules Versions: Python 3.2
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List:, loewis
Priority: normal Keywords:

Created on 2011-01-19 08:38 by, last changed 2011-01-21 23:42 by loewis.

Messages (2)
msg126519 - (view) Author: Leo ( Date: 2011-01-19 08:38
I tried to port the extension module at to the stable C API using I gave up after the following exceptions:
- execption raised for missing PyVarObject_HEAD: this could be rixed by deleting a /* */ comment before. I think 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 to raise a key error as '0' seems to be ignored by

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.
Date User Action Args
2011-01-21 23:42:08loewissetnosy: loewis,
messages: + msg126798
2011-01-21 21:43:11r.david.murraysetnosy: + loewis
2011-01-19 08:38:46fhaxbox66@googlemail.comcreate