You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I follow the README but errors occur when make.
../pyapi/type_conversion.c: In function ‘pyobject_to_str’:
../pyapi/type_conversion.c:178:15: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
char *str = PyUnicode_AsUTF8(obj);
^
../pyapi/type_conversion.c: In function ‘pyobject_to_bte’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_bte’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:315:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bte, bte)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:315:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bte, bte)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_oid’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_oid’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:316:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(oid, oid)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:316:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(oid, oid)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_bit’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_bit’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:317:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bit, bit)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:317:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bit, bit)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_sht’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_sht’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:318:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(sht, sht)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:318:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(sht, sht)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_int’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_int’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:319:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(int, int)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:319:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(int, int)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_lng’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_lng’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:320:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(lng, lng)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:320:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(lng, lng)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_flt’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_flt’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:321:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(flt, lng)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:321:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(flt, lng)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_hge’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_hge’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:324:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(hge, hge)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:324:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(hge, hge)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_dbl’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_dbl’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:325:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(dbl, hge)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:325:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(dbl, hge)
^
type_conversion3.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-cast-function-type’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-format-truncation’ [-Werror]
cc1: all warnings being treated as errors_
The text was updated successfully, but these errors were encountered:
Hello,
I follow the README but errors occur when make.
../pyapi/type_conversion.c: In function ‘pyobject_to_str’:
../pyapi/type_conversion.c:178:15: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
char *str = PyUnicode_AsUTF8(obj);
^
../pyapi/type_conversion.c: In function ‘pyobject_to_bte’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_bte’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:315:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bte, bte)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:315:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bte, bte)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_oid’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_oid’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:316:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(oid, oid)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:316:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(oid, oid)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_bit’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_bit’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:317:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bit, bit)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:317:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(bit, bit)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_sht’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_sht’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:318:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(sht, sht)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:318:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(sht, sht)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_int’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_int’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:319:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(int, int)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:319:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(int, int)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_lng’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_lng’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:320:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(lng, lng)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:320:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(lng, lng)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_flt’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_flt’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:321:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(flt, lng)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:321:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(flt, lng)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_hge’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_hge’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:324:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(hge, hge)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:324:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(hge, hge)
^
../pyapi/type_conversion.c: In function ‘pyobject_to_dbl’:
../pyapi/type_conversion.c:291:24: error: passing argument 1 of ‘str_to_dbl’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
return str_to_##type(PyUnicode_AsUTF8(ptr), 0, value);
^
../pyapi/type_conversion.c:313:2: note: in expansion of macro ‘PY_TO_’
PY_TO_(tpe, inttpe);
^
../pyapi/type_conversion.c:325:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(dbl, hge)
^
../pyapi/type_conversion.c:209:6: note: expected ‘char *’ but argument is of type ‘const char *’
str str_to_##tpe(char *ptr, size_t maxsize, tpe *value)
^
../pyapi/type_conversion.c:302:2: note: in expansion of macro ‘STRING_TO_NUMBER_FACTORY’
STRING_TO_NUMBER_FACTORY(tpe)
^
../pyapi/type_conversion.c:325:1: note: in expansion of macro ‘CONVERSION_FUNCTION_FACTORY’
CONVERSION_FUNCTION_FACTORY(dbl, hge)
^
type_conversion3.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-cast-function-type’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-format-truncation’ [-Werror]
cc1: all warnings being treated as errors_
The text was updated successfully, but these errors were encountered: