File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1653,7 +1653,7 @@ void handle_invalid_doc_error(PyObject* dict) {
16531653 PyObject * InvalidDocument = _error ("InvalidDocument" );
16541654 if (InvalidDocument == NULL ) {
16551655 PyErr_Restore (etype , evalue , etrace );
1656- return 0 ;
1656+ return ;
16571657 }
16581658
16591659 if (PyErr_GivenExceptionMatches (etype , InvalidDocument )) {
@@ -1670,19 +1670,18 @@ void handle_invalid_doc_error(PyObject* dict) {
16701670 PyObject * dict_str = PyObject_Str (dict );
16711671 if (dict_str == NULL ) {
16721672 Py_DECREF (msg );
1673- return 0 ;
1673+ return ;
16741674 }
1675- PyObject * dict_str_utf8 = PyUnicode_AsUTF8 (dict );
1675+ const char * dict_str_utf8 = PyUnicode_AsUTF8 (dict );
16761676 Py_DECREF (dict_str );
16771677 if (dict_str_utf8 == NULL ) {
16781678 Py_DECREF (msg );
1679- return 0
1679+ return ;
16801680 }
1681- PyObject * msg_utf8 = PyUnicode_AsUTF8 (msg );
1681+ const char * msg_utf8 = PyUnicode_AsUTF8 (msg );
16821682 if (msg_utf8 == NULL ) {
16831683 Py_DECREF (msg );
1684- Py_DECREF (dict_str_utf8 )
1685- return 0
1684+ return ;
16861685 }
16871686 PyObject * new_msg = PyUnicode_FromFormat ("Invalid document %s | %s" , dict_str_utf8 , msg_utf8 );
16881687 Py_DECREF (msg_utf8 );
You can’t perform that action at this time.
0 commit comments