fix(bindings): add utf-8 flag to python & node

This commit is contained in:
ObserverOfTime 2024-04-11 18:55:19 +03:00 committed by Amaan Qureshi
parent 8bfe4e1f6b
commit 7830877f63
2 changed files with 17 additions and 5 deletions

View file

@ -13,8 +13,17 @@
"src/parser.c",
# NOTE: if your language has an external scanner, add it here.
],
"cflags_c": [
"-std=c11",
"conditions": [
["OS!='win'", {
"cflags_c": [
"-std=c11",
],
}, { # OS == "win"
"cflags_c": [
"/std:c11",
"/utf-8",
],
}],
],
}
]

View file

@ -38,9 +38,12 @@ setup(
"src/parser.c",
# NOTE: if your language uses an external scanner, add it here.
],
extra_compile_args=(
["-std=c11"] if system() != 'Windows' else []
),
extra_compile_args=[
"-std=c11",
] if system() != "Windows" else [
"/std:c11",
"/utf-8",
],
define_macros=[
("Py_LIMITED_API", "0x03080000"),
("PY_SSIZE_T_CLEAN", None)