[pypy-commit] pypy win32-stdlib: fix for uninitialized _argtypes_, tested in ctypes\test\test_random_things

mattip noreply at buildbot.pypy.org
Sun Jun 10 23:21:20 CEST 2012


Author: Matti Picus <matti.picus at gmail.com>
Branch: win32-stdlib
Changeset: r55556:f06471fa0a67
Date: 2012-06-06 23:39 +0300
http://bitbucket.org/pypy/pypy/changeset/f06471fa0a67/

Log:	fix for uninitialized _argtypes_, tested in
	ctypes\test\test_random_things

diff --git a/lib-python/2.7/ctypes/test/test_random_things.py b/lib-python/2.7/ctypes/test/test_random_things.py
--- a/lib-python/2.7/ctypes/test/test_random_things.py
+++ b/lib-python/2.7/ctypes/test/test_random_things.py
@@ -19,7 +19,6 @@
 
             hdll = windll.kernel32.LoadLibraryA("kernel32")
             funcaddr = windll.kernel32.GetProcAddress(hdll, "GetModuleHandleA")
-
             self.assertEqual(call_function(funcaddr, (None,)),
                                  windll.kernel32.GetModuleHandleA(None))
 
diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py
--- a/lib_pypy/_ctypes/function.py
+++ b/lib_pypy/_ctypes/function.py
@@ -59,7 +59,7 @@
 class CFuncPtr(_CData):
     __metaclass__ = CFuncPtrType
 
-    _argtypes_ = None
+    _argtypes_ = []
     _restype_ = None
     _errcheck_ = None
     _flags_ = 0


More information about the pypy-commit mailing list