Mercurial > cpython-lru_cache-weakref
comparison Include/code.h @ 42334:e70cdce0e8b2
Merged revisions 56467-56482 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
................
r56477 | martin.v.loewis | 2007-07-21 09:04:38 +0200 (Sa, 21 Jul 2007) | 11 lines
Merged revisions 56466-56476 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r56476 | martin.v.loewis | 2007-07-21 08:55:02 +0200 (Sa, 21 Jul 2007) | 4 lines
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
........
................
r56478 | martin.v.loewis | 2007-07-21 09:47:23 +0200 (Sa, 21 Jul 2007) | 2 lines
PEP 3123: Use proper C inheritance for PyObject.
................
r56479 | martin.v.loewis | 2007-07-21 10:06:55 +0200 (Sa, 21 Jul 2007) | 3 lines
Add longintrepr.h to Python.h, so that the compiler can
see that PyFalse is really some kind of PyObject*.
................
r56480 | martin.v.loewis | 2007-07-21 10:47:18 +0200 (Sa, 21 Jul 2007) | 2 lines
Qualify SHIFT, MASK, BASE.
................
r56482 | martin.v.loewis | 2007-07-21 19:10:57 +0200 (Sa, 21 Jul 2007) | 2 lines
Correctly refer to _ob_next.
................
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 21 Jul 2007 17:22:18 +0000 |
| parents | 1cce0526d9b0 |
| children | 19319e70fc3e |
comparison
equal
deleted
inserted
replaced
| 42332:2be251dd2cbd | 42334:e70cdce0e8b2 |
|---|---|
| 57 | 57 |
| 58 #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ | 58 #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ |
| 59 | 59 |
| 60 PyAPI_DATA(PyTypeObject) PyCode_Type; | 60 PyAPI_DATA(PyTypeObject) PyCode_Type; |
| 61 | 61 |
| 62 #define PyCode_Check(op) ((op)->ob_type == &PyCode_Type) | 62 #define PyCode_Check(op) (Py_Type(op) == &PyCode_Type) |
| 63 #define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars)) | 63 #define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars)) |
| 64 | 64 |
| 65 /* Public interface */ | 65 /* Public interface */ |
| 66 PyAPI_FUNC(PyCodeObject *) PyCode_New( | 66 PyAPI_FUNC(PyCodeObject *) PyCode_New( |
| 67 int, int, int, int, int, PyObject *, PyObject *, | 67 int, int, int, int, int, PyObject *, PyObject *, |
| 70 /* same as struct above */ | 70 /* same as struct above */ |
| 71 PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int); | 71 PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int); |
| 72 | 72 |
| 73 /* for internal use only */ | 73 /* for internal use only */ |
| 74 #define _PyCode_GETCODEPTR(co, pp) \ | 74 #define _PyCode_GETCODEPTR(co, pp) \ |
| 75 ((*(co)->co_code->ob_type->tp_as_buffer->bf_getreadbuffer) \ | 75 ((*Py_Type((co)->co_code)->tp_as_buffer->bf_getreadbuffer) \ |
| 76 ((co)->co_code, 0, (void **)(pp))) | 76 ((co)->co_code, 0, (void **)(pp))) |
| 77 | 77 |
| 78 typedef struct _addr_pair { | 78 typedef struct _addr_pair { |
| 79 int ap_lower; | 79 int ap_lower; |
| 80 int ap_upper; | 80 int ap_upper; |
