[Python-Dev] Let's update CObject API so it is safe and regular!
Kristján Valur Jónsson
kristjan at ccpgames.com
Wed Apr 1 17:34:42 CEST 2009
What are the semantics of the "type" argument for PyCObject_FromVoidPtr()?
-Does it do a strdup, or is the type required to be valid while the object exists (e.g. a static string)?
-How is the type match determined, strcmp, or pointer comparison?
From: python-dev-bounces+kristjan=ccpgames.com at python.org [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf Of Larry Hastings
Sent: 31. mars 2009 19:15
To: Python-Dev at python.org
Subject: [Python-Dev] Let's update CObject API so it is safe and regular!
* The constructors and the main accessor (PyCObject_AsVoidPtr) now all
*require* a "const char *type" parameter, which must be a non-NULL C
string of non-zero length. If you call that accessor and the "type"
is invalid *or doesn't match*, it fails.
More information about the Python-Dev