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?
-----Original Message----- From: python-dev-bounces+kristjan=ccpgames....@python.org [mailto:python-dev-bounces+kristjan=ccpgames....@python.org] On Behalf Of Larry Hastings Sent: 31. mars 2009 19:15 To: Python-Dev@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. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com