Hi, I recently moved some files from src/engine to src/core-utils (gnc- filepath-utils.*).
The move in itself went ok, but there are still some function definitions in src/engine/engine.i for functions that have moved to src/core-utils. I figured to simply move them from engine.i to src/core-utils/core-utils.i and be done with it (see the attached diff). Unfortunately that doesn't work. Suddenly the report system complains about an unbound variable: Backtrace: In unknown file: ?: 0* [primitive-load-path "html-style-sheet.scm"] In /home/janssege/Development/Sandbox/GC-Webkit/share/gnucash/scm/html-style- sheet.scm: 128: 1* (define gnc:current-saved-stylesheets #) 129: 2* (gnc-build-dotgnucash-path "stylesheets-2.0") /home/janssege/Development/Sandbox/GC-Webkit/share/gnucash/scm/html-style- sheet.scm:129:3: In expression (gnc-build-dotgnucash-path "stylesheets-2.0"): /home/janssege/Development/Sandbox/GC-Webkit/share/gnucash/scm/html-style- sheet.scm:129:3: Unbound variable: gnc-build-dotgnucash-path I have been trying to solve this for half a day now, but I seem to get nowhere. I have tried adding (use-modules (gnucash core-utils)) or (gnc:module-load "gnucash/core-utils" 0) to report-system.scm, but to no avail. I must be missing something, but I don't know enough of how the guile integration works and the role automake plays in this. Can someone a bit more experienced in this area give me some guidance or a pointer ? Thanks, Geert
Index: src/core-utils/core-utils.i =================================================================== --- src/core-utils/core-utils.i (revision 18831) +++ src/core-utils/core-utils.i (working copy) @@ -2,6 +2,7 @@ %{ #include <guile-mappings.h> #include <gnc-glib-utils.h> +#include <gnc-filepath-utils.h> #include <gnc-main.h> #include <glib.h> @@ -34,4 +35,10 @@ { return gnc_utf8_validate(str, -1, 0); } + +%newobject gnc_build_dotgnucash_path; +gchar * gnc_build_dotgnucash_path (const gchar *filename); +%newobject gnc_build_book_path; +gchar * gnc_build_book_path (const gchar *filename); + %} Index: src/engine/engine.i =================================================================== --- src/engine/engine.i (revision 18831) +++ src/engine/engine.i (working copy) @@ -9,7 +9,6 @@ #include <gnc-budget.h> #include <gnc-commodity.h> #include <gnc-engine.h> -#include <gnc-filepath-utils.h> #include <gnc-pricedb.h> #include <gnc-lot.h> #include <gnc-session-scm.h> @@ -69,8 +68,6 @@ %newobject xaccSplitGetCorrAccountFullName; %newobject gnc_numeric_to_string; -%newobject gnc_build_dotgnucash_path; -%newobject gnc_build_book_path; /* Parse the header file to generate wrappers */ %inline { @@ -146,9 +143,6 @@ Timespec timespecCanonicalDayTime(Timespec t); -gchar * gnc_build_dotgnucash_path (const gchar *filename); -gchar * gnc_build_book_path (const gchar *filename); - %include <gnc-budget.h> %typemap(in) GList * {
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel