rand.c: More `Py_ssize_t' fixes.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 7 Apr 2020 23:19:14 +0000 (00:19 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 7 Apr 2020 23:55:49 +0000 (00:55 +0100)
rand.c

diff --git a/rand.c b/rand.c
index 1203f76..641b9bd 100644 (file)
--- a/rand.c
+++ b/rand.c
@@ -935,7 +935,7 @@ static PyTypeObject gclatinrand_pytype_skel = {
 static PyObject *sslprf_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
 {
   char *k, *s;
-  int ksz, ssz;
+  Py_ssize_t ksz, ssz;
   const gchash *hco = &md5, *hci = &sha;
   PyObject *rc = 0;
   char *kwlist[] = { "key", "seed", "ohash", "ihash", 0 };
@@ -952,7 +952,7 @@ end:
 static PyObject *tlsdx_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
 {
   char *k, *s;
-  int ksz, ssz;
+  Py_ssize_t ksz, ssz;
   const gcmac *mc = &sha_hmac;
   PyObject *rc = 0;
   char *kwlist[] = { "key", "seed", "mac", 0 };
@@ -969,7 +969,7 @@ end:
 static PyObject *tlsprf_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
 {
   char *k, *s;
-  int ksz, ssz;
+  Py_ssize_t ksz, ssz;
   const gcmac *mcl = &md5_hmac, *mcr = &sha_hmac;
   PyObject *rc = 0;
   char *kwlist[] = { "key", "seed", "lmac", "rmac", 0 };
@@ -1132,7 +1132,7 @@ static PyTypeObject tlsprf_pytype_skel = {
 static PyObject *dsarand_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
 {
   char *p;
-  int sz;
+  Py_ssize_t sz;
   PyObject *rc = 0;
   char *kwlist[] = { "seed", 0 };