* src/gnc-module/gw-gnc-module-spec.scm: fix for new g-wrap.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6570 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Rob Browning
2002-01-09 21:46:25 +00:00
parent b79a78c6c7
commit 77fc6f2b5b

View File

@@ -1,43 +1,47 @@
;; -*-scheme-*-
(use-modules (g-wrap))
(define-module (g-wrapped gw-gnc-module-spec))
(debug-set! maxdepth 100000)
(debug-set! stack 2000000)
(let ((mod (gw:new-module "gw-gnc-module")))
(gw:module-depends-on mod "gw-runtime")
(gw:module-set-guile-module! mod '(g-wrapped gw-gnc-module))
(use-modules (g-wrap))
(gw:wrap-non-native-type mod '<gnc:module> "GNCModule" "const GNCModule")
(use-modules (g-wrap gw-standard-spec))
(use-modules (g-wrap gw-wct-spec))
(let ((ws (gw:new-wrapset "gw-gnc-module")))
(gw:wrapset-depends-on ws "gw-standard")
(gw:wrapset-depends-on ws "gw-wct")
(gw:wrapset-set-guile-module! ws '(g-wrapped gw-gnc-module))
(gw:wrap-as-wct ws '<gnc:module> "GNCModule" "const GNCModule")
(gw:module-set-declarations-ccodegen!
mod
(lambda (unused)
(gw:wrapset-add-cs-declarations!
ws
(lambda (wrapset client-wrapset)
(list "#include \"gnc-module.h\"\n")))
(gw:wrap-function
mod 'gnc:module-system-refresh
ws 'gnc:module-system-refresh
'<gw:void> "gnc_module_system_refresh"
'() "Reload the database of modules in the GNC_MODULE_PATH.")
(gw:wrap-function
mod 'gnc:module-load
ws 'gnc:module-load
'<gnc:module> "gnc_module_load"
'((<gw:m-chars-caller-owned> module-name) (<gw:int> interface))
'(((<gw:mchars> caller-owned) module-name) (<gw:int> interface))
"Load and initialize a gnc-module")
(gw:wrap-function
mod 'gnc:module-unload
ws 'gnc:module-unload
'<gw:bool> "gnc_module_unload"
'((<gnc:module> module))
"Unreference a gnc-module. Module will unload when refcount goes to 0")
(gw:wrap-function
mod 'gnc:module-lookup
ws 'gnc:module-lookup
'<gw:void*> "gnc_module_lookup"
'((<gnc:module> module)
(<gw:m-chars-caller-owned> symbol))
"Look up a symbol in the module. module must be loaded already.")
)
((<gw:mchars> caller-owned) symbol))
"Look up a symbol in the module. module must be loaded already."))