Commits

Antonio Cuni committed 8626772

avoid 'import ctypes' inside the byref function, we import 'pointer' directly from _ctypes

Comments (0)

Files changed (1)

lib_pypy/_ctypes/basics.py

     return tp._alignmentofinstances()
 
 def byref(cdata):
-    from ctypes import pointer
+    # "pointer" is imported at the end of this module to avoid circular
+    # imports
     return pointer(cdata)
 
 def cdata_from_address(self, address):
     'v' : _ffi.types.sshort,
     }
 
+
+# used by "byref"
+from _ctypes.pointer import pointer