Mercurial > cpython-lru_cache-weakref
annotate Include/funcobject.h @ 15164:8930ec3bc00a legacy-trunk
Added additional test cases for pulldom modifications.
| author | Lars Gustäbel <lars@gustaebel.de> |
|---|---|
| date | Wed, 11 Oct 2000 22:36:00 +0000 |
| parents | 6f6f965c5e2d |
| children | 1c6b0d3a58ea |
| rev | line source |
|---|---|
| 145 | 1 |
| 6 | 2 /* Function object interface */ |
| 3 | |
|
13444
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
4 #ifndef Py_FUNCOBJECT_H |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
5 #define Py_FUNCOBJECT_H |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
6 #ifdef __cplusplus |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
7 extern "C" { |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
8 #endif |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
9 |
|
1288
9fed5726a36d
Several changes in one:
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
10 typedef struct { |
|
13444
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
11 PyObject_HEAD |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
12 PyObject *func_code; |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
13 PyObject *func_globals; |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
14 PyObject *func_defaults; |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
15 PyObject *func_doc; |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
16 PyObject *func_name; |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
2073
diff
changeset
|
17 } PyFunctionObject; |
|
1288
9fed5726a36d
Several changes in one:
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
18 |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
19 extern DL_IMPORT(PyTypeObject) PyFunction_Type; |
| 6 | 20 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
2073
diff
changeset
|
21 #define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type) |
| 6 | 22 |
|
13444
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
23 extern DL_IMPORT(PyObject *) PyFunction_New(PyObject *, PyObject *); |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
24 extern DL_IMPORT(PyObject *) PyFunction_GetCode(PyObject *); |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
25 extern DL_IMPORT(PyObject *) PyFunction_GetGlobals(PyObject *); |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
26 extern DL_IMPORT(PyObject *) PyFunction_GetDefaults(PyObject *); |
|
5709ddba423c
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
27 extern DL_IMPORT(int) PyFunction_SetDefaults(PyObject *, PyObject *); |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
28 |
|
8658
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
29 /* Macros for direct access to these values. Type checks are *not* |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
30 done, so use with care. */ |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
31 #define PyFunction_GET_CODE(func) \ |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
32 (((PyFunctionObject *)func) -> func_code) |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
33 #define PyFunction_GET_GLOBALS(func) \ |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
34 (((PyFunctionObject *)func) -> func_globals) |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
35 #define PyFunction_GET_DEFAULTS(func) \ |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
36 (((PyFunctionObject *)func) -> func_defaults) |
|
1e93fa021405
Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
37 |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
38 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
39 } |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
40 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
41 #endif /* !Py_FUNCOBJECT_H */ |
