Fix running of Guile multivalue and std_vector examples
This commit is contained in:
parent
10acae18d2
commit
1adb239046
4 changed files with 6 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ TARGET = example
|
||||||
INTERFACE = example.i
|
INTERFACE = example.i
|
||||||
|
|
||||||
check: build
|
check: build
|
||||||
|
$(MAKE) -f ../Makefile RUNSCRIPT=runme.scm run_example
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
;;;; Show the three different ways to deal with multiple return values
|
;;;; Show the three different ways to deal with multiple return values
|
||||||
|
|
||||||
(use-modules (example))
|
(dynamic-call "scm_init_example_module" (dynamic-link "./libexample"))
|
||||||
|
|
||||||
;;; Multiple values as lists. By default, if more than one value is to
|
;;; Multiple values as lists. By default, if more than one value is to
|
||||||
;;; be returned, a list of the values is created and returned. The
|
;;; be returned, a list of the values is created and returned. The
|
||||||
|
|
@ -64,3 +64,4 @@
|
||||||
(display remainder)
|
(display remainder)
|
||||||
(newline))
|
(newline))
|
||||||
|
|
||||||
|
(exit 0)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ TARGET = example
|
||||||
INTERFACE = example.i
|
INTERFACE = example.i
|
||||||
|
|
||||||
check: build
|
check: build
|
||||||
|
$(MAKE) -f ../Makefile RUNSCRIPT=runme.scm run_example
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
;; run with mzscheme -r example.scm
|
|
||||||
|
|
||||||
(use-modules (example))
|
(dynamic-call "scm_init_example_module" (dynamic-link "./libexample"))
|
||||||
|
|
||||||
; repeatedly invoke a procedure with v and an index as arguments
|
; repeatedly invoke a procedure with v and an index as arguments
|
||||||
(define (with-vector v proc size-proc)
|
(define (with-vector v proc size-proc)
|
||||||
|
|
@ -52,3 +51,4 @@
|
||||||
(print-DoubleVector v)
|
(print-DoubleVector v)
|
||||||
(delete-DoubleVector v)
|
(delete-DoubleVector v)
|
||||||
|
|
||||||
|
(exit 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue