]> granicus.if.org Git - python/commitdiff
Remove the optional integer argument to SSL_write; now it will always send
authorAndrew M. Kuchling <amk@amk.ca>
Wed, 7 Feb 2001 20:41:17 +0000 (20:41 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Wed, 7 Feb 2001 20:41:17 +0000 (20:41 +0000)
    the entire string passed to it

Modules/socketmodule.c

index 00383c7ccfeb6e1d4504c6a73b4b0d53cad791c6..dffd810ed38448eec576c4adb25f932e558d5e3b 100644 (file)
@@ -2216,14 +2216,11 @@ staticforward PyTypeObject SSL_Type = {
 static PyObject *SSL_SSLwrite(SSLObject *self, PyObject *args)
 {
        char *data;
-       size_t len = 0;
+       size_t len;
   
-       if (!PyArg_ParseTuple(args, "s#|i:write", &data, &len))
+       if (!PyArg_ParseTuple(args, "s#:write", &data, &len))
                return NULL;
   
-       if (!len)
-               len = strlen(data);
-  
        len = SSL_write(self->ssl, data, len);
        return PyInt_FromLong((long)len);
 }