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

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

No files matched your search

+2 -2
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;