From: Benjamin Peterson Date: Wed, 20 Aug 2014 19:25:32 +0000 (-0500) Subject: PyUnicode -> PyString and PyLong -> PyInt X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cbb144afc08ee2d0e843a13dc2a81e3abb9ce139;p=python PyUnicode -> PyString and PyLong -> PyInt --- diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 8f4062bafa..ed4bbfd6d3 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -3417,12 +3417,12 @@ certEncodingType(DWORD encodingType) static PyObject *pkcs_7_asn = NULL; if (x509_asn == NULL) { - x509_asn = PyUnicode_InternFromString("x509_asn"); + x509_asn = PyString_InternFromString("x509_asn"); if (x509_asn == NULL) return NULL; } if (pkcs_7_asn == NULL) { - pkcs_7_asn = PyUnicode_InternFromString("pkcs_7_asn"); + pkcs_7_asn = PyString_InternFromString("pkcs_7_asn"); if (pkcs_7_asn == NULL) return NULL; } @@ -3434,7 +3434,7 @@ certEncodingType(DWORD encodingType) Py_INCREF(pkcs_7_asn); return pkcs_7_asn; default: - return PyLong_FromLong(encodingType); + return PyInt_FromLong(encodingType); } } @@ -3475,7 +3475,7 @@ parseKeyUsage(PCCERT_CONTEXT pCertCtx, DWORD flags) if (usage->rgpszUsageIdentifier[i]) { PyObject *oid; int err; - oid = PyUnicode_FromString(usage->rgpszUsageIdentifier[i]); + oid = PyString_FromString(usage->rgpszUsageIdentifier[i]); if (oid == NULL) { Py_CLEAR(retval); goto error;