[pypy-svn] r73950 - in pypy/branch/cpython-extension/pypy/module/cpyext: . test

afa at codespeak.net afa at codespeak.net
Wed Apr 21 19:55:57 CEST 2010


Author: afa
Date: Wed Apr 21 19:55:55 2010
New Revision: 73950

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/number.py
   pypy/branch/cpython-extension/pypy/module/cpyext/test/test_number.py
Log:
Argh, bad capitalization: PyNumber_Inplace -> PyNumber_InPlace


Modified: pypy/branch/cpython-extension/pypy/module/cpyext/number.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/number.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/number.py	Wed Apr 21 19:55:55 2010
@@ -47,7 +47,7 @@
 def make_inplace_numbermethod(name, spacemeth):
     spacemeth = 'inplace_' + spacemeth.rstrip('_')
     @cpython_api([PyObject, PyObject], PyObject)
-    @func_rename('PyNumber_Inplace%s' % (name,))
+    @func_rename('PyNumber_InPlace%s' % (name,))
     def PyNumber_Method(space, w_o1, w_o2):
         meth = getattr(space, spacemeth)
         return meth(w_o1, w_o2)
@@ -83,9 +83,9 @@
     return space.pow(w_o1, w_o2, w_o3)
 
 @cpython_api([PyObject, PyObject, PyObject], PyObject)
-def PyNumber_InplacePower(space, w_o1, w_o2, w_o3):
+def PyNumber_InPlacePower(space, w_o1, w_o2, w_o3):
     if not space.is_w(w_o3, space.w_None):
         raise OperationError(space.w_ValueError, space.wrap(
-            "PyNumber_InplacePower with non-None modulus is not supported"))
+            "PyNumber_InPlacePower with non-None modulus is not supported"))
     return space.inplace_pow(w_o1, w_o2)
 

Modified: pypy/branch/cpython-extension/pypy/module/cpyext/test/test_number.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/test/test_number.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/test/test_number.py	Wed Apr 21 19:55:55 2010
@@ -19,7 +19,7 @@
         assert api.PyObject_Size(w_l2) == 9
         assert api.PyObject_Size(w_l) == 3
 
-        w_l3 = api.PyNumber_InplaceMultiply(w_l, space.wrap(3))
+        w_l3 = api.PyNumber_InPlaceMultiply(w_l, space.wrap(3))
         assert api.PyObject_Size(w_l) == 9
         assert w_l3 is w_l
 
@@ -32,4 +32,4 @@
         assert 4 == space.unwrap(
             api.PyNumber_Power(space.wrap(3), space.wrap(2), space.wrap(5)))
         assert 9 == space.unwrap(
-            api.PyNumber_InplacePower(space.wrap(3), space.wrap(2), space.w_None))
+            api.PyNumber_InPlacePower(space.wrap(3), space.wrap(2), space.w_None))



More information about the Pypy-commit mailing list