mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -434,7 +434,7 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
|
|||
PyDict_SetItemString(dict, "OptimizedUnicode", (PyObject*)&PyUnicode_Type);
|
||||
|
||||
/* Set integer constants */
|
||||
for (i = 0; _int_constants[i].constant_name != 0; i++) {
|
||||
for (i = 0; _int_constants[i].constant_name != NULL; i++) {
|
||||
tmp_obj = PyLong_FromLong(_int_constants[i].constant_value);
|
||||
if (!tmp_obj) {
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue