[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: You need to create your type objects dynamically when using the Limited API. See PEP 384 for how to do so: https://www.python.org/dev/peps/pep-0384/#type-objects Quoting from the PEP: "The structure of type objects is not available to applications; declara

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: This is a Visual Studio solution. Will I attach the whole zip containing the projects and files and the the solution file? -- ___ Python tracker __

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan
Change by Shreyan Avigyan : Added file: https://bugs.python.org/file50024/Extension2.h ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan
Change by Shreyan Avigyan : Added file: https://bugs.python.org/file50023/Extension.h ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I've two header files, one main.c file and it's on my local machine. My platform is Windows, Python is 3.9.5 32bit and IDE is Visual Studio 2019. I'm attaching those files. -- Added file: https://bugs.python.org/file50022/main.c

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Christian Heimes
Christian Heimes added the comment: Is your code on Github, Gitlab, or BitBucket? Otherwise please attach Extension.h. What's your platform and exact Python version? -- ___ Python tracker __

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Thanks for the quick response but I'm using PyTypeObject only. But in stable ABI it uses the name _typeobject to represent it. And I have a lot of files in my module therefore it's difficult to attach them. -- __

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Christian Heimes
Christian Heimes added the comment: Looks like you are doing something wrong. For example you seem to use internal, private bits like "_typeobject" instead of public APIs like PyTypeObject. These kind of questions are more appropriate for mailing list or https://discuss.python.org/ . Please

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan
New submission from Shreyan Avigyan : I usually program in Python C API without defining Py_LIMITED_API. I thought about using the stable ABI today. To my surprise, there are lot of conflicts occurring if Py_LIMITED_API is defined. The whole list of errors are:- 1>C:\Users\shrey\source\repos\