annotate Include/funcobject.h @ 32975:9b188158181f legacy-trunk

Typo fix; use 'in-place' instead of 'inplace'
author Andrew M. Kuchling <amk@amk.ca>
date Fri, 06 Aug 2004 18:55:09 +0000
parents faabd9867fb8
children 60c60dc75c77
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
145
853b736a6a9e Added copyright notice.
Guido van Rossum <guido@python.org>
parents: 85
diff changeset
1
6
fc6fcd7df4f7 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 /* Function object interface */
fc6fcd7df4f7 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
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;
16257
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15894
diff changeset
15 PyObject *func_closure;
13444
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
16 PyObject *func_doc;
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
17 PyObject *func_name;
15894
1c6b0d3a58ea Committing PEP 232, function attribute feature, approved by Guido.
Barry Warsaw <barry@python.org>
parents: 14375
diff changeset
18 PyObject *func_dict;
17169
d807488dfc7a Add the necessary field for weak reference support to the function and
Fred Drake <fdrake@acm.org>
parents: 16257
diff changeset
19 PyObject *func_weakreflist;
27559
faabd9867fb8 Provide __module__ attributes for functions defined in C and Python.
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 24752
diff changeset
20 PyObject *func_module;
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 } PyFunctionObject;
1288
9fed5726a36d Several changes in one:
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
22
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
23 PyAPI_DATA(PyTypeObject) PyFunction_Type;
6
fc6fcd7df4f7 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
24
2129
05360cd616ae The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents: 2073
diff changeset
25 #define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type)
6
fc6fcd7df4f7 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
26
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
27 PyAPI_FUNC(PyObject *) PyFunction_New(PyObject *, PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
28 PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
29 PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
27559
faabd9867fb8 Provide __module__ attributes for functions defined in C and Python.
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 24752
diff changeset
30 PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
31 PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
32 PyAPI_FUNC(int) PyFunction_SetDefaults(PyObject *, PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
33 PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
34 PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
35
8658
1e93fa021405 Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents: 4503
diff changeset
36 /* 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
37 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
38 #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
39 (((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
40 #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
41 (((PyFunctionObject *)func) -> func_globals)
27559
faabd9867fb8 Provide __module__ attributes for functions defined in C and Python.
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 24752
diff changeset
42 #define PyFunction_GET_MODULE(func) \
faabd9867fb8 Provide __module__ attributes for functions defined in C and Python.
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 24752
diff changeset
43 (((PyFunctionObject *)func) -> func_module)
8658
1e93fa021405 Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents: 4503
diff changeset
44 #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
45 (((PyFunctionObject *)func) -> func_defaults)
16257
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15894
diff changeset
46 #define PyFunction_GET_CLOSURE(func) \
fd8c7203251f PEP 227 implementation
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 15894
diff changeset
47 (((PyFunctionObject *)func) -> func_closure)
8658
1e93fa021405 Add macros for direct access to the members of CFunction objects.
Guido van Rossum <guido@python.org>
parents: 4503
diff changeset
48
18933
09df3254b49d Merge of descr-branch back into trunk.
Tim Peters <tim.peters@gmail.com>
parents: 17169
diff changeset
49 /* The classmethod and staticmethod types lives here, too */
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
50 PyAPI_DATA(PyTypeObject) PyClassMethod_Type;
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
51 PyAPI_DATA(PyTypeObject) PyStaticMethod_Type;
18933
09df3254b49d Merge of descr-branch back into trunk.
Tim Peters <tim.peters@gmail.com>
parents: 17169
diff changeset
52
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
53 PyAPI_FUNC(PyObject *) PyClassMethod_New(PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 18933
diff changeset
54 PyAPI_FUNC(PyObject *) PyStaticMethod_New(PyObject *);
18933
09df3254b49d Merge of descr-branch back into trunk.
Tim Peters <tim.peters@gmail.com>
parents: 17169
diff changeset
55
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
56 #ifdef __cplusplus
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
57 }
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
58 #endif
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1288
diff changeset
59 #endif /* !Py_FUNCOBJECT_H */