@@ -230,8 +230,9 @@ type objects) *must* have the :attr:`ob_size` field.
230
230
231
231
This field is deprecated. When it is defined, it should point to a function
232
232
that acts the same as the :c:member: `~PyTypeObject.tp_getattro ` function, but taking a C string
233
- instead of a Python string object to give the attribute name. The signature is
234
- the same as for :c:func: `PyObject_GetAttrString `.
233
+ instead of a Python string object to give the attribute name. The signature is ::
234
+
235
+ PyObject * tp_getattr(PyObject *o, char *attr_name);
235
236
236
237
This field is inherited by subtypes together with :c:member: `~PyTypeObject.tp_getattro `: a subtype
237
238
inherits both :c:member: `~PyTypeObject.tp_getattr ` and :c:member: `~PyTypeObject.tp_getattro ` from its base type when
@@ -244,10 +245,11 @@ type objects) *must* have the :attr:`ob_size` field.
244
245
245
246
This field is deprecated. When it is defined, it should point to a function
246
247
that acts the same as the :c:member: `~PyTypeObject.tp_setattro ` function, but taking a C string
247
- instead of a Python string object to give the attribute name. The signature is
248
- the same as for :c:func: ` PyObject_SetAttrString `, but setting
249
- * v * to * NULL * to delete an attribute must be supported.
248
+ instead of a Python string object to give the attribute name. The signature is ::
249
+
250
+ PyObject * tp_setattr(PyObject *o, char *attr_name, PyObject *v);
250
251
252
+ The *v * argument is set to *NULL * to delete the attribute.
251
253
This field is inherited by subtypes together with :c:member: `~PyTypeObject.tp_setattro `: a subtype
252
254
inherits both :c:member: `~PyTypeObject.tp_setattr ` and :c:member: `~PyTypeObject.tp_setattro ` from its base type when
253
255
the subtype's :c:member: `~PyTypeObject.tp_setattr ` and :c:member: `~PyTypeObject.tp_setattro ` are both *NULL *.
@@ -1450,7 +1452,7 @@ member in the :c:type:`PyTypeObject` structure should be *NULL*. Otherwise, the
1450
1452
all segments in ``*lenp ``. The function cannot fail.
1451
1453
1452
1454
1453
- .. c :type :: Py_ssize_t (*charbufferproc) (PyObject *self, Py_ssize_t segment, const char **ptrptr)
1455
+ .. c :type :: Py_ssize_t (*charbufferproc) (PyObject *self, Py_ssize_t segment, char **ptrptr)
1454
1456
1455
1457
Return the size of the segment *segment * that *ptrptr * is set to. ``*ptrptr ``
1456
1458
is set to the memory buffer. Returns ``-1 `` on error.
0 commit comments