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) {
1653
1653
PyObject * InvalidDocument = _error ("InvalidDocument" );
1654
1654
if (InvalidDocument == NULL ) {
1655
1655
PyErr_Restore (etype , evalue , etrace );
1656
- return 0 ;
1656
+ return ;
1657
1657
}
1658
1658
1659
1659
if (PyErr_GivenExceptionMatches (etype , InvalidDocument )) {
@@ -1670,19 +1670,18 @@ void handle_invalid_doc_error(PyObject* dict) {
1670
1670
PyObject * dict_str = PyObject_Str (dict );
1671
1671
if (dict_str == NULL ) {
1672
1672
Py_DECREF (msg );
1673
- return 0 ;
1673
+ return ;
1674
1674
}
1675
- PyObject * dict_str_utf8 = PyUnicode_AsUTF8 (dict );
1675
+ const char * dict_str_utf8 = PyUnicode_AsUTF8 (dict );
1676
1676
Py_DECREF (dict_str );
1677
1677
if (dict_str_utf8 == NULL ) {
1678
1678
Py_DECREF (msg );
1679
- return 0
1679
+ return ;
1680
1680
}
1681
- PyObject * msg_utf8 = PyUnicode_AsUTF8 (msg );
1681
+ const char * msg_utf8 = PyUnicode_AsUTF8 (msg );
1682
1682
if (msg_utf8 == NULL ) {
1683
1683
Py_DECREF (msg );
1684
- Py_DECREF (dict_str_utf8 )
1685
- return 0
1684
+ return ;
1686
1685
}
1687
1686
PyObject * new_msg = PyUnicode_FromFormat ("Invalid document %s | %s" , dict_str_utf8 , msg_utf8 );
1688
1687
Py_DECREF (msg_utf8 );
You can’t perform that action at this time.
0 commit comments