You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was exploring Python.NET API, and while looking PyType class, I found a constructor that accepts a TypeSpec.
So, I got curious and peeked the definition of TypeSpec, and I found the constructor. I can fill every argument of the constructor, except the basicSize parameter.
I'm not so used to dealing with the C API of Python directly, so I searxhed and apparently the basic size is the PyObject_HEAD size + fields that the type supports it.
So I tried to find references to TypeSpec in Python.NET code andthe only references I found are in the NativeTypeSpec constructor, inside TypeManager code and inside a test.
All of these references I linked here are internal parts of Python.NET and/or uses internal functionality (example: reading type offsets and marshalling from string to StrPtr).
Now my question is: Is TypeSpec actually meant to be consumed externally by developers?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I was exploring Python.NET API, and while looking
PyTypeclass, I found a constructor that accepts aTypeSpec.So, I got curious and peeked the definition of
TypeSpec, and I found the constructor. I can fill every argument of the constructor, except thebasicSizeparameter.I'm not so used to dealing with the C API of Python directly, so I searxhed and apparently the basic size is the
PyObject_HEADsize + fields that the type supports it.So I tried to find references to
TypeSpecin Python.NET code andthe only references I found are in theNativeTypeSpecconstructor, insideTypeManagercode and inside atest.All of these references I linked here are internal parts of Python.NET and/or uses internal functionality (example: reading type offsets and marshalling from string to
StrPtr).Now my question is: Is
TypeSpecactually meant to be consumed externally by developers?Beta Was this translation helpful? Give feedback.
All reactions