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