summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
commit217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch)
tree4737b4a91359c94953623ab9ee297e9a90f319e4 /Modules/_ssl.c
parent1a3284ed69d545e4ef59869998cb8c29233a45fa (diff)
downloadcpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.zip
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.bz2
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 3d6fcff..bd3f172 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -818,7 +818,7 @@ _decode_certificate (X509 *certificate, int verbose) {
}
Py_DECREF(issuer);
- version = PyInt_FromLong(X509_get_version(certificate) + 1);
+ version = PyLong_FromLong(X509_get_version(certificate) + 1);
if (PyDict_SetItemString(retval, "version", version) < 0) {
Py_DECREF(version);
goto fail0;
@@ -1039,7 +1039,7 @@ static PyObject *PySSL_cipher (PySSLObject *self) {
goto fail0;
PyTuple_SET_ITEM(retval, 1, v);
}
- v = PyInt_FromLong(SSL_CIPHER_get_bits(current, NULL));
+ v = PyLong_FromLong(SSL_CIPHER_get_bits(current, NULL));
if (v == NULL)
goto fail0;
PyTuple_SET_ITEM(retval, 2, v);
@@ -1194,7 +1194,7 @@ static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args)
}
} while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE);
if (len > 0)
- return PyInt_FromLong(len);
+ return PyLong_FromLong(len);
else
return PySSL_SetError(self, len, __FILE__, __LINE__);
}
@@ -1215,7 +1215,7 @@ static PyObject *PySSL_SSLpending(PySSLObject *self)
if (count < 0)
return PySSL_SetError(self, count, __FILE__, __LINE__);
else
- return PyInt_FromLong(count);
+ return PyLong_FromLong(count);
}
PyDoc_STRVAR(PySSL_SSLpending_doc,
@@ -1240,8 +1240,8 @@ static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args)
if ((buf == NULL) || (buf == Py_None)) {
if (!(buf = PyBytes_FromStringAndSize((char *) 0, len)))
return NULL;
- } else if (PyInt_Check(buf)) {
- len = PyInt_AS_LONG(buf);
+ } else if (PyLong_Check(buf)) {
+ len = PyLong_AS_LONG(buf);
if (!(buf = PyBytes_FromStringAndSize((char *) 0, len)))
return NULL;
} else {
@@ -1336,7 +1336,7 @@ static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args)
Py_DECREF(buf);
return res;
} else {
- return PyInt_FromLong(count);
+ return PyLong_FromLong(count);
}
}
@@ -1408,7 +1408,7 @@ bound on the entropy contained in string. See RFC 1750.");
static PyObject *
PySSL_RAND_status(PyObject *self)
{
- return PyInt_FromLong(RAND_status());
+ return PyLong_FromLong(RAND_status());
}
PyDoc_STRVAR(PySSL_RAND_status_doc,
@@ -1434,7 +1434,7 @@ PySSL_RAND_egd(PyObject *self, PyObject *arg)
"enough data to seed the PRNG");
return NULL;
}
- return PyInt_FromLong(bytes);
+ return PyLong_FromLong(bytes);
}
PyDoc_STRVAR(PySSL_RAND_egd_doc,