[pypy-svn] r55903 - pypy/branch/faster-ctypes/pypy/module/_ctypes

fijal at codespeak.net fijal at codespeak.net
Mon Jun 16 21:27:50 CEST 2008


Author: fijal
Date: Mon Jun 16 21:27:50 2008
New Revision: 55903

Modified:
   pypy/branch/faster-ctypes/pypy/module/_ctypes/interp_func.py
Log:
Collaps ifs to one


Modified: pypy/branch/faster-ctypes/pypy/module/_ctypes/interp_func.py
==============================================================================
--- pypy/branch/faster-ctypes/pypy/module/_ctypes/interp_func.py	(original)
+++ pypy/branch/faster-ctypes/pypy/module/_ctypes/interp_func.py	Mon Jun 16 21:27:50 2008
@@ -37,9 +37,7 @@
     def push_arg(self, space, argtype, w_arg):
         if argtype == 'i':
             self.handle.push_arg(space.int_w(w_arg))
-        elif argtype == 'd':
-            self.handle.push_arg(space.float_w(w_arg))
-        elif argtype == 'f':
+        elif argtype == 'd' or argtype == "f":
             self.handle.push_arg(space.float_w(w_arg))
         else:
             raise NotImplementedError("Argtype %s" % argtype)



More information about the Pypy-commit mailing list