I'm working thought the Py_LIMITED_API bit by bit getting my head around it. Where possible I want to have a single imlpementation of a feature by using the limited API only. I'm not sure about how far I will get attempting this.
Add --limited-api option to help develop limited api support
But that means that the behviour is different it Py_LIMITED_API is defined that is surely a bad thing to do? Are you saying that new-style classes cannot be defined with the Py_LIMITED_API?
I'd like to understand what is goig wrong here. Why is that protected by an #ifdef Py_LIMITED_API? How do I demonstrate that it is a bug without the change?
Yep, I've added the ability to test with different values of Py_LIMITED_API and defaulted to 0x0304000 and added a error to say that it most be 3.4 or later. I have been busy and need to get back to this. I need to understand why you have reordered/added calls in some of the patch. For example to readyType() in ExtensionOldType.hxx. Either the call is not needed or being missing is a bug. As I say I need to find the time to get back into this.
Thank you very much for the patch this is a feature that I want PyCXX to support. I have commited r386 to update the build-all.sh and setup_makefile.py to support testing this feature. running ./build-all.sh will test pycxx against all installed python versions. I see this error with python 3.6 and will work on that. ./CXX/Python3/ExtensionType.hxx:313:38: error: ‘PyType_GetSlot’ was not declared in this scope ((freefunc)PyType_GetSlot( _self->ob_type, Py_tp_free ))( _self ); ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
Add abilty to test builds against Py_LIMITED_API
Commited as r385 and will be in the next release.