[Python-Dev] Heap allocate type structs in native extension modules? (original) (raw)
Hugh Fisher hugo.fisher at gmail.com
Fri Dec 29 08:35:05 EST 2017
- Previous message (by thread): [Python-Dev] Heap allocate type structs in native extension modules?
- Next message (by thread): [Python-Dev] When val=b'', but val == b'' returns False - bytes initialization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Dec 2017 11:25:14 +0200 From: Serhiy Storchaka <storchaka at gmail.com> To: python-dev at python.org Subject: Re: [Python-Dev] Heap allocate type structs in native extension modules? [ munch ] Yes, you can create heap types by using PyTypeFromSpecWithBases().
But be aware of caveats (https://bugs.python.org/issue26979).
Thanks! I'll give it a go. I've already run into and solved the tp_new issue, so that won't be a problem.
--
cheers,
Hugh Fisher
- Previous message (by thread): [Python-Dev] Heap allocate type structs in native extension modules?
- Next message (by thread): [Python-Dev] When val=b'', but val == b'' returns False - bytes initialization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]