fix readability-braces-around-statements
This commit is contained in:
@@ -511,8 +511,9 @@ inline PyObject * PyAsUnicodeObject(const char *str)
|
||||
// Returns a new reference, don't increment it!
|
||||
Py_ssize_t len = Py_SAFE_DOWNCAST(strlen(str), size_t, Py_ssize_t);
|
||||
PyObject *p = PyUnicode_DecodeUTF8(str, len, nullptr);
|
||||
if (!p)
|
||||
if (!p) {
|
||||
throw Base::UnicodeError("UTF8 conversion failure at PyAsUnicodeString()");
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -547,8 +548,9 @@ inline void PyTypeCheck(PyObject** ptr, int (*method)(PyObject*), const char* ms
|
||||
*ptr = nullptr;
|
||||
return;
|
||||
}
|
||||
if (!method(*ptr))
|
||||
if (!method(*ptr)) {
|
||||
throw Base::TypeError(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user