Commit 5309164a authored by Jan Tojnar's avatar Jan Tojnar
Browse files

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.
parent fa939cd6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -162,4 +162,4 @@ expression SCHEMA_ID;
identifier schema_exists_fn.fn;
@@
-fn(SCHEMA_ID)
+true
+TRUE
+3 −3
Original line number Diff line number Diff line
@@ -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;