Build Gauche shared object into library directory

This commit is contained in:
retropikzel 2025-03-11 12:52:58 +02:00
parent 4c99d3f805
commit 7245f59824
2 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,7 @@ gauche:
--cflags="-I." \
--libs=-lffi \
retropikzel-pffi-gauche pffi.c gauchelib.scm
mv retropikzel-pffi-gauche.so retropikzel/pffi/
jenkinsfile:
gosh -r7 -I ./snow build.scm

View File

@ -12,7 +12,7 @@
pffi-pointer->string
pffi-define))
(select-module retropikzel.pffi.gauche)
(dynamic-load "retropikzel-pffi-gauche")
(dynamic-load "retropikzel/pffi/retropikzel-pffi-gauche")
(define size-of-type
(lambda (type)
@ -160,6 +160,9 @@
(if (equal? return-type 'void)
0
(size-of-type return-type)))))
(display "Calling function: ")
(display c-name)
(newline)
(internal-ffi-call (length argument-types)
(pffi-type->libffi-type return-type)
(map pffi-type->libffi-type argument-types)