makeHardcodeGsettingsPatch: Fix schemaExistsFunction w/o stdbool.h

If project uses C and does not include `stdbool.h`,
it will not have available lowercase booleans.
However, since this tool targets GLib programs,
we can rely on uppercase constants defined by GLib.
This commit is contained in:
Jan Tojnar
2025-05-17 19:55:04 +02:00
parent fa939cd6a0
commit 5309164a96
2 changed files with 4 additions and 4 deletions

View File

@@ -162,4 +162,4 @@ expression SCHEMA_ID;
identifier schema_exists_fn.fn;
@@
-fn(SCHEMA_ID)
+true
+TRUE

View File

@@ -74,7 +74,7 @@ void schema_id_with_path() {
}
void exists_fn_guard() {
if (!true) {
if (!TRUE) {
return;
}
@@ -89,7 +89,7 @@ void exists_fn_guard() {
}
void exists_fn_nested() {
if (true) {
if (TRUE) {
g_autoptr(GSettings) settings = NULL;
{
g_autoptr(GSettingsSchemaSource) schema_source;
@@ -102,7 +102,7 @@ void exists_fn_nested() {
}
void exists_fn_unknown() {
if (true) {
if (TRUE) {
g_autoptr(GSettings) settings = NULL;
{
g_autoptr(GSettingsSchemaSource) schema_source;