@@ -247,29 +247,30 @@ Implementing functions and methods
247
247
Structure used to describe a method of an extension type. This structure has
248
248
four fields:
249
249
250
- +------------------+---------------+-------------------------------+
251
- | Field | C Type | Meaning |
252
- +==================+===============+===============================+
253
- | :attr: `ml_name ` | const char \* | name of the method |
254
- +------------------+---------------+-------------------------------+
255
- | :attr: `ml_meth ` | PyCFunction | pointer to the C |
256
- | | | implementation |
257
- +------------------+---------------+-------------------------------+
258
- | :attr: `ml_flags ` | int | flag bits indicating how the |
259
- | | | call should be constructed |
260
- +------------------+---------------+-------------------------------+
261
- | :attr: `ml_doc ` | const char \* | points to the contents of the |
262
- | | | docstring |
263
- +------------------+---------------+-------------------------------+
250
+ .. c :member :: const char * ml_name
251
+
252
+ name of the method
253
+
254
+ .. c :member :: PyCFunction ml_meth
255
+
256
+ pointer to the C implementation
257
+
258
+ .. c :member :: int ml_flags
259
+
260
+ flags bits indicating how the call should be constructed
261
+
262
+ .. c :member :: const char * ml_doc
263
+
264
+ points to the contents of the docstring
264
265
265
- The :attr : `ml_meth ` is a C function pointer. The functions may be of different
266
+ The :c:member : `ml_meth ` is a C function pointer. The functions may be of different
266
267
types, but they always return :c:expr: `PyObject* `. If the function is not of
267
268
the :c:type: `PyCFunction `, the compiler will require a cast in the method table.
268
269
Even though :c:type: `PyCFunction ` defines the first parameter as
269
270
:c:expr: `PyObject* `, it is common that the method implementation uses the
270
271
specific C type of the *self * object.
271
272
272
- The :attr : `ml_flags ` field is a bitfield which can include the following flags.
273
+ The :c:member : `ml_flags ` field is a bitfield which can include the following flags.
273
274
The individual flags indicate either a calling convention or a binding
274
275
convention.
275
276
0 commit comments