[pypy-commit] pypy rffi-parser: Rename api.h to object_h
rlamy
pypy.commits at gmail.com
Sun Dec 18 09:05:12 EST 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: rffi-parser
Changeset: r89142:a09184bcdf35
Date: 2016-12-18 14:04 +0000
http://bitbucket.org/pypy/pypy/changeset/a09184bcdf35/
Log: Rename api.h to object_h
diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -600,7 +600,7 @@
% (cpyname, ))
build_exported_objects()
-h = parse_source("""
+object_h = parse_source("""
typedef ssize_t Py_ssize_t;
#define PyObject_HEAD \
@@ -909,9 +909,9 @@
} PyTypeObject;
""")
-h.configure_types()
+object_h.configure_types()
-Py_ssize_t = h.definitions['Py_ssize_t']
+Py_ssize_t = object_h.definitions['Py_ssize_t']
Py_ssize_tP = rffi.CArrayPtr(Py_ssize_t)
size_t = rffi.ULONG
ADDR = lltype.Signed
@@ -919,21 +919,21 @@
# Note: as a special case, "PyObject" is the pointer type in RPython,
# corresponding to "PyObject *" in C. We do that only for PyObject.
# For example, "PyTypeObject" is the struct type even in RPython.
-PyTypeObject = h.definitions['PyTypeObject']
+PyTypeObject = object_h.definitions['PyTypeObject']
PyTypeObjectPtr = lltype.Ptr(PyTypeObject)
-PyObjectStruct = h.definitions['PyObject']
+PyObjectStruct = object_h.definitions['PyObject']
PyObject = lltype.Ptr(PyObjectStruct)
PyObjectFields = (("ob_refcnt", lltype.Signed),
("ob_pypy_link", lltype.Signed),
("ob_type", PyTypeObjectPtr))
PyVarObjectFields = PyObjectFields + (("ob_size", Py_ssize_t), )
-PyVarObjectStruct = h.definitions['PyVarObject']
+PyVarObjectStruct = object_h.definitions['PyVarObject']
PyVarObject = lltype.Ptr(PyVarObjectStruct)
-Py_buffer = h.definitions['Py_buffer']
+Py_buffer = object_h.definitions['Py_buffer']
Py_bufferP = lltype.Ptr(Py_buffer)
-getbufferproc = h.definitions['getbufferproc']
-releasebufferproc = h.definitions['releasebufferproc']
+getbufferproc = object_h.definitions['getbufferproc']
+releasebufferproc = object_h.definitions['releasebufferproc']
@specialize.memo()
diff --git a/pypy/module/cpyext/typeobjectdefs.py b/pypy/module/cpyext/typeobjectdefs.py
--- a/pypy/module/cpyext/typeobjectdefs.py
+++ b/pypy/module/cpyext/typeobjectdefs.py
@@ -1,62 +1,62 @@
-from pypy.module.cpyext.api import h
+from pypy.module.cpyext.api import object_h
-freefunc = h.definitions['freefunc']
-destructor = h.definitions['destructor']
-printfunc = h.definitions['printfunc']
-getattrfunc = h.definitions['getattrfunc']
-getattrofunc = h.definitions['getattrofunc']
-setattrfunc = h.definitions['setattrfunc']
-setattrofunc = h.definitions['setattrofunc']
-cmpfunc = h.definitions['cmpfunc']
-reprfunc = h.definitions['reprfunc']
-hashfunc = h.definitions['hashfunc']
-richcmpfunc = h.definitions['richcmpfunc']
-getiterfunc = h.definitions['getiterfunc']
-iternextfunc = h.definitions['iternextfunc']
-descrgetfunc = h.definitions['descrgetfunc']
-descrsetfunc = h.definitions['descrsetfunc']
-initproc = h.definitions['initproc']
-newfunc = h.definitions['newfunc']
-allocfunc = h.definitions['allocfunc']
+freefunc = object_h.definitions['freefunc']
+destructor = object_h.definitions['destructor']
+printfunc = object_h.definitions['printfunc']
+getattrfunc = object_h.definitions['getattrfunc']
+getattrofunc = object_h.definitions['getattrofunc']
+setattrfunc = object_h.definitions['setattrfunc']
+setattrofunc = object_h.definitions['setattrofunc']
+cmpfunc = object_h.definitions['cmpfunc']
+reprfunc = object_h.definitions['reprfunc']
+hashfunc = object_h.definitions['hashfunc']
+richcmpfunc = object_h.definitions['richcmpfunc']
+getiterfunc = object_h.definitions['getiterfunc']
+iternextfunc = object_h.definitions['iternextfunc']
+descrgetfunc = object_h.definitions['descrgetfunc']
+descrsetfunc = object_h.definitions['descrsetfunc']
+initproc = object_h.definitions['initproc']
+newfunc = object_h.definitions['newfunc']
+allocfunc = object_h.definitions['allocfunc']
-unaryfunc = h.definitions['unaryfunc']
-binaryfunc = h.definitions['binaryfunc']
-ternaryfunc = h.definitions['ternaryfunc']
-inquiry = h.definitions['inquiry']
-lenfunc = h.definitions['lenfunc']
-coercion = h.definitions['coercion']
-intargfunc = h.definitions['intargfunc']
-intintargfunc = h.definitions['intintargfunc']
-ssizeargfunc = h.definitions['ssizeargfunc']
-ssizessizeargfunc = h.definitions['ssizessizeargfunc']
-intobjargproc = h.definitions['intobjargproc']
-intintobjargproc = h.definitions['intintobjargproc']
-ssizeobjargproc = h.definitions['ssizeobjargproc']
-ssizessizeobjargproc = h.definitions['ssizessizeobjargproc']
-objobjargproc = h.definitions['objobjargproc']
+unaryfunc = object_h.definitions['unaryfunc']
+binaryfunc = object_h.definitions['binaryfunc']
+ternaryfunc = object_h.definitions['ternaryfunc']
+inquiry = object_h.definitions['inquiry']
+lenfunc = object_h.definitions['lenfunc']
+coercion = object_h.definitions['coercion']
+intargfunc = object_h.definitions['intargfunc']
+intintargfunc = object_h.definitions['intintargfunc']
+ssizeargfunc = object_h.definitions['ssizeargfunc']
+ssizessizeargfunc = object_h.definitions['ssizessizeargfunc']
+intobjargproc = object_h.definitions['intobjargproc']
+intintobjargproc = object_h.definitions['intintobjargproc']
+ssizeobjargproc = object_h.definitions['ssizeobjargproc']
+ssizessizeobjargproc = object_h.definitions['ssizessizeobjargproc']
+objobjargproc = object_h.definitions['objobjargproc']
-objobjproc = h.definitions['objobjproc']
-visitproc = h.definitions['visitproc']
-traverseproc = h.definitions['traverseproc']
+objobjproc = object_h.definitions['objobjproc']
+visitproc = object_h.definitions['visitproc']
+traverseproc = object_h.definitions['traverseproc']
-getter = h.definitions['getter']
-setter = h.definitions['setter']
+getter = object_h.definitions['getter']
+setter = object_h.definitions['setter']
-#wrapperfunc = h.definitions['wrapperfunc']
-#wrapperfunc_kwds = h.definitions['wrapperfunc_kwds']
+#wrapperfunc = object_h.definitions['wrapperfunc']
+#wrapperfunc_kwds = object_h.definitions['wrapperfunc_kwds']
-readbufferproc = h.definitions['readbufferproc']
-writebufferproc = h.definitions['writebufferproc']
-segcountproc = h.definitions['segcountproc']
-charbufferproc = h.definitions['charbufferproc']
-getbufferproc = h.definitions['getbufferproc']
-releasebufferproc = h.definitions['releasebufferproc']
+readbufferproc = object_h.definitions['readbufferproc']
+writebufferproc = object_h.definitions['writebufferproc']
+segcountproc = object_h.definitions['segcountproc']
+charbufferproc = object_h.definitions['charbufferproc']
+getbufferproc = object_h.definitions['getbufferproc']
+releasebufferproc = object_h.definitions['releasebufferproc']
-PyGetSetDef = h.definitions['PyGetSetDef']
-PyNumberMethods = h.definitions['PyNumberMethods']
-PySequenceMethods = h.definitions['PySequenceMethods']
-PyMappingMethods = h.definitions['PyMappingMethods']
-PyBufferProcs = h.definitions['PyBufferProcs']
-PyMemberDef = h.definitions['PyMemberDef']
+PyGetSetDef = object_h.definitions['PyGetSetDef']
+PyNumberMethods = object_h.definitions['PyNumberMethods']
+PySequenceMethods = object_h.definitions['PySequenceMethods']
+PyMappingMethods = object_h.definitions['PyMappingMethods']
+PyBufferProcs = object_h.definitions['PyBufferProcs']
+PyMemberDef = object_h.definitions['PyMemberDef']
More information about the pypy-commit
mailing list