@@ -168,7 +168,7 @@ representation of the instance for which it is called. Here is a simple
168
168
example::
169
169
170
170
static PyObject *
171
- newdatatype_repr(newdatatypeobject * obj)
171
+ newdatatype_repr(newdatatypeobject *obj)
172
172
{
173
173
return PyUnicode_FromFormat("Repr-ified_newdatatype{{size:%d}}",
174
174
obj->obj_UnderlyingDatatypePtr->size);
@@ -188,7 +188,7 @@ used instead.
188
188
Here is a simple example::
189
189
190
190
static PyObject *
191
- newdatatype_str(newdatatypeobject * obj)
191
+ newdatatype_str(newdatatypeobject *obj)
192
192
{
193
193
return PyUnicode_FromFormat("Stringified_newdatatype{{size:%d}}",
194
194
obj->obj_UnderlyingDatatypePtr->size);
@@ -338,7 +338,7 @@ Here is an example::
338
338
339
339
PyErr_Format(PyExc_AttributeError,
340
340
"'%.100s' object has no attribute '%.400s'",
341
- tp ->tp_name, name);
341
+ Py_TYPE(obj) ->tp_name, name);
342
342
return NULL;
343
343
}
344
344
@@ -379,7 +379,7 @@ Here is a sample implementation, for a datatype that is considered equal if the
379
379
size of an internal pointer is equal::
380
380
381
381
static PyObject *
382
- newdatatype_richcmp(PyObject *obj1, PyObject *obj2, int op)
382
+ newdatatype_richcmp(newdatatypeobject *obj1, newdatatypeobject *obj2, int op)
383
383
{
384
384
PyObject *result;
385
385
int c, size1, size2;
@@ -478,7 +478,7 @@ This function takes three arguments:
478
478
Here is a toy ``tp_call `` implementation::
479
479
480
480
static PyObject *
481
- newdatatype_call(newdatatypeobject *self , PyObject *args, PyObject *kwds)
481
+ newdatatype_call(newdatatypeobject *obj , PyObject *args, PyObject *kwds)
482
482
{
483
483
PyObject *result;
484
484
const char *arg1;
0 commit comments