[pypy-commit] pypy ffi-backend: Fixes

arigo noreply at buildbot.pypy.org
Thu Jul 26 13:00:58 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r56468:6776bc67613f
Date: 2012-07-26 13:00 +0200
http://bitbucket.org/pypy/pypy/changeset/6776bc67613f/

Log:	Fixes

diff --git a/pypy/module/_cffi_backend/ctypefunc.py b/pypy/module/_cffi_backend/ctypefunc.py
--- a/pypy/module/_cffi_backend/ctypefunc.py
+++ b/pypy/module/_cffi_backend/ctypefunc.py
@@ -92,7 +92,7 @@
             # call of a variadic function
             if len(args_w) < nargs_declared:
                 raise operationerrfmt(space.w_TypeError,
-                                    "%s expects at least %d arguments, got %d",
+                                  "'%s' expects at least %d arguments, got %d",
                                       self.name, nargs_declared, len(args_w))
             self = self.new_ctypefunc_completing_argtypes(args_w)
             cif_descr = self.cif_descr
diff --git a/pypy/module/_cffi_backend/test/_backend_test_c.py b/pypy/module/_cffi_backend/test/_backend_test_c.py
--- a/pypy/module/_cffi_backend/test/_backend_test_c.py
+++ b/pypy/module/_cffi_backend/test/_backend_test_c.py
@@ -852,7 +852,7 @@
     assert repr(f).startswith(
         "<cdata 'int(*)(int)' calling <function cb at 0x")
     e = py.test.raises(TypeError, f)
-    assert str(e.value) == "%r expects 1 arguments, got 0" % (f,)
+    assert str(e.value) == "'int(*)(int)' expects 1 arguments, got 0"
 
 def test_callback_return_type():
     for rettype in ["signed char", "short", "int", "long", "long long",


More information about the pypy-commit mailing list