Commits

Amaury Forgeot d'Arc committed 2a1fa9b

module/cpyext: s/INT_real/INT/g

Comments (0)

Files changed (31)

pypy/module/cpyext/api.py

         w_type = get_w_type(space)
         return space.is_w(w_obj_type, w_type)
 
-    check = cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)(
+    check = cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)(
         func_with_new_name(check, check_name))
-    check_exact = cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)(
+    check_exact = cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)(
         func_with_new_name(check_exact, check_name + "Exact"))
     return check, check_exact
 

pypy/module/cpyext/cdatetime.py

 # Check functions
 
 def make_check_function(func_name, type_name):
-    @cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+    @cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
     @func_renamer(func_name)
     def check(space, w_obj):
         try:
         except OperationError:
             return 0
 
-    @cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+    @cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
     @func_renamer(func_name + "Exact")
     def check_exact(space, w_obj):
         try:
 
 # Constructors
 
-@cpython_api([rffi.INT_real, rffi.INT_real, rffi.INT_real], PyObject)
+@cpython_api([rffi.INT, rffi.INT, rffi.INT], PyObject)
 def PyDate_FromDate(space, year, month, day):
     """Return a datetime.date object with the specified year, month and day.
     """
         w_datetime, "date",
         space.wrap(year), space.wrap(month), space.wrap(day))
 
-@cpython_api([rffi.INT_real, rffi.INT_real, rffi.INT_real, rffi.INT_real], PyObject)
+@cpython_api([rffi.INT, rffi.INT, rffi.INT, rffi.INT], PyObject)
 def PyTime_FromTime(space, hour, minute, second, usecond):
     """Return a ``datetime.time`` object with the specified hour, minute, second and
     microsecond."""
         space.wrap(hour), space.wrap(minute), space.wrap(second),
         space.wrap(usecond))
 
-@cpython_api([rffi.INT_real, rffi.INT_real, rffi.INT_real, rffi.INT_real, rffi.INT_real, rffi.INT_real, rffi.INT_real], PyObject)
+@cpython_api([rffi.INT, rffi.INT, rffi.INT, rffi.INT, rffi.INT, rffi.INT, rffi.INT], PyObject)
 def PyDateTime_FromDateAndTime(space, year, month, day, hour, minute, second, usecond):
     """Return a datetime.datetime object with the specified year, month, day, hour,
     minute, second and microsecond.
     w_method = space.getattr(w_type, space.wrap("fromtimestamp"))
     return space.call(w_method, w_args)
 
-@cpython_api([rffi.INT_real, rffi.INT_real, rffi.INT_real], PyObject)
+@cpython_api([rffi.INT, rffi.INT, rffi.INT], PyObject)
 def PyDelta_FromDSU(space, days, seconds, useconds):
     """Return a datetime.timedelta object representing the given number of days,
     seconds and microseconds.  Normalization is performed so that the resulting
 
 # Accessors
 
-@cpython_api([PyDateTime_Date], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Date], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_GET_YEAR(space, w_obj):
     """Return the year, as a positive int.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("year")))
 
-@cpython_api([PyDateTime_Date], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Date], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_GET_MONTH(space, w_obj):
     """Return the month, as an int from 1 through 12.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("month")))
 
-@cpython_api([PyDateTime_Date], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Date], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_GET_DAY(space, w_obj):
     """Return the day, as an int from 1 through 31.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("day")))
 
-@cpython_api([PyDateTime_DateTime], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_DateTime], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_DATE_GET_HOUR(space, w_obj):
     """Return the hour, as an int from 0 through 23.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("hour")))
 
-@cpython_api([PyDateTime_DateTime], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_DateTime], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_DATE_GET_MINUTE(space, w_obj):
     """Return the minute, as an int from 0 through 59.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("minute")))
 
-@cpython_api([PyDateTime_DateTime], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_DateTime], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_DATE_GET_SECOND(space, w_obj):
     """Return the second, as an int from 0 through 59.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("second")))
 
-@cpython_api([PyDateTime_DateTime], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_DateTime], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_DATE_GET_MICROSECOND(space, w_obj):
     """Return the microsecond, as an int from 0 through 999999.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("microsecond")))
 
-@cpython_api([PyDateTime_Time], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Time], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_TIME_GET_HOUR(space, w_obj):
     """Return the hour, as an int from 0 through 23.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("hour")))
 
-@cpython_api([PyDateTime_Time], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Time], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_TIME_GET_MINUTE(space, w_obj):
     """Return the minute, as an int from 0 through 59.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("minute")))
 
-@cpython_api([PyDateTime_Time], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Time], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_TIME_GET_SECOND(space, w_obj):
     """Return the second, as an int from 0 through 59.
     """
     return space.int_w(space.getattr(w_obj, space.wrap("second")))
 
-@cpython_api([PyDateTime_Time], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Time], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_TIME_GET_MICROSECOND(space, w_obj):
     """Return the microsecond, as an int from 0 through 999999.
     """
 # But it does not seem possible to expose a different structure
 # for types defined in a python module like lib/datetime.py.
 
-@cpython_api([PyDateTime_Delta], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Delta], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_DELTA_GET_DAYS(space, w_obj):
     return space.int_w(space.getattr(w_obj, space.wrap("days")))
 
-@cpython_api([PyDateTime_Delta], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Delta], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_DELTA_GET_SECONDS(space, w_obj):
     return space.int_w(space.getattr(w_obj, space.wrap("seconds")))
 
-@cpython_api([PyDateTime_Delta], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyDateTime_Delta], rffi.INT, error=CANNOT_FAIL)
 def PyDateTime_DELTA_GET_MICROSECONDS(space, w_obj):
     return space.int_w(space.getattr(w_obj, space.wrap("microseconds")))

pypy/module/cpyext/dictobject.py

         return None
     return borrow_from(w_dict, w_res)
 
-@cpython_api([PyObject, PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, PyObject], rffi.INT, error=-1)
 def PyDict_SetItem(space, w_dict, w_key, w_obj):
     if PyDict_Check(space, w_dict):
         space.setitem(w_dict, w_key, w_obj)
     else:
         PyErr_BadInternalCall(space)
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyDict_DelItem(space, w_dict, w_key):
     if PyDict_Check(space, w_dict):
         space.delitem(w_dict, w_key)
     else:
         PyErr_BadInternalCall(space)
 
-@cpython_api([PyObject, CONST_STRING, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, CONST_STRING, PyObject], rffi.INT, error=-1)
 def PyDict_SetItemString(space, w_dict, key_ptr, w_obj):
     if PyDict_Check(space, w_dict):
         key = rffi.charp2str(key_ptr)
         return None
     return borrow_from(w_dict, w_res)
 
-@cpython_api([PyObject, rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.CCHARP], rffi.INT, error=-1)
 def PyDict_DelItemString(space, w_dict, key_ptr):
     """Remove the entry in dictionary p which has a key specified by the string
     key.  Return 0 on success or -1 on failure."""
     len(p) on a dictionary."""
     return space.len_w(w_obj)
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyDict_Contains(space, w_obj, w_value):
     """Determine if dictionary p contains key.  If an item in p is matches
     key, return 1, otherwise return 0.  On error, return -1.
     """
     return space.call_method(w_obj, "copy")
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyDict_Update(space, w_obj, w_other):
     """This is the same as PyDict_Merge(a, b, 1) in C, or a.update(b) in
     Python.  Return 0 on success or -1 if an exception was raised.
     dictionary, as in the dictionary method dict.items()."""
     return space.call_method(w_obj, "items")
 
-@cpython_api([PyObject, Py_ssize_tP, PyObjectP, PyObjectP], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, Py_ssize_tP, PyObjectP, PyObjectP], rffi.INT, error=CANNOT_FAIL)
 def PyDict_Next(space, w_dict, ppos, pkey, pvalue):
     """Iterate over all key-value pairs in the dictionary p.  The
     Py_ssize_t referred to by ppos must be initialized to 0

pypy/module/cpyext/eval.py

     w_code = compiling.compile(space, w_source, filename, mode)
     return compiling.eval(space, w_code, w_globals, w_locals)
 
-@cpython_api([CONST_STRING, rffi.INT_real,PyObject, PyObject], PyObject)
+@cpython_api([CONST_STRING, rffi.INT,PyObject, PyObject], PyObject)
 def PyRun_String(space, source, start, w_globals, w_locals):
     """This is a simplified interface to PyRun_StringFlags() below, leaving
     flags set to NULL."""
     filename = "<string>"
     return run_string(space, source, filename, start, w_globals, w_locals)
 
-@cpython_api([FILEP, CONST_STRING, rffi.INT_real, PyObject, PyObject], PyObject)
+@cpython_api([FILEP, CONST_STRING, rffi.INT, PyObject, PyObject], PyObject)
 def PyRun_File(space, fp, filename, start, w_globals, w_locals):
     """This is a simplified interface to PyRun_FileExFlags() below, leaving
     closeit set to 0 and flags set to NULL."""
     return run_string(space, source, filename, start, w_globals, w_locals)
 
 # Undocumented function!
-@cpython_api([PyObject, Py_ssize_tP], rffi.INT_real, error=0)
+@cpython_api([PyObject, Py_ssize_tP], rffi.INT, error=0)
 def _PyEval_SliceIndex(space, w_obj, pi):
     """Extract a slice index from a PyInt or PyLong or an object with the
     nb_index slot defined, and store in *pi.

pypy/module/cpyext/funcobject.py

     assert isinstance(w_method, Method)
     return borrow_from(w_method, w_method.w_class)
 
-@cpython_api([CONST_STRING, CONST_STRING, rffi.INT_real], PyObject)
+@cpython_api([CONST_STRING, CONST_STRING, rffi.INT], PyObject)
 def PyCode_NewEmpty(space, filename, funcname, firstlineno):
     """Creates a new empty code object with the specified source location."""
     return space.wrap(PyCode(space,

pypy/module/cpyext/intobject.py

     """
     return space.wrap(ival) # XXX this is wrong on win64
 
-@cpython_api([CONST_STRING, rffi.CCHARPP, rffi.INT_real], PyObject)
+@cpython_api([CONST_STRING, rffi.CCHARPP, rffi.INT], PyObject)
 def PyInt_FromString(space, str, pend, base):
     """Return a new PyIntObject or PyLongObject based on the string
     value in str, which is interpreted according to the radix in base.  If

pypy/module/cpyext/iterator.py

             raise
     return None
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyIter_Check(space, w_obj):
     """Return true if the object o supports the iterator protocol."""
     try:

pypy/module/cpyext/listobject.py

     """
     return space.newlist([None] * len)
 
-@cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT, error=-1)
 def PyList_SetItem(space, w_list, index, w_item):
     """Set the item at index index in list to item.  Return 0 on success
     or -1 on failure.
     return borrow_from(w_list, wrappeditems[index])
 
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyList_Append(space, w_list, w_item):
     if not isinstance(w_list, W_ListObject):
         PyErr_BadInternalCall(space)
     w_list.append(w_item)
     return 0
 
-@cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT, error=-1)
 def PyList_Insert(space, w_list, index, w_item):
     """Insert the item item into list list in front of index index.  Return
     0 if successful; return -1 and set an exception if unsuccessful.
     tuple(list)."""
     return space.call_function(space.w_tuple, w_list)
 
-@cpython_api([PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject], rffi.INT, error=-1)
 def PyList_Sort(space, w_list):
     """Sort the items of list in place.  Return 0 on success, -1 on
     failure.  This is equivalent to list.sort()."""
     space.call_method(w_list, "sort")
     return 0
 
-@cpython_api([PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject], rffi.INT, error=-1)
 def PyList_Reverse(space, w_list):
     """Reverse the items of list in place.  Return 0 on success, -1 on
     failure.  This is the equivalent of list.reverse()."""
     space.call_method(w_list, "reverse")
     return 0
 
-@cpython_api([PyObject, Py_ssize_t, Py_ssize_t, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t, Py_ssize_t, PyObject], rffi.INT, error=-1)
 def PyList_SetSlice(space, w_list, low, high, w_sequence):
     """Set the slice of list between low and high to the contents of
     itemlist.  Analogous to list[low:high] = itemlist. The itemlist may

pypy/module/cpyext/longobject.py

     num = space.bigint_w(w_long)
     return num.ulonglongmask()
 
-@cpython_api([PyObject, rffi.CArrayPtr(rffi.INT_real)], lltype.Signed,
+@cpython_api([PyObject, rffi.CArrayPtr(rffi.INT)], lltype.Signed,
              error=-1)
 def PyLong_AsLongAndOverflow(space, w_long, overflow_ptr):
     """
     respectively, and return -1; otherwise, set *overflow to 0.  If any other
     exception occurs (for example a TypeError or MemoryError), then -1 will be
     returned and *overflow will be 0."""
-    overflow_ptr[0] = rffi.cast(rffi.INT_real, 0)
+    overflow_ptr[0] = rffi.cast(rffi.INT, 0)
     try:
         return space.int_w(w_long)
     except OperationError, e:
         if not e.match(space, space.w_OverflowError):
             raise
     if space.is_true(space.gt(w_long, space.wrap(0))):
-        overflow_ptr[0] = rffi.cast(rffi.INT_real, 1)
+        overflow_ptr[0] = rffi.cast(rffi.INT, 1)
     else:
-        overflow_ptr[0] = rffi.cast(rffi.INT_real, -1)
+        overflow_ptr[0] = rffi.cast(rffi.INT, -1)
     return -1
 
-@cpython_api([PyObject, rffi.CArrayPtr(rffi.INT_real)], rffi.LONGLONG,
+@cpython_api([PyObject, rffi.CArrayPtr(rffi.INT)], rffi.LONGLONG,
              error=-1)
 def PyLong_AsLongLongAndOverflow(space, w_long, overflow_ptr):
     """
     -1, respectively, and return -1; otherwise, set *overflow to 0.  If any
     other exception occurs (for example a TypeError or MemoryError), then -1
     will be returned and *overflow will be 0."""
-    overflow_ptr[0] = rffi.cast(rffi.INT_real, 0)
+    overflow_ptr[0] = rffi.cast(rffi.INT, 0)
     try:
         return rffi.cast(rffi.LONGLONG, space.r_longlong_w(w_long))
     except OperationError, e:
         if not e.match(space, space.w_OverflowError):
             raise
     if space.is_true(space.gt(w_long, space.wrap(0))):
-        overflow_ptr[0] = rffi.cast(rffi.INT_real, 1)
+        overflow_ptr[0] = rffi.cast(rffi.INT, 1)
     else:
-        overflow_ptr[0] = rffi.cast(rffi.INT_real, -1)
+        overflow_ptr[0] = rffi.cast(rffi.INT, -1)
     return -1
 
 @cpython_api([lltype.Float], PyObject)
     OverflowError exception is raised and -1.0 will be returned."""
     return space.float_w(space.float(w_long))
 
-@cpython_api([CONST_STRING, rffi.CCHARPP, rffi.INT_real], PyObject)
+@cpython_api([CONST_STRING, rffi.CCHARPP, rffi.INT], PyObject)
 def PyLong_FromString(space, str, pend, base):
     """Return a new PyLongObject based on the string value in str, which is
     interpreted according to the radix in base.  If pend is non-NULL,
 def _PyLong_NumBits(space, w_long):
     return space.uint_w(space.call_method(w_long, "bit_length"))
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def _PyLong_Sign(space, w_long):
     assert isinstance(w_long, W_LongObject)
     return w_long.num.sign

pypy/module/cpyext/mapping.py

 from pypy.module.cpyext.pyobject import PyObject
 
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyMapping_Check(space, w_obj):
     """Return 1 if the object provides mapping protocol, and 0 otherwise.  This
     function always succeeds."""
     w_key = space.wrap(rffi.charp2str(key))
     return space.getitem(w_obj, w_key)
 
-@cpython_api([PyObject, CONST_STRING, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, CONST_STRING, PyObject], rffi.INT, error=-1)
 def PyMapping_SetItemString(space, w_obj, key, w_value):
     """Map the object key to the value v in object o. Returns -1 on failure.
     This is the equivalent of the Python statement o[key] = v."""
     space.setitem(w_obj, w_key, w_value)
     return 0
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyMapping_HasKey(space, w_obj, w_key):
     """Return 1 if the mapping object has the key key and 0 otherwise.
     This is equivalent to o[key], returning True on success and False
     except:
         return 0
 
-@cpython_api([PyObject, CONST_STRING], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, CONST_STRING], rffi.INT, error=CANNOT_FAIL)
 def PyMapping_HasKeyString(space, w_obj, key):
     """Return 1 if the mapping object has the key key and 0 otherwise.
     This is equivalent to o[key], returning True on success and False

pypy/module/cpyext/methodobject.py

     'PyMethodDef',
     [('ml_name', rffi.CCHARP),
      ('ml_meth', PyCFunction_typedef),
-     ('ml_flags', rffi.INT_real),
+     ('ml_flags', rffi.INT),
      ('ml_doc', rffi.CCHARP),
      ])
 

pypy/module/cpyext/modsupport.py

 # This is actually the Py_InitModule4 function,
 # renamed to refuse modules built against CPython headers.
 @cpython_api([CONST_STRING, lltype.Ptr(PyMethodDef), CONST_STRING,
-              PyObject, rffi.INT_real], PyObject)
+              PyObject, rffi.INT], PyObject)
 def _Py_InitPyPyModule(space, name, methods, doc, w_self, apiver):
     """
     Create a new module object based on a name and table of functions, returning
             dict_w[methodname] = w_obj
 
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyModule_Check(space, w_obj):
     w_type = space.gettypeobject(Module.typedef)
     w_obj_type = space.type(w_obj)

pypy/module/cpyext/number.py

 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.tool.sourcetools import func_with_new_name
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyIndex_Check(space, w_obj):
     """Returns True if o is an index integer (has the nb_index slot of the
     tp_as_number structure filled in).
     except OperationError:
         return 0
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyNumber_Check(space, w_obj):
     """Returns 1 if the object o provides numeric protocols, and false otherwise.
     This function always succeeds."""

pypy/module/cpyext/object.py

 def _PyObject_GetDictPtr(space, op):
     return lltype.nullptr(PyObjectP.TO)
 
-@cpython_api([PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject], rffi.INT, error=-1)
 def PyObject_IsTrue(space, w_obj):
     return space.is_true(w_obj)
 
-@cpython_api([PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject], rffi.INT, error=-1)
 def PyObject_Not(space, w_obj):
     return not space.is_true(w_obj)
 
     name = rffi.charp2str(name_ptr)
     return space.getattr(w_obj, space.wrap(name))
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyObject_HasAttr(space, w_obj, w_name):
     try:
         w_res = operation.hasattr(space, w_obj, w_name)
     except OperationError:
         return 0
 
-@cpython_api([PyObject, CONST_STRING], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, CONST_STRING], rffi.INT, error=CANNOT_FAIL)
 def PyObject_HasAttrString(space, w_obj, name_ptr):
     try:
         name = rffi.charp2str(name_ptr)
     except OperationError:
         return 0
 
-@cpython_api([PyObject, PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_SetAttr(space, w_obj, w_name, w_value):
     operation.setattr(space, w_obj, w_name, w_value)
     return 0
 
-@cpython_api([PyObject, CONST_STRING, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, CONST_STRING, PyObject], rffi.INT, error=-1)
 def PyObject_SetAttrString(space, w_obj, name_ptr, w_value):
     w_name = space.wrap(rffi.charp2str(name_ptr))
     operation.setattr(space, w_obj, w_name, w_value)
     return 0
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_DelAttr(space, w_obj, w_name):
     """Delete attribute named attr_name, for object o. Returns -1 on failure.
     This is the equivalent of the Python statement del o.attr_name."""
     space.delattr(w_obj, w_name)
     return 0
 
-@cpython_api([PyObject, CONST_STRING], rffi.INT_real, error=-1)
+@cpython_api([PyObject, CONST_STRING], rffi.INT, error=-1)
 def PyObject_DelAttrString(space, w_obj, name_ptr):
     """Delete attribute named attr_name, for object o. Returns -1 on failure.
     This is the equivalent of the Python statement del o.attr_name."""
 def PyObject_Size(space, w_obj):
     return space.len_w(w_obj)
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyCallable_Check(space, w_obj):
     """Determine if the object o is callable.  Return 1 if the object is callable
     and 0 otherwise.  This function always succeeds."""
     This is the equivalent of the Python expression o[key]."""
     return space.getitem(w_obj, w_key)
 
-@cpython_api([PyObject, PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_SetItem(space, w_obj, w_key, w_value):
     """Map the object key to the value v.  Returns -1 on failure.  This is the
     equivalent of the Python statement o[key] = v."""
     space.setitem(w_obj, w_key, w_value)
     return 0
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_DelItem(space, w_obj, w_key):
     """Delete the mapping for key from o.  Returns -1 on failure. This is the
     equivalent of the Python statement del o[key]."""
     function."""
     return space.call_function(space.w_unicode, w_obj)
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_Compare(space, w_o1, w_o2):
     """
     Compare the values of o1 and o2 using a routine provided by o1, if one
     expression cmp(o1, o2)."""
     return space.int_w(space.cmp(w_o1, w_o2))
 
-@cpython_api([PyObject, PyObject, rffi.INT_real], PyObject)
+@cpython_api([PyObject, PyObject, rffi.INT], PyObject)
 def PyObject_RichCompare(space, w_o1, w_o2, opid_int):
     """Compare the values of o1 and o2 using the operation specified by opid,
     which must be one of Py_LT, Py_LE, Py_EQ,
     if opid == Py_GE: return space.ge(w_o1, w_o2)
     PyErr_BadInternalCall(space)
 
-@cpython_api([PyObject, PyObject, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, rffi.INT], rffi.INT, error=-1)
 def PyObject_RichCompareBool(space, ref1, ref2, opid):
     """Compare the values of o1 and o2 using the operation specified by opid,
     which must be one of Py_LT, Py_LE, Py_EQ,
     w_descr = object_getattribute(space)
     return space.get_and_call_function(w_descr, w_obj, w_name)
 
-@cpython_api([PyObject, PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_GenericSetAttr(space, w_obj, w_name, w_value):
     """Generic attribute setter function that is meant to be put into a type
     object's tp_setattro slot.  It looks for a data descriptor in the
         space.get_and_call_function(w_descr, w_obj, w_name)
     return 0
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_IsInstance(space, w_inst, w_cls):
     """Returns 1 if inst is an instance of the class cls or a subclass of
     cls, or 0 if not.  On error, returns -1 and sets an exception.  If
     from pypy.module.__builtin__.abstractinst import abstract_isinstance_w
     return abstract_isinstance_w(space, w_inst, w_cls)
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyObject_IsSubclass(space, w_derived, w_cls):
     """Returns 1 if the class derived is identical to or derived from the class
     cls, otherwise returns 0.  In case of an error, returns -1. If cls
     from pypy.module.__builtin__.abstractinst import abstract_issubclass_w
     return abstract_issubclass_w(space, w_derived, w_cls)
 
-@cpython_api([PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject], rffi.INT, error=-1)
 def PyObject_AsFileDescriptor(space, w_obj):
     """Derives a file descriptor from a Python object.  If the object is an
     integer or long integer, its value is returned.  If not, the object's
             space.w_ValueError, space.wrap(
             "file descriptor cannot be a negative integer"))
 
-    return rffi.cast(rffi.INT_real, fd)
+    return rffi.cast(rffi.INT, fd)
 
 
 @cpython_api([PyObject], lltype.Signed, error=-1)
     This is the equivalent of the Python expression hash(o)."""
     return space.int_w(space.hash(w_obj))
 
-@cpython_api([PyObject, rffi.CCHARPP, Py_ssize_tP], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.CCHARPP, Py_ssize_tP], rffi.INT, error=-1)
 def PyObject_AsCharBuffer(space, obj, bufferp, sizep):
     """Returns a pointer to a read-only memory location usable as
     character-based input.  The obj argument must support the single-segment
 # Also in include/object.h
 Py_PRINT_RAW = 1 # No string quotes etc.
 
-@cpython_api([PyObject, FILEP, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, FILEP, rffi.INT], rffi.INT, error=-1)
 def PyObject_Print(space, w_obj, fp, flags):
     """Print an object o, on file fp.  Returns -1 on error.  The flags argument
     is used to enable certain printing options.  The only option currently
 
 PyFile_Check, PyFile_CheckExact = build_type_checkers("File", W_File)
 
-@cpython_api([PyObject, rffi.INT_real], PyObject)
+@cpython_api([PyObject, rffi.INT], PyObject)
 def PyFile_GetLine(space, w_obj, n):
     """
     Equivalent to p.readline([n]), this function reads one line from the

pypy/module/cpyext/pyerrors.py

                                       space.wrap(msg))
     raise OperationError(w_type, w_error)
 
-@cpython_api([], rffi.INT_real, error=-1)
+@cpython_api([], rffi.INT, error=-1)
 def PyErr_CheckSignals(space):
     """
     This function interacts with Python's signal handling.  It checks whether a
     # XXX implement me
     return 0
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyErr_GivenExceptionMatches(space, w_given, w_exc):
     """Return true if the given exception matches the exception in exc.  If
     exc is a class object, this also returns true when given is an instance
         w_given_type = w_given
     return space.exception_match(w_given_type, w_exc)
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyErr_ExceptionMatches(space, w_exc):
     """Equivalent to PyErr_GivenExceptionMatches(PyErr_Occurred(), exc).  This
     should only be called when an exception is actually set; a memory access
     return PyErr_GivenExceptionMatches(space, w_type, w_exc)
 
 
-@cpython_api([PyObject, CONST_STRING, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, CONST_STRING, rffi.INT], rffi.INT, error=-1)
 def PyErr_WarnEx(space, w_category, message_ptr, stacklevel):
     """Issue a warning message.  The category argument is a warning category (see
     below) or NULL; the message argument is a message string.  stacklevel is a
     space.call_function(w_warn, w_message, w_category, w_stacklevel)
     return 0
 
-@cpython_api([PyObject, CONST_STRING], rffi.INT_real, error=-1)
+@cpython_api([PyObject, CONST_STRING], rffi.INT, error=-1)
 def PyErr_Warn(space, w_category, message):
     """Issue a warning message.  The category argument is a warning category (see
     below) or NULL; the message argument is a message string.  The warning will
     Deprecated; use PyErr_WarnEx() instead."""
     return PyErr_WarnEx(space, w_category, message, 1)
 
-@cpython_api([rffi.INT_real], lltype.Void)
+@cpython_api([rffi.INT], lltype.Void)
 def PyErr_PrintEx(space, set_sys_last_vars):
     """Print a standard traceback to sys.stderr and clear the error indicator.
     Call this function only when the error indicator is set.  (Otherwise it will
     """Alias for PyErr_PrintEx(1)."""
     PyErr_PrintEx(space, 1)
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyTraceBack_Print(space, w_tb, w_file):
     space.call_method(w_file, "write", space.wrap(
         'Traceback (most recent call last):\n'))

pypy/module/cpyext/pystate.py

 def PyEval_InitThreads(space):
     return
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyEval_ThreadsInitialized(space):
     return 1
 

pypy/module/cpyext/pythonrun.py

 from pypy.module.cpyext.api import cpython_api, CANNOT_FAIL
 from pypy.module.cpyext.state import State
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def Py_IsInitialized(space):
     return 1
 

pypy/module/cpyext/sequence.py

     """
     return space.mul(w_obj, space.wrap(count))
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PySequence_Check(space, w_obj):
     """Return 1 if the object provides sequence protocol, and 0 otherwise.
     This function always succeeds."""
     failure. This is the equivalent of the Python expression o[i1:i2]."""
     return space.getslice(w_obj, space.wrap(start), space.wrap(end))
 
-@cpython_api([PyObject, Py_ssize_t, Py_ssize_t, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t, Py_ssize_t, PyObject], rffi.INT, error=-1)
 def PySequence_SetSlice(space, w_obj, start, end, w_value):
     """Assign the sequence object v to the slice in sequence object o from i1 to
     i2.  This is the equivalent of the Python statement o[i1:i2] = v."""
     space.setslice(w_obj, space.wrap(start), space.wrap(end), w_value)
     return 0
 
-@cpython_api([PyObject, Py_ssize_t, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t, Py_ssize_t], rffi.INT, error=-1)
 def PySequence_DelSlice(space, w_obj, start, end):
     """Delete the slice in sequence object o from i1 to i2.  Returns -1 on
     failure.  This is the equivalent of the Python statement del o[i1:i2]."""
     This is the equivalent of the Python expression o1 + o2."""
     return space.add(w_o1, w_o2)
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PySequence_Contains(space, w_obj, w_value):
     """Determine if o contains value.  If an item in o is equal to value,
     return 1, otherwise return 0. On error, return -1.  This is
     """
     return space.iter(w_seq)
 
-@cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT, error=-1)
 def PySequence_SetItem(space, w_o, i, w_v):
     """Assign object v to the ith element of o.  Returns -1 on failure.  This
     is the equivalent of the Python statement o[i] = v.  This function does
     space.setitem(w_o, space.wrap(i), w_v)
     return 0
 
-@cpython_api([PyObject, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t], rffi.INT, error=-1)
 def PySequence_DelItem(space, w_o, i):
     """Delete the ith element of object o.  Returns -1 on failure.  This is the
     equivalent of the Python statement del o[i]."""

pypy/module/cpyext/sliceobject.py

     return W_SliceObject(w_start, w_stop, w_step)
 
 @cpython_api([PySliceObject, Py_ssize_t, Py_ssize_tP, Py_ssize_tP, Py_ssize_tP,
-                Py_ssize_tP], rffi.INT_real, error=-1)
+                Py_ssize_tP], rffi.INT, error=-1)
 def PySlice_GetIndicesEx(space, w_slice, length, start_p, stop_p, step_p,
                          slicelength_p):
     """Usable replacement for PySlice_GetIndices().  Retrieve the start,
     return 0
 
 @cpython_api([PySliceObject, Py_ssize_t, Py_ssize_tP, Py_ssize_tP, Py_ssize_tP],
-                rffi.INT_real, error=-1)
+                rffi.INT, error=-1)
 def PySlice_GetIndices(space, w_slice, length, start_p, stop_p, step_p):
     """Retrieve the start, stop and step indices from the slice object slice,
     assuming a sequence of length length. Treats indices greater than

pypy/module/cpyext/slotdefs.py

         args_w = space.fixedview(w_args)
         other_w = args_w[0]
         return generic_cpy_call(space, func_target,
-            w_self, other_w, rffi.cast(rffi.INT_real, OP_CONST))
+            w_self, other_w, rffi.cast(rffi.INT, OP_CONST))
     return inner
 
 richcmp_eq = get_richcmp_func(Py_EQ)
     w_args_new = space.newtuple(args_w)
     return space.call(w_func, w_args_new, w_kwds)
 
-@cpython_api([PyObject, PyObject, PyObject], rffi.INT_real, error=-1, external=False)
+@cpython_api([PyObject, PyObject, PyObject], rffi.INT, error=-1, external=False)
 def slot_tp_init(space, w_self, w_args, w_kwds):
     w_descr = space.lookup(w_self, '__init__')
     args = Arguments.frompacked(space, w_args, w_kwds)
         if setattr_fn is None:
             return
 
-        @cpython_api([PyObject, PyObject, PyObject], rffi.INT_real,
+        @cpython_api([PyObject, PyObject, PyObject], rffi.INT,
                      error=-1, external=True) # XXX should not be exported
         @func_renamer("cpyext_tp_setattro_%s" % (typedef.name,))
         def slot_tp_setattro(space, w_self, w_name, w_value):

pypy/module/cpyext/stringobject.py

         ref_str.c_buffer = rffi.str2charp(s)
     return ref_str.c_buffer
 
-@cpython_api([PyObject, rffi.CCHARPP, rffi.CArrayPtr(Py_ssize_t)], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.CCHARPP, rffi.CArrayPtr(Py_ssize_t)], rffi.INT, error=-1)
 def PyString_AsStringAndSize(space, ref, buffer, length):
     if not PyString_Check(space, ref):
         raise OperationError(space.w_TypeError, space.wrap(
         w_obj = from_ref(space, ref)
         return space.len_w(w_obj)
 
-@cpython_api([PyObjectP, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObjectP, Py_ssize_t], rffi.INT, error=-1)
 def _PyString_Resize(space, ref, newsize):
     """A way to resize a string object even though it is "immutable". Only use this to
     build up a brand new string object; don't use this if the string may already be

pypy/module/cpyext/structmember.py

     return w_result
 
 
-@cpython_api([PyObject, lltype.Ptr(PyMemberDef), PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, lltype.Ptr(PyMemberDef), PyObject], rffi.INT, error=-1)
 def PyMember_SetOne(space, obj, w_member, w_value):
     addr = rffi.cast(ADDR, obj)
     addr += w_member.c_offset

pypy/module/cpyext/stubgen.py

 
 C_TYPE_TO_PYPY_TYPE = {
         "void": "lltype.Void",
-        "int": "rffi.INT_real",
+        "int": "rffi.INT",
         "PyTypeObject*": "PyTypeObjectPtr",
         "PyVarObject*": "PyObject",
         "const char*": "rffi.CCHARP",

pypy/module/cpyext/stubs.py

 def _PyObject_Del(space, op):
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyObject_CheckBuffer(space, obj):
     """Return 1 if obj supports the buffer interface otherwise 0."""
     raise NotImplementedError
 
-@cpython_api([PyObject, Py_buffer, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_buffer, rffi.INT], rffi.INT, error=-1)
 def PyObject_GetBuffer(space, obj, view, flags):
     """Export obj into a Py_buffer, view.  These arguments must
     never be NULL.  The flags argument is a bit field indicating what
     ~Py_buffer.format."""
     raise NotImplementedError
 
-@cpython_api([Py_buffer, lltype.Char], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([Py_buffer, lltype.Char], rffi.INT, error=CANNOT_FAIL)
 def PyBuffer_IsContiguous(space, view, fortran):
     """Return 1 if the memory defined by the view is C-style (fortran is
     'C') or Fortran-style (fortran is 'F') contiguous or either one
     (fortran is 'A').  Return 0 otherwise."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real, Py_ssize_t, Py_ssize_t, Py_ssize_t, lltype.Char], lltype.Void)
+@cpython_api([rffi.INT, Py_ssize_t, Py_ssize_t, Py_ssize_t, lltype.Char], lltype.Void)
 def PyBuffer_FillContiguousStrides(space, ndim, shape, strides, itemsize, fortran):
     """Fill the strides array with byte-strides of a contiguous (C-style if
     fortran is 'C' or Fortran-style if fortran is 'F' array of the
     given shape with the given number of bytes per element."""
     raise NotImplementedError
 
-@cpython_api([Py_buffer, PyObject, rffi.VOIDP, Py_ssize_t, rffi.INT_real, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([Py_buffer, PyObject, rffi.VOIDP, Py_ssize_t, rffi.INT, rffi.INT], rffi.INT, error=-1)
 def PyBuffer_FillInfo(space, view, obj, buf, len, readonly, infoflags):
     """Fill in a buffer-info structure, view, correctly for an exporter that can
     only share a contiguous chunk of memory of "unsigned bytes" of the given
     memoryview object."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT_real, lltype.Char], PyObject)
+@cpython_api([PyObject, rffi.INT, lltype.Char], PyObject)
 def PyMemoryView_GetContiguous(space, obj, buffertype, order):
     """Create a memoryview object to a contiguous chunk of memory (in either
     'C' or 'F'ortran order) from an object that defines the buffer
     new bytes object."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyMemoryView_Check(space, obj):
     """Return true if the object obj is a memoryview object.  It is not
     currently allowed to create subclasses of memoryview."""
     check its type, you must do it yourself or you will risk crashes."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyByteArray_Check(space, o):
     """Return true if the object o is a bytearray object or an instance of a
     subtype of the bytearray type."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyByteArray_CheckExact(space, o):
     """Return true if the object o is a bytearray object, but not an instance of a
     subtype of the bytearray type."""
     NULL pointer."""
     raise NotImplementedError
 
-@cpython_api([PyObject, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t], rffi.INT, error=-1)
 def PyByteArray_Resize(space, bytearray, len):
     """Resize the internal buffer of bytearray to len."""
     raise NotImplementedError
     """Macro version of PyByteArray_Size()."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyCell_Check(space, ob):
     """Return true if ob is a cell object; ob must not be NULL."""
     raise NotImplementedError
     borrow_from()
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyCell_Set(space, cell, value):
     """Set the contents of the cell object cell to value.  This releases the
     reference to any current content of the cell. value may be NULL.  cell
     be a cell object."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyClass_IsSubclass(space, klass, base):
     """Return true if klass is a subclass of base. Return false in all other cases."""
     raise NotImplementedError
     used as the positional and keyword parameters to the object's constructor."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyCode_Check(space, co):
     """Return true if co is a code object"""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyCode_GetNumFree(space, co):
     """Return the number of free variables in co."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real, rffi.INT_real, rffi.INT_real, rffi.INT_real, PyObject, PyObject, PyObject, PyObject, PyObject, PyObject, PyObject, PyObject, rffi.INT_real, PyObject], PyCodeObject)
+@cpython_api([rffi.INT, rffi.INT, rffi.INT, rffi.INT, PyObject, PyObject, PyObject, PyObject, PyObject, PyObject, PyObject, PyObject, rffi.INT, PyObject], PyCodeObject)
 def PyCode_New(space, argcount, nlocals, stacksize, flags, code, consts, names, varnames, freevars, cellvars, filename, name, firstlineno, lnotab):
     """Return a new code object.  If you need a dummy code object to
     create a frame, use PyCode_NewEmpty() instead.  Calling
     version since the definition of the bytecode changes often."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject], rffi.INT, error=-1)
 def PyCodec_Register(space, search_function):
     """Register a new codec search function.
     
     """Get a StreamWriter factory function for the given encoding."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP, PyObject], rffi.INT_real, error=-1)
+@cpython_api([rffi.CCHARP, PyObject], rffi.INT, error=-1)
 def PyCodec_RegisterError(space, name, error):
     """Register the error handling callback function error under the given name.
     This callback function will be called by a codec when it encounters
     instead."""
     raise NotImplementedError
 
-@cpython_api([rffi.DOUBLE, lltype.Char, rffi.INT_real, rffi.INT_real, rffi.INTP], rffi.CCHARP)
+@cpython_api([rffi.DOUBLE, lltype.Char, rffi.INT, rffi.INT, rffi.INTP], rffi.CCHARP)
 def PyOS_double_to_string(space, val, format_code, precision, flags, ptype):
     """Convert a double val to a string using supplied
     format_code, precision, and flags.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyTZInfo_Check(space, ob):
     """Return true if ob is of type PyDateTime_TZInfoType or a subtype of
     PyDateTime_TZInfoType.  ob must not be NULL.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyTZInfo_CheckExact(space, ob):
     """Return true if ob is of type PyDateTime_TZInfoType. ob must not be
     NULL.
 def PyDescr_NewClassMethod(space, type, method):
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyDescr_IsData(space, descr):
     """Return true if the descriptor objects descr describes a data attribute, or
     false if it describes a method.  descr must be a descriptor object; there is
     """
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, rffi.INT], rffi.INT, error=-1)
 def PyDict_Merge(space, a, b, override):
     """Iterate over mapping object b adding key-value pairs to dictionary a.
     b may be a dictionary, or any object supporting PyMapping_Keys()
     """
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, rffi.INT], rffi.INT, error=-1)
 def PyDict_MergeFromSeq2(space, a, seq2, override):
     """Update or merge into dictionary a, from the key-value pairs in seq2.
     seq2 must be an iterable object producing iterable objects of length 2,
     """
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real], PyObject)
+@cpython_api([rffi.INT], PyObject)
 def PyErr_SetFromWindowsErr(space, ierr):
     """This is a convenience function to raise WindowsError. If called with
     ierr of 0, the error code returned by a call to GetLastError()
     Return value: always NULL."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT_real], PyObject)
+@cpython_api([PyObject, rffi.INT], PyObject)
 def PyErr_SetExcFromWindowsErr(space, type, ierr):
     """Similar to PyErr_SetFromWindowsErr(), with an additional parameter
     specifying the exception type to be raised. Availability: Windows.
     Return value: always NULL."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real, rffi.CCHARP], PyObject)
+@cpython_api([rffi.INT, rffi.CCHARP], PyObject)
 def PyErr_SetFromWindowsErrWithFilename(space, ierr, filename):
     """Similar to PyErr_SetFromWindowsErr(), with the additional behavior that
     if filename is not NULL, it is passed to the constructor of
     Return value: always NULL."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT_real, rffi.CCHARP], PyObject)
+@cpython_api([PyObject, rffi.INT, rffi.CCHARP], PyObject)
 def PyErr_SetExcFromWindowsErrWithFilename(space, type, ierr, filename):
     """Similar to PyErr_SetFromWindowsErrWithFilename(), with an additional
     parameter specifying the exception type to be raised. Availability: Windows.
     Return value: always NULL."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.CCHARP, rffi.CCHARP, rffi.INT_real, rffi.CCHARP, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.CCHARP, rffi.CCHARP, rffi.INT, rffi.CCHARP, PyObject], rffi.INT, error=-1)
 def PyErr_WarnExplicit(space, category, message, filename, lineno, module, registry):
     """Issue a warning message with explicit control over all warning attributes.  This
     is a straightforward wrapper around the Python function
     It may be called without holding the interpreter lock."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([rffi.INT], rffi.INT, error=CANNOT_FAIL)
 def PySignal_SetWakeupFd(space, fd):
     """This utility function specifies a file descriptor to which a '\0' byte will
     be written whenever a signal is received.  It returns the previous such file
     """Return the object attribute of the given exception object."""
     raise NotImplementedError
 
-@cpython_api([PyObject, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t], rffi.INT, error=-1)
 def PyUnicodeDecodeError_GetStart(space, exc, start):
     """Get the start attribute of the given exception object and place it into
     *start.  start must not be NULL.  Return 0 on success, -1 on
     failure."""
     raise NotImplementedError
 
-@cpython_api([PyObject, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t], rffi.INT, error=-1)
 def PyUnicodeDecodeError_SetStart(space, exc, start):
     """Set the start attribute of the given exception object to start.  Return
     0 on success, -1 on failure."""
     raise NotImplementedError
 
-@cpython_api([PyObject, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t], rffi.INT, error=-1)
 def PyUnicodeDecodeError_GetEnd(space, exc, end):
     """Get the end attribute of the given exception object and place it into
     *end.  end must not be NULL.  Return 0 on success, -1 on
     failure."""
     raise NotImplementedError
 
-@cpython_api([PyObject, Py_ssize_t], rffi.INT_real, error=-1)
+@cpython_api([PyObject, Py_ssize_t], rffi.INT, error=-1)
 def PyUnicodeDecodeError_SetEnd(space, exc, end):
     """Set the end attribute of the given exception object to end.  Return 0
     on success, -1 on failure."""
     """Return the reason attribute of the given exception object."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.CCHARP], rffi.INT, error=-1)
 def PyUnicodeDecodeError_SetReason(space, exc, reason):
     """Set the reason attribute of the given exception object to reason.  Return
     0 on success, -1 on failure."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP], rffi.INT_real, error=1)
+@cpython_api([rffi.CCHARP], rffi.INT, error=1)
 def Py_EnterRecursiveCall(space, where):
     """Marks a point where a recursive C-level call is about to be performed.
     
     successful invocation of Py_EnterRecursiveCall()."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP, rffi.CCHARP, rffi.INT_real], PyObject)
+@cpython_api([FILE, rffi.CCHARP, rffi.CCHARP, rffi.INT], PyObject)
 def PyFile_FromFile(space, fp, name, mode, close):
     """Create a new PyFileObject from the already-open standard C file
     pointer, fp.  The function close will be called when the file should be
     borrow_from()
     raise NotImplementedError
 
-@cpython_api([PyFileObject, rffi.INT_real], lltype.Void)
+@cpython_api([PyFileObject, rffi.INT], lltype.Void)
 def PyFile_SetBufSize(space, p, n):
     """Available on systems with setvbuf() only.  This should only be called
     immediately after file object creation."""
     raise NotImplementedError
 
-@cpython_api([PyFileObject, rffi.CCHARP], rffi.INT_real, error=0)
+@cpython_api([PyFileObject, rffi.CCHARP], rffi.INT, error=0)
 def PyFile_SetEncoding(space, p, enc):
     """Set the file's encoding for Unicode output to enc. Return 1 on success and 0
     on failure.
     """
     raise NotImplementedError
 
-@cpython_api([PyFileObject, rffi.CCHARP, rffi.CCHARP], rffi.INT_real, error=0)
+@cpython_api([PyFileObject, rffi.CCHARP, rffi.CCHARP], rffi.INT, error=0)
 def PyFile_SetEncodingAndErrors(space, p, enc, errors):
     """Set the file's encoding for Unicode output to enc, and its error
     mode to err. Return 1 on success and 0 on failure.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT_real], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject, rffi.INT], rffi.INT, error=CANNOT_FAIL)
 def PyFile_SoftSpace(space, p, newflag):
     """
     This function exists for internal use by the interpreter.  Set the
     but doing so should not be needed."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, rffi.INT], rffi.INT, error=-1)
 def PyFile_WriteObject(space, obj, p, flags):
     """
     Write object obj to file object p.  The only supported flag for flags is
     appropriate exception will be set."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP, PyObject], rffi.INT_real, error=-1)
+@cpython_api([rffi.CCHARP, PyObject], rffi.INT, error=-1)
 def PyFile_WriteString(space, s, p):
     """Write string s to file object p.  Return 0 on success or -1 on
     failure; the appropriate exception will be set."""
     """
     raise NotImplementedError
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyFloat_ClearFreeList(space):
     """Clear the float free list. Return the number of items that could not
     be freed.
     borrow_from()
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyFunction_SetDefaults(space, op, defaults):
     """Set the argument default values for the function object op. defaults must be
     Py_None or a tuple.
     borrow_from()
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyFunction_SetClosure(space, op, closure):
     """Set the closure associated with the function object op. closure must be
     Py_None or a tuple of cell objects.
     extension modules."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyGen_Check(space, ob):
     """Return true if ob is a generator object; ob must not be NULL."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyGen_CheckExact(space, ob):
     """Return true if ob's type is PyGen_Type is a generator object; ob must not
     be NULL."""
     -1 as level, meaning relative import."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP, PyObject, PyObject, PyObject, rffi.INT_real], PyObject)
+@cpython_api([rffi.CCHARP, PyObject, PyObject, PyObject, rffi.INT], PyObject)
 def PyImport_ImportModuleLevel(space, name, globals, locals, fromlist, level):
     """Import a module.  This is best described by referring to the built-in Python
     function __import__(), as the standard __import__() function calls
     """For internal use only."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([rffi.CCHARP], rffi.INT, error=-1)
 def PyImport_ImportFrozenModule(space, name):
     """Load a frozen module named name.  Return 1 for success, 0 if the
     module is not found, and -1 with an exception set if the initialization
     reload the module if it was already imported.)"""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP, rffi.VOIDP], rffi.INT_real, error=-1)
+@cpython_api([rffi.CCHARP, rffi.VOIDP], rffi.INT, error=-1)
 def PyImport_AppendInittab(space, name, initfunc):
     """Add a single module to the existing table of built-in modules.  This is a
     convenience wrapper around PyImport_ExtendInittab(), returning -1 if
     Py_Initialize()."""
     raise NotImplementedError
 
-@cpython_api([_inittab], rffi.INT_real, error=-1)
+@cpython_api([_inittab], rffi.INT, error=-1)
 def PyImport_ExtendInittab(space, newtab):
     """Add a collection of modules to the table of built-in modules.  The newtab
     array must end with a sentinel entry which contains NULL for the name
     fails."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real], lltype.Void)
+@cpython_api([rffi.INT], lltype.Void)
 def Py_InitializeEx(space, initsigs):
     """This function works like Py_Initialize() if initsigs is 1. If
     initsigs is 0, it skips initialization registration of signal handlers, which
     sys.version."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real, rffi.CCHARPP, rffi.INT_real], lltype.Void)
+@cpython_api([rffi.INT, rffi.CCHARPP, rffi.INT], lltype.Void)
 def PySys_SetArgvEx(space, argc, argv, updatepath):
     """Set sys.argv based on argc and argv.  These parameters are similar to
     those passed to the program's main() function with the difference that the
     check w/ Guido."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real, rffi.CCHARPP], lltype.Void)
+@cpython_api([rffi.INT, rffi.CCHARPP], lltype.Void)
 def PySys_SetArgv(space, argc, argv):
     """This function works like PySys_SetArgvEx() with updatepath set to 1."""
     raise NotImplementedError
     borrow_from()
     raise NotImplementedError
 
-@cpython_api([lltype.Signed, PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([lltype.Signed, PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyThreadState_SetAsyncExc(space, id, exc):
     """Asynchronously raise an exception in a thread. The id argument is the thread
     id of the target thread; exc is the exception object to be raised. This
     as defined in the system header files)."""
     raise NotImplementedError
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyInt_ClearFreeList(space):
     """Clear the integer free list. Return the number of items that could not
     be freed.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PySeqIter_Check(space, op):
     """Return true if the type of op is PySeqIter_Type.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyCallIter_Check(space, op):
     """Return true if the type of op is PyCallIter_Type.
     """
     """
     raise NotImplementedError
 
-@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.INT_real], PyObject)
+@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.INT], PyObject)
 def PyLong_FromUnicode(space, u, length, base):
     """Convert a sequence of Unicode digits to a Python long integer value.  The first
     parameter, u, points to the first character of the Unicode string, length
     """
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.CCHARP], rffi.INT, error=-1)
 def PyMapping_DelItemString(space, o, key):
     """Remove the mapping for object key from the object o. Return -1 on
     failure.  This is equivalent to the Python statement del o[key]."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyMapping_DelItem(space, o, key):
     """Remove the mapping for object key from the object o. Return -1 on
     failure.  This is equivalent to the Python statement del o[key]."""
     raise NotImplementedError
 
-@cpython_api([lltype.Signed, FILE, rffi.INT_real], lltype.Void)
+@cpython_api([lltype.Signed, FILE, rffi.INT], lltype.Void)
 def PyMarshal_WriteLongToFile(space, value, file, version):
     """Marshal a long integer, value, to file.  This will only write
     the least-significant 32 bits of value; regardless of the size of the
     version indicates the file format."""
     raise NotImplementedError
 
-@cpython_api([PyObject, FILE, rffi.INT_real], lltype.Void)
+@cpython_api([PyObject, FILE, rffi.INT], lltype.Void)
 def PyMarshal_WriteObjectToFile(space, value, file, version):
     """Marshal a Python object, value, to file.
     
     version indicates the file format."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT_real], PyObject)
+@cpython_api([PyObject, rffi.INT], PyObject)
 def PyMarshal_WriteObjectToString(space, value, version):
     """Return a string object containing the marshalled representation of value.
     
     regardless of the native size of long."""
     raise NotImplementedError
 
-@cpython_api([FILE], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([FILE], rffi.INT, error=CANNOT_FAIL)
 def PyMarshal_ReadShortFromFile(space, file):
     """Return a C short from the data stream in a FILE* opened
     for reading.  Only a 16-bit value can be read in using this function,
     changes in your code for properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyMethod_ClearFreeList(space):
     """Clear the free list. Return the total number of freed items.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyModule_CheckExact(space, p):
     """Return true if p is a module object, but not a subtype of
     PyModule_Type.
     SystemError and return NULL."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.INT], rffi.INT, error=-1)
 def PyModule_AddIntMacro(space, module, macro):
     """Add an int constant to module. The name and the value are taken from
     macro. For example PyModule_AddConstant(module, AF_INET) adds the int
     """
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([PyObject, rffi.CCHARP], rffi.INT, error=-1)
 def PyModule_AddStringMacro(space, module, macro):
     """Add a string constant to module.
     """
     raise NotImplementedError
 
-@cpython_api([PyObjectP, PyObjectP], rffi.INT_real, error=-1)
+@cpython_api([PyObjectP, PyObjectP], rffi.INT, error=-1)
 def PyNumber_Coerce(space, p1, p2):
     """This function takes the addresses of two variables of type PyObject*.  If
     the objects pointed to by *p1 and *p2 have the same type, increment their
     Python statement o1, o2 = coerce(o1, o2)."""
     raise NotImplementedError
 
-@cpython_api([PyObjectP, PyObjectP], rffi.INT_real, error=-1)
+@cpython_api([PyObjectP, PyObjectP], rffi.INT, error=-1)
 def PyNumber_CoerceEx(space, p1, p2):
     """This function is similar to PyNumber_Coerce(), except that it returns
     1 when the conversion is not possible and when no error is raised.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT_real], PyObject)
+@cpython_api([PyObject, rffi.INT], PyObject)
 def PyNumber_ToBase(space, n, base):
     """Returns the integer n converted to base as a string with a base
     marker of '0b', '0o', or '0x' if applicable.  When
     """
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject, rffi.INTP], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, rffi.INTP], rffi.INT, error=-1)
 def PyObject_Cmp(space, o1, o2, result):
     """Compare the values of o1 and o2 using a routine provided by o1, if one
     exists, otherwise with a routine provided by o2.  The result of the
     borrow_from()
     raise NotImplementedError
 
-@cpython_api([PyFrameObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyFrameObject], rffi.INT, error=CANNOT_FAIL)
 def PyFrame_GetLineNumber(space, frame):
     """Return the line number that frame is currently executing."""
     raise NotImplementedError
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyEval_GetRestricted(space):
     """If there is a current frame and it is executing in restricted mode, return true,
     otherwise false."""
     changes in your code for properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PySet_Check(space, p):
     """Return true if p is a set object or an instance of a subtype.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyFrozenSet_Check(space, p):
     """Return true if p is a frozenset object or an instance of a
     subtype.
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyAnySet_Check(space, p):
     """Return true if p is a set object, a frozenset object, or an
     instance of a subtype."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyAnySet_CheckExact(space, p):
     """Return true if p is a set object or a frozenset object but
     not an instance of a subtype."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyFrozenSet_CheckExact(space, p):
     """Return true if p is a frozenset object but not an instance of a
     subtype."""
     """Macro form of PySet_Size() without error checking."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PySet_Contains(space, anyset, key):
     """Return 1 if found, 0 if not found, and -1 if an error is encountered.  Unlike
     the Python __contains__() method, this function does not automatically
     set, frozenset, or an instance of a subtype."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PySet_Add(space, set, key):
     """Add key to a set instance.  Does not apply to frozenset
     instances.  Return 0 on success or -1 on failure. Raise a TypeError if
     values of brand new frozensets before they are exposed to other code."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PySet_Discard(space, set, key):
     """Return 1 if found and removed, 0 if not found (no action taken), and -1 if an
     error is encountered.  Does not raise KeyError for missing keys.  Raise a
     set or its subtype."""
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject], rffi.INT, error=-1)
 def PySet_Clear(space, set):
     """Empty an existing set of all elements."""
     raise NotImplementedError
     changes in your code for properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([FILE, rffi.CCHARP], rffi.INT, error=CANNOT_FAIL)
 def Py_FdIsInteractive(space, fp, filename):
     """Return true (nonzero) if the standard I/O file fp with name filename is
     deemed interactive.  This is the case for files for which isatty(fileno(fp))
     to be called."""
     raise NotImplementedError
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyOS_CheckStack(space):
     """Return true when the interpreter runs out of stack space.  This is a reliable
     check, but is only available when USE_STACKCHECK is defined (currently
     own code."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real], PyOS_sighandler_t)
+@cpython_api([rffi.INT], PyOS_sighandler_t)
 def PyOS_getsig(space, i):
     """Return the current signal handler for signal i.  This is a thin wrapper around
     either sigaction() or signal().  Do not call those functions
     (*)(int)."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real, PyOS_sighandler_t], PyOS_sighandler_t)
+@cpython_api([rffi.INT, PyOS_sighandler_t], PyOS_sighandler_t)
 def PyOS_setsig(space, i, h):
     """Set the signal handler for signal i to be h; return the old signal handler.
     This is a thin wrapper around either sigaction() or signal().  Do
     """As above, but write to sys.stderr or stderr instead."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real], lltype.Void)
+@cpython_api([rffi.INT], lltype.Void)
 def Py_Exit(space, status):
     """Exit the current process.  This calls Py_Finalize() and then calls the
     standard C library function exit(status)."""
     raise NotImplementedError
 
-@cpython_api([rffi.VOIDP], rffi.INT_real, error=-1)
+@cpython_api([rffi.VOIDP], rffi.INT, error=-1)
 def Py_AtExit(space, func):
     """Register a cleanup function to be called by Py_Finalize().  The cleanup
     function will be called with no arguments and should return no value.  At
     require changes in your code for properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyTuple_ClearFreeList(space):
     """Clear the free list. Return the total number of freed items.
     """
     """
     raise NotImplementedError
 
-@cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([PyObject], rffi.INT, error=CANNOT_FAIL)
 def PyType_IS_GC(space, o):
     """Return true if the type object includes support for the cycle detector; this
     tests the type flag Py_TPFLAGS_HAVE_GC.
     """
     raise NotImplementedError
 
-@cpython_api([], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([], rffi.INT, error=CANNOT_FAIL)
 def PyUnicode_ClearFreeList(space):
     """Clear the free list. Return the total number of freed items.
     """
     raise NotImplementedError
 
-@cpython_api([Py_UNICODE], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([Py_UNICODE], rffi.INT, error=CANNOT_FAIL)
 def Py_UNICODE_ISTITLE(space, ch):
     """Return 1 or 0 depending on whether ch is a titlecase character."""
     raise NotImplementedError
 
-@cpython_api([Py_UNICODE], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([Py_UNICODE], rffi.INT, error=CANNOT_FAIL)
 def Py_UNICODE_ISDIGIT(space, ch):
     """Return 1 or 0 depending on whether ch is a digit character."""
     raise NotImplementedError
 
-@cpython_api([Py_UNICODE], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([Py_UNICODE], rffi.INT, error=CANNOT_FAIL)
 def Py_UNICODE_ISNUMERIC(space, ch):
     """Return 1 or 0 depending on whether ch is a numeric character."""
     raise NotImplementedError
 
-@cpython_api([Py_UNICODE], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([Py_UNICODE], rffi.INT, error=CANNOT_FAIL)
 def Py_UNICODE_ISALPHA(space, ch):
     """Return 1 or 0 depending on whether ch is an alphabetic character."""
     raise NotImplementedError
     """Return the character ch converted to title case."""
     raise NotImplementedError
 
-@cpython_api([Py_UNICODE], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([Py_UNICODE], rffi.INT, error=CANNOT_FAIL)
 def Py_UNICODE_TODECIMAL(space, ch):
     """Return the character ch converted to a decimal positive integer.  Return
     -1 if this is not possible.  This macro does not raise exceptions."""
     raise NotImplementedError
 
-@cpython_api([Py_UNICODE], rffi.INT_real, error=CANNOT_FAIL)
+@cpython_api([Py_UNICODE], rffi.INT, error=CANNOT_FAIL)
 def Py_UNICODE_TODIGIT(space, ch):
     """Return the character ch converted to a single digit integer. Return -1 if
     this is not possible.  This macro does not raise exceptions."""
     """
     raise NotImplementedError
 
-@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.CCHARP, rffi.INT_real], PyObject)
+@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.CCHARP, rffi.INT], PyObject)
 def PyUnicode_EncodeUTF32(space, s, size, errors, byteorder):
     """Return a Python bytes object holding the UTF-32 encoded value of the Unicode
     data in s.  Output is written according to the following byte order:
     properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.CCHARP, rffi.INT_real], PyObject)
+@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.CCHARP, rffi.INT], PyObject)
 def PyUnicode_EncodeUTF16(space, s, size, errors, byteorder):
     """Return a Python string object holding the UTF-16 encoded value of the Unicode
     data in s.  Output is written according to the following byte order:
     bytes that have been decoded will be stored in consumed."""
     raise NotImplementedError
 
-@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.INT_real, rffi.INT_real, rffi.CCHARP], PyObject)
+@cpython_api([rffi.CWCHARP, Py_ssize_t, rffi.INT, rffi.INT, rffi.CCHARP], PyObject)
 def PyUnicode_EncodeUTF7(space, s, size, base64SetO, base64WhiteSpace, errors):
     """Encode the Py_UNICODE buffer of the given size using UTF-7 and
     return a Python bytes object.  Return NULL if an exception was raised by
     changes in your code for properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP, rffi.INT_real, rffi.CCHARP, rffi.INTP], PyObject)
+@cpython_api([rffi.CCHARP, rffi.INT, rffi.CCHARP, rffi.INTP], PyObject)
 def PyUnicode_DecodeMBCSStateful(space, s, size, errors, consumed):
     """If consumed is NULL, behave like PyUnicode_DecodeMBCS(). If
     consumed is not NULL, PyUnicode_DecodeMBCSStateful() will not decode
     changes in your code for properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([PyObject, rffi.INT_real], PyObject)
+@cpython_api([PyObject, rffi.INT], PyObject)
 def PyUnicode_Splitlines(space, s, keepend):
     """Split a Unicode string at line breaks, returning a list of Unicode strings.
     CRLF is considered to be one line break.  If keepend is 0, the Line break
     Unicode string."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject, Py_ssize_t, Py_ssize_t, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject, Py_ssize_t, Py_ssize_t, rffi.INT], rffi.INT, error=-1)
 def PyUnicode_Tailmatch(space, str, substr, start, end, direction):
     """Return 1 if substr matches str*[*start:end] at the given tail end
     (direction == -1 means to do a prefix match, direction == 1 a suffix match),
     systems."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject, Py_ssize_t, Py_ssize_t, rffi.INT_real], Py_ssize_t, error=-2)
+@cpython_api([PyObject, PyObject, Py_ssize_t, Py_ssize_t, rffi.INT], Py_ssize_t, error=-2)
 def PyUnicode_Find(space, str, substr, start, end, direction):
     """Return the first position of substr in str*[*start:end] using the given
     direction (direction == 1 means to do a forward search, direction == -1 a
     require changes in your code for properly supporting 64-bit systems."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject, rffi.INT_real], PyObject)
+@cpython_api([PyObject, PyObject, rffi.INT], PyObject)
 def PyUnicode_RichCompare(space, left, right, op):
     """Rich compare two unicode strings and return one of the following:
     
     format % args.  The args argument must be a tuple."""
     raise NotImplementedError
 
-@cpython_api([PyObject, PyObject], rffi.INT_real, error=-1)
+@cpython_api([PyObject, PyObject], rffi.INT, error=-1)
 def PyUnicode_Contains(space, container, element):
     """Check whether element is contained in container and return true or false
     accordingly.
     there was an error."""
     raise NotImplementedError
 
-@cpython_api([rffi.INT_real, rffi.CCHARPP], rffi.INT_real, error=2)
+@cpython_api([rffi.INT, rffi.CCHARPP], rffi.INT, error=2)
 def Py_Main(space, argc, argv):
     """The main program for the standard interpreter.  This is made available for
     programs which embed Python.  The argc and argv parameters should be
     Py_InspectFlag is not set."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP], rffi.INT, error=-1)
 def PyRun_AnyFile(space, fp, filename):
     """This is a simplified interface to PyRun_AnyFileExFlags() below, leaving
     closeit set to 0 and flags set to NULL."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP, PyCompilerFlags], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP, PyCompilerFlags], rffi.INT, error=-1)
 def PyRun_AnyFileFlags(space, fp, filename, flags):
     """This is a simplified interface to PyRun_AnyFileExFlags() below, leaving
     the closeit argument set to 0."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP, rffi.INT], rffi.INT, error=-1)
 def PyRun_AnyFileEx(space, fp, filename, closeit):
     """This is a simplified interface to PyRun_AnyFileExFlags() below, leaving
     the flags argument set to NULL."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP, rffi.INT_real, PyCompilerFlags], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP, rffi.INT, PyCompilerFlags], rffi.INT, error=-1)
 def PyRun_AnyFileExFlags(space, fp, filename, closeit, flags):
     """If fp refers to a file associated with an interactive device (console or
     terminal input or Unix pseudo-terminal), return the value of
     "???" as the filename."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([rffi.CCHARP], rffi.INT, error=-1)
 def PyRun_SimpleString(space, command):
     """This is a simplified interface to PyRun_SimpleStringFlags() below,
     leaving the PyCompilerFlags* argument set to NULL."""
     raise NotImplementedError
 
-@cpython_api([rffi.CCHARP, PyCompilerFlags], rffi.INT_real, error=-1)
+@cpython_api([rffi.CCHARP, PyCompilerFlags], rffi.INT, error=-1)
 def PyRun_SimpleStringFlags(space, command, flags):
     """Executes the Python source code from command in the __main__ module
     according to the flags argument. If __main__ does not already exist, it
     Py_InspectFlag is not set."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP], rffi.INT, error=-1)
 def PyRun_SimpleFile(space, fp, filename):
     """This is a simplified interface to PyRun_SimpleFileExFlags() below,
     leaving closeit set to 0 and flags set to NULL."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP, PyCompilerFlags], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP, PyCompilerFlags], rffi.INT, error=-1)
 def PyRun_SimpleFileFlags(space, fp, filename, flags):
     """This is a simplified interface to PyRun_SimpleFileExFlags() below,
     leaving closeit set to 0."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP, rffi.INT_real], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP, rffi.INT], rffi.INT, error=-1)
 def PyRun_SimpleFileEx(space, fp, filename, closeit):
     """This is a simplified interface to PyRun_SimpleFileExFlags() below,
     leaving flags set to NULL."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP, rffi.INT_real, PyCompilerFlags], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP, rffi.INT, PyCompilerFlags], rffi.INT, error=-1)
 def PyRun_SimpleFileExFlags(space, fp, filename, closeit, flags):
     """Similar to PyRun_SimpleStringFlags(), but the Python source code is read
     from fp instead of an in-memory string. filename should be the name of the
     returns."""
     raise NotImplementedError
 
-@cpython_api([FILE, rffi.CCHARP], rffi.INT_real, error=-1)
+@cpython_api([FILE, rffi.CCHARP], rffi.INT, error=-1)