| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7d27561 commit e3ed89b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -824,6 +824,6 @@ The :c:type:`PyLongWriter` API can be used to import an integer. | |||
| 824 | 824 | ||
| 825 | 825 | Discard a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`. | |
| 826 | 826 | ||
| 827 | - *writer* must not be ``NULL``. | ||
| 827 | + If *writer* is ``NULL``, no operation is performed. | ||
| 828 | 828 | ||
| 829 | 829 | The writer instance and the *digits* array are invalid after the call. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6953,6 +6953,10 @@ PyLongWriter_Create(int negative, Py_ssize_t ndigits, void **digits) | |||
| 6953 | 6953 | void | |
| 6954 | 6954 | PyLongWriter_Discard(PyLongWriter *writer) | |
| 6955 | 6955 | { | |
| 6956 | + if (writer == NULL) { | ||
| 6957 | + return; | ||
| 6958 | + } | ||
| 6959 | + | ||
| 6956 | 6960 | PyLongObject *obj = (PyLongObject *)writer; | |
| 6957 | 6961 | assert(Py_REFCNT(obj) == 1); | |
| 6958 | 6962 | Py_DECREF(obj); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments