From: Gregory P. Smith Date: Fri, 22 Mar 2013 20:49:26 +0000 (-0700) Subject: cleanup references to PyString_ APIs from 2.x in the 3.3 docs. X-Git-Tag: v3.3.1rc1~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bcd2aa6d06934fad049aaf107d98e741a7e4440c;p=python cleanup references to PyString_ APIs from 2.x in the 3.3 docs. --- bcd2aa6d06934fad049aaf107d98e741a7e4440c diff --cc Doc/extending/newtypes.rst index 08a70a2af6,3d68251dce..835a92e242 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@@ -288,17 -287,19 +288,17 @@@ strings, so we provide a new method: self = (Noddy *)type->tp_alloc(type, 0); if (self != NULL) { - self->first = PyString_FromString(""); + self->first = PyUnicode_FromString(""); - if (self->first == NULL) - { + if (self->first == NULL) { Py_DECREF(self); return NULL; - } + } - self->last = PyString_FromString(""); + self->last = PyUnicode_FromString(""); - if (self->last == NULL) - { + if (self->last == NULL) { Py_DECREF(self); return NULL; - } + } self->number = 0; }