mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
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:
@@ -162,4 +162,4 @@ expression SCHEMA_ID;
|
||||
identifier schema_exists_fn.fn;
|
||||
@@
|
||||
-fn(SCHEMA_ID)
|
||||
+true
|
||||
+TRUE
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user