Commits

Philip Jenvey committed 422a28c

2to3

  • Participants
  • Parent commits a955992
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/cpyext/test/test_getargs.py

             if (!PyArg_ParseTuple(args, "s#", &buf, &y)) {
                 return NULL;
             }
-            return PyInt_FromSsize_t(y);
+            return PyLong_FromSsize_t(y);
             ''')
         if sys.maxsize < 2**32:
             expected = 5
             expected = -0xfffffffb
         else:
             expected = 0x5ffffffff
-        assert charbuf('12345') == expected
+        assert charbuf(b'12345') == expected
 
     def test_pyarg_parse_with_py_ssize_t(self):
         charbuf = self.import_parser(
             if (!PyArg_ParseTuple(args, "s#", &buf, &y)) {
                 return NULL;
             }
-            return PyInt_FromSsize_t(y);
+            return PyLong_FromSsize_t(y);
             ''', PY_SSIZE_T_CLEAN=True)
-        assert charbuf('12345') == 5
+        assert charbuf(b'12345') == 5