Last-minute changes to get Guile examples running on Guile1.4 on Solaris.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@846 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2000-09-04 17:35:58 +00:00
commit cc80874371
2 changed files with 9 additions and 8 deletions

View file

@ -271,13 +271,13 @@ GUILE_LIBOPTS = @GUILELINK@ @LIBS@ $(SYSLIBS)
guile_static: $(SRCS)
$(SWIG) -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
$(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) \
-DSWIGINIT="scm_init_$(TARGET)_module();" \
-DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
$(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
guile_static_cpp: $(SRCS)
$(SWIG) -c++ -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
$(CXX) $(CFLAGS) $(ISRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \
-DSWIGINIT="scm_init_$(TARGET)_module();" \
-DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
$(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile

View file

@ -115,7 +115,7 @@
(rand-loop M (+ i 1) 0))))
(rand-loop M 0 0))
;;; stray definitions colleced here
;;; stray definitions collected here
(define (rot-test M v t i)
(if (< i 360) (begin
@ -124,10 +124,11 @@
(transform M v t)
(rot-test M v t (+ i 1)))))
(define (create-matrix i) ; Create some matrices
(if (< i 200)
(cons (new-matrix) (create-matrix (+ i 1)))
(list)))
(define (create-matrix) ; Create some matrices
(let loop ((i 0) (result '()))
(if (< i 200)
(loop (+ i 1) (cons (new-matrix) result))
result)))
(define (add-mat M ML)
(define (add-two m1 m2 i j)
@ -161,7 +162,7 @@
(define M1 (new-matrix)) ; a matrix
(define v (createv 1 2 3 4)) ; a vector
(define t (createv 0 0 0 0)) ; the zero-vector
(define M-list (create-matrix 0)) ; get list of marices
(define M-list (create-matrix)) ; get list of marices
(define M (new-matrix)) ; yet another matrix
(display "variables defined\n")