Search'n'replace remaining NULL occurrences (#816)
This commit is contained in:
1 parent
832cec45f8
commit
75b210e841
46 files changed
+237
-237
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user