diff options
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/newtypes.rst | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 2ba01bc..6a65941 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -288,18 +288,16 @@ strings, so we provide a new method:: self = (Noddy *)type->tp_alloc(type, 0); if (self != NULL) { self->first = PyString_FromString(""); - if (self->first == NULL) - { + if (self->first == NULL) { Py_DECREF(self); return NULL; - } + } self->last = PyString_FromString(""); - if (self->last == NULL) - { + if (self->last == NULL) { Py_DECREF(self); return NULL; - } + } self->number = 0; } |