Use bool
Change-Id: I4c05c602ecdd77d07e8106387270bf01718e975b
This commit is contained in:
@@ -66,14 +66,14 @@ inline char * PyStr_AsString(PyObject *object)
|
|||||||
return PyUnicode_AsUTF8(object);
|
return PyUnicode_AsUTF8(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int PyStr_Check(PyObject *object)
|
inline bool PyStr_Check(PyObject *object)
|
||||||
{
|
{
|
||||||
return PyUnicode_Check(object);
|
return PyUnicode_Check(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
// compatibility wrappers for Python non-Unicode string/buffer type
|
// compatibility wrappers for Python non-Unicode string/buffer type
|
||||||
// (PyBytes in 3, PyString in 2)
|
// (PyBytes in 3, PyString in 2)
|
||||||
inline int PyStrBytes_Check(PyObject *object)
|
inline bool PyStrBytes_Check(PyObject *object)
|
||||||
{
|
{
|
||||||
return PyBytes_Check(object);
|
return PyBytes_Check(object);
|
||||||
}
|
}
|
||||||
@@ -103,11 +103,11 @@ inline PyObject* PyStr_FromString(const char *string)
|
|||||||
return PyString_FromString(string);
|
return PyString_FromString(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int PyStr_Check(PyObject *object)
|
inline bool PyStr_Check(PyObject *object)
|
||||||
{
|
{
|
||||||
return PyString_Check(object);
|
return PyString_Check(object);
|
||||||
}
|
}
|
||||||
inline int PyStrBytes_Check(PyObject *object)
|
inline bool PyStrBytes_Check(PyObject *object)
|
||||||
{
|
{
|
||||||
return PyString_Check(object);
|
return PyString_Check(object);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user