Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abitype: Need better support to port C extension modules to the stable C API #55152

Closed
fhaxbox66googlemailcom mannequin opened this issue Jan 19, 2011 · 3 comments
Closed
Labels
extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@fhaxbox66googlemailcom
Copy link
Mannequin

fhaxbox66googlemailcom mannequin commented Jan 19, 2011

BPO 10943
Nosy @loewis, @zware

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2022-01-27.16:30:38.977>
created_at = <Date 2011-01-19.08:38:46.147>
labels = ['extension-modules', 'type-feature']
title = 'abitype: Need better support to port C extension modules to the stable C API'
updated_at = <Date 2022-01-27.16:30:38.976>
user = 'https://bugs.python.org/fhaxbox66googlemailcom'

bugs.python.org fields:

activity = <Date 2022-01-27.16:30:38.976>
actor = 'zach.ware'
assignee = 'none'
closed = True
closed_date = <Date 2022-01-27.16:30:38.977>
closer = 'zach.ware'
components = ['Extension Modules']
creation = <Date 2011-01-19.08:38:46.147>
creator = 'fhaxbox66@googlemail.com'
dependencies = []
files = []
hgrepos = []
issue_num = 10943
keywords = []
message_count = 3.0
messages = ['126519', '126798', '411894']
nosy_count = 3.0
nosy_names = ['loewis', 'fhaxbox66@googlemail.com', 'zach.ware']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue10943'
versions = ['Python 3.2']

@fhaxbox66googlemailcom
Copy link
Mannequin Author

fhaxbox66googlemailcom mannequin commented Jan 19, 2011

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.

@fhaxbox66googlemailcom fhaxbox66googlemailcom mannequin added extension-modules C modules in the Modules dir type-feature A feature request or enhancement labels Jan 19, 2011
@loewis
Copy link
Mannequin

loewis mannequin commented Jan 21, 2011

Notice that a boilerplate module is already available: xxlimited.c.

@zware
Copy link
Member

zware commented Jan 27, 2022

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.

@zware zware closed this as completed Jan 27, 2022
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant