I have now started an initial patch for PEP 384, in the pep-0384 branch.
This has the following features:
- modules can be compiled under Py_LIMITED_API
- Tools/scripts/abitype.py converts C code containing static
  PyTypeObject definitions to use the new API for type definitions.

The following aspects are still missing:
- there is no support for generating python3.dll on Windows yet
- there has been no validation whether the API is actually feasible
  to use in extension modules.

I started looking into porting the sqlite extension, and ran into
these issues:
- certain fields of PyTypeObject are called directly:
  pysqlite_NodeType.tp_alloc
  Py_TYPE(self)->tp_free
- PyObject_Print is used, but can't be supported, as it uses a FILE*
  parameter

For the first issue, it would be possible to provide a generic
accessor function that fetches fields from a type object. Alternatively,
each case could be considered, suggesting an alternative code for the
desired effect.

I'll be off the net for the next two weeks most of the time, so
I might not be able to respond quickly.

Anybody interested in advancing that patch, feel free to commit
changes into the branch.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to