]> granicus.if.org Git - python/commitdiff
Get rid of a "unused static function" warning.
authorGeorg Brandl <georg@python.org>
Sat, 16 Oct 2010 20:33:11 +0000 (20:33 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 16 Oct 2010 20:33:11 +0000 (20:33 +0000)
Modules/_ctypes/cfield.c

index ab293f75bc42dd3b506542a92fbdf126bf938f74..d2fa00558535ffdc22221f520bb313b41c31dca1 100644 (file)
@@ -9,6 +9,7 @@
 
 #define CTYPES_CFIELD_CAPSULE_NAME_PYMEM "_ctypes/cfield.c pymem"
 
+#if Py_UNICODE_SIZE != SIZEOF_WCHAR_T
 static void pymem_destructor(PyObject *ptr)
 {
     void *p = PyCapsule_GetPointer(ptr, CTYPES_CFIELD_CAPSULE_NAME_PYMEM);
@@ -16,6 +17,7 @@ static void pymem_destructor(PyObject *ptr)
         PyMem_Free(p);
     }
 }
+#endif
 
 
 /******************************************************************/