mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
Use NULL rather than 0. (#778)
There was few cases of using literal 0 instead of NULL in the context of pointers. While this was a legitimate C code, using NULL rather than 0 makes the code clearer.
This commit is contained in:
parent
aefa7ebf0f
commit
0b3ec19225
8 changed files with 15 additions and 15 deletions
|
|
@ -365,14 +365,14 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|||
Py_INCREF(dialect);
|
||||
/* Can we reuse this instance? */
|
||||
if (PyObject_TypeCheck(dialect, &Dialect_Type) &&
|
||||
delimiter == 0 &&
|
||||
doublequote == 0 &&
|
||||
escapechar == 0 &&
|
||||
lineterminator == 0 &&
|
||||
quotechar == 0 &&
|
||||
quoting == 0 &&
|
||||
skipinitialspace == 0 &&
|
||||
strict == 0)
|
||||
delimiter == NULL &&
|
||||
doublequote == NULL &&
|
||||
escapechar == NULL &&
|
||||
lineterminator == NULL &&
|
||||
quotechar == NULL &&
|
||||
quoting == NULL &&
|
||||
skipinitialspace == NULL &&
|
||||
strict == NULL)
|
||||
return dialect;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue