From 1b3b2b08c3a9fef9bc4d178b94f52b9fcb3dc64d Mon Sep 17 00:00:00 2001 From: KonstantIMP <43513955+KonstantIMP@users.noreply.github.com> Date: Sun, 16 Jan 2022 12:05:16 +0300 Subject: [PATCH 1/4] Update for new linker class destination --- source/gtd/GirStruct.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gtd/GirStruct.d b/source/gtd/GirStruct.d index 6d1ab7c..5eb0711 100644 --- a/source/gtd/GirStruct.d +++ b/source/gtd/GirStruct.d @@ -901,7 +901,7 @@ final class GirStruct imports ~= "glib.MemorySlice"; if ( wrapper.useRuntimeLinker && (shouldFree() || isSimpleStruct()) ) - imports ~= "gtkd.Loader"; + imports ~= "linker.Loader"; if ( isSimpleStruct() ) { From 2404741b6678d18286e6a8a50abb6f31eeb991dd Mon Sep 17 00:00:00 2001 From: KonstantIMP <43513955+KonstantIMP@users.noreply.github.com> Date: Sun, 16 Jan 2022 12:18:23 +0300 Subject: [PATCH 2/4] Fix useless isLoaded(string []) usage --- source/gtd/GirStruct.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gtd/GirStruct.d b/source/gtd/GirStruct.d index 5eb0711..22b1e94 100644 --- a/source/gtd/GirStruct.d +++ b/source/gtd/GirStruct.d @@ -434,7 +434,7 @@ final class GirStruct buff ~= indenter.format("{"); if ( wrapper.useRuntimeLinker ) - buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~") && ownedRef )"); + buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~")[0] && ownedRef )"); else buff ~= indenter.format("if ( ownedRef )"); @@ -452,7 +452,7 @@ final class GirStruct buff ~= indenter.format("{"); if ( wrapper.useRuntimeLinker ) - buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~") && ownedRef )"); + buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~")[0] && ownedRef )"); else buff ~= indenter.format("if ( ownedRef )"); From c44ed34d0ef9a59cd788c875ae9443aff296f8fc Mon Sep 17 00:00:00 2001 From: KonstantIMP <43513955+KonstantIMP@users.noreply.github.com> Date: Sun, 16 Jan 2022 13:07:29 +0300 Subject: [PATCH 3/4] Fix gtkd.Loader import --- source/gtd/GirPackage.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gtd/GirPackage.d b/source/gtd/GirPackage.d index b12c9d5..5e50a06 100644 --- a/source/gtd/GirPackage.d +++ b/source/gtd/GirPackage.d @@ -455,7 +455,7 @@ final class GirPackage if ( name == "gdk" || name == "pango" ) buff ~= "import cairo.c.types;\n"; - buff ~= "import gtkd.Loader;\n\n"; + buff ~= "import linker.Loader;\n\n"; buff ~= getLibraries(); buff ~= "\n\nshared static this()\n{"; From 2cdd5e2862b3cc5209c0584a68815695f78de343 Mon Sep 17 00:00:00 2001 From: KonstantIMP <43513955+KonstantIMP@users.noreply.github.com> Date: Sun, 16 Jan 2022 13:37:22 +0300 Subject: [PATCH 4/4] Fix isLoaded --- source/gtd/GirStruct.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gtd/GirStruct.d b/source/gtd/GirStruct.d index 22b1e94..98e648c 100644 --- a/source/gtd/GirStruct.d +++ b/source/gtd/GirStruct.d @@ -434,7 +434,7 @@ final class GirStruct buff ~= indenter.format("{"); if ( wrapper.useRuntimeLinker ) - buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~")[0] && ownedRef )"); + buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~"[0]) && ownedRef )"); else buff ~= indenter.format("if ( ownedRef )"); @@ -452,7 +452,7 @@ final class GirStruct buff ~= indenter.format("{"); if ( wrapper.useRuntimeLinker ) - buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~")[0] && ownedRef )"); + buff ~= indenter.format("if ( Linker.isLoaded(LIBRARY_"~ pack.name.replace(".","").toUpper() ~"[0]) && ownedRef )"); else buff ~= indenter.format("if ( ownedRef )");