Mercurial > cpython-lru_cache-weakref
diff Include/methodobject.h @ 42333:6620a510e9a9 legacy-trunk
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 21 Jul 2007 06:55:02 +0000 |
| parents | 9541369b0dca |
| children | 26384b8180c7 |
line wrap: on
line diff
--- a/Include/methodobject.h Thu Jul 19 23:57:38 2007 +0000 +++ b/Include/methodobject.h Sat Jul 21 06:55:02 2007 +0000 @@ -13,7 +13,7 @@ PyAPI_DATA(PyTypeObject) PyCFunction_Type; -#define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type) +#define PyCFunction_Check(op) (Py_Type(op) == &PyCFunction_Type) typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
