CPython: py_capi_utils: use more descriptive names for format string utilities.
This commit is contained in:
@@ -132,7 +132,7 @@ Py_LOCAL_INLINE(int64_t) PyC_Long_AsI64(PyObject *value) { return (int64_t)PyLo
|
||||
Py_LOCAL_INLINE(uint64_t) PyC_Long_AsU64(PyObject *value) { return (uint64_t)PyLong_AsUnsignedLongLong(value); }
|
||||
|
||||
/* utils for format string in `struct` module style syntax */
|
||||
Py_LOCAL_INLINE(char) PyC_Formatstr_get(const char *typestr)
|
||||
Py_LOCAL_INLINE(char) PyC_Formatchar_get(const char *typestr)
|
||||
{
|
||||
switch (typestr[0]) {
|
||||
case '!':
|
||||
@@ -146,7 +146,7 @@ Py_LOCAL_INLINE(char) PyC_Formatstr_get(const char *typestr)
|
||||
}
|
||||
}
|
||||
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatstr_is_float(char format)
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatchar_is_floating_type(char format)
|
||||
{
|
||||
switch (format) {
|
||||
case 'f':
|
||||
@@ -158,7 +158,7 @@ Py_LOCAL_INLINE(bool) PyC_Formatstr_is_float(char format)
|
||||
}
|
||||
}
|
||||
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatstr_is_int(char format)
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatchar_is_integer_type(char format)
|
||||
{
|
||||
switch (format) {
|
||||
case 'i':
|
||||
@@ -180,7 +180,7 @@ Py_LOCAL_INLINE(bool) PyC_Formatstr_is_int(char format)
|
||||
}
|
||||
}
|
||||
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatstr_is_byte(char format)
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatchar_is_byte_type(char format)
|
||||
{
|
||||
switch (format) {
|
||||
case 'c':
|
||||
@@ -192,7 +192,7 @@ Py_LOCAL_INLINE(bool) PyC_Formatstr_is_byte(char format)
|
||||
}
|
||||
}
|
||||
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatstr_is_bool(char format)
|
||||
Py_LOCAL_INLINE(bool) PyC_Formatchar_is_boolean_type(char format)
|
||||
{
|
||||
switch (format) {
|
||||
case '?':
|
||||
|
Reference in New Issue
Block a user