Changeset 391 for python/trunk/Doc/c-api/function.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/c-api/function.rst
r2 r391 11 11 12 12 13 .. c type:: PyFunctionObject13 .. c:type:: PyFunctionObject 14 14 15 15 The C structure used for functions. 16 16 17 17 18 .. c var:: PyTypeObject PyFunction_Type18 .. c:var:: PyTypeObject PyFunction_Type 19 19 20 20 .. index:: single: MethodType (in module types) 21 21 22 This is an instance of :c type:`PyTypeObject` and represents the Python function22 This is an instance of :c:type:`PyTypeObject` and represents the Python function 23 23 type. It is exposed to Python programmers as ``types.FunctionType``. 24 24 25 25 26 .. c function:: int PyFunction_Check(PyObject *o)26 .. c:function:: int PyFunction_Check(PyObject *o) 27 27 28 Return true if *o* is a function object (has type :c data:`PyFunction_Type`).28 Return true if *o* is a function object (has type :c:data:`PyFunction_Type`). 29 29 The parameter must not be *NULL*. 30 30 31 31 32 .. c function:: PyObject* PyFunction_New(PyObject *code, PyObject *globals)32 .. c:function:: PyObject* PyFunction_New(PyObject *code, PyObject *globals) 33 33 34 34 Return a new function object associated with the code object *code*. *globals* … … 39 39 40 40 41 .. c function:: PyObject* PyFunction_GetCode(PyObject *op)41 .. c:function:: PyObject* PyFunction_GetCode(PyObject *op) 42 42 43 43 Return the code object associated with the function object *op*. 44 44 45 45 46 .. c function:: PyObject* PyFunction_GetGlobals(PyObject *op)46 .. c:function:: PyObject* PyFunction_GetGlobals(PyObject *op) 47 47 48 48 Return the globals dictionary associated with the function object *op*. 49 49 50 50 51 .. c function:: PyObject* PyFunction_GetModule(PyObject *op)51 .. c:function:: PyObject* PyFunction_GetModule(PyObject *op) 52 52 53 53 Return the *__module__* attribute of the function object *op*. This is normally … … 56 56 57 57 58 .. c function:: PyObject* PyFunction_GetDefaults(PyObject *op)58 .. c:function:: PyObject* PyFunction_GetDefaults(PyObject *op) 59 59 60 60 Return the argument default values of the function object *op*. This can be a … … 62 62 63 63 64 .. c function:: int PyFunction_SetDefaults(PyObject *op, PyObject *defaults)64 .. c:function:: int PyFunction_SetDefaults(PyObject *op, PyObject *defaults) 65 65 66 66 Set the argument default values for the function object *op*. *defaults* must be … … 70 70 71 71 72 .. c function:: PyObject* PyFunction_GetClosure(PyObject *op)72 .. c:function:: PyObject* PyFunction_GetClosure(PyObject *op) 73 73 74 74 Return the closure associated with the function object *op*. This can be *NULL* … … 76 76 77 77 78 .. c function:: int PyFunction_SetClosure(PyObject *op, PyObject *closure)78 .. c:function:: int PyFunction_SetClosure(PyObject *op, PyObject *closure) 79 79 80 80 Set the closure associated with the function object *op*. *closure* must be
Note:
See TracChangeset
for help on using the changeset viewer.