Search'n'replace remaining NULL occurrences (#816)

This commit is contained in:
J-P Nurmi
2015-02-26 20:58:01 +01:00
parent 832cec45f8
commit 75b210e841
46 changed files with 237 additions and 237 deletions

View File

@@ -206,12 +206,12 @@ class CPyRetBool {
PyObject* WriteBytes(PyObject* data) {
if (!PyBytes_Check(data)) {
PyErr_SetString(PyExc_TypeError, "socket.WriteBytes needs bytes as argument");
return NULL;
return nullptr;
}
char* buffer;
Py_ssize_t length;
if (-1 == PyBytes_AsStringAndSize(data, &buffer, &length)) {
return NULL;
return nullptr;
}
if ($self->Write(buffer, length)) {
Py_RETURN_TRUE;