From 7004c2691d5695471c7bce9d62b82a1914cf05a2 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 7 Jun 2005 19:09:51 +0000 Subject: [PATCH] r10563: add module keyword to def-function --- tests/atoifl.lisp | 3 +++ tests/casts.lisp | 2 ++ tests/foreign-var.lisp | 6 +++--- tests/getenv.lisp | 3 +++ tests/gethostname.lisp | 1 + tests/strtol.lisp | 1 + tests/time.lisp | 4 ++++ tests/uffi-c-test-lib.lisp | 17 ++++++++++++----- 8 files changed, 29 insertions(+), 8 deletions(-) diff --git a/tests/atoifl.lisp b/tests/atoifl.lisp index 8d65aa5..00bddbc 100644 --- a/tests/atoifl.lisp +++ b/tests/atoifl.lisp @@ -17,14 +17,17 @@ (uffi:def-function ("atoi" c-atoi) ((str :cstring)) + :module "c" :returning :int) (uffi:def-function ("atol" c-atol) ((str :cstring)) + :module "c" :returning :long) (uffi:def-function ("atof" c-atof) ((str :cstring)) + :module "c" :returning :double) (defun atoi (str) diff --git a/tests/casts.lisp b/tests/casts.lisp index a665459..da4bfa5 100644 --- a/tests/casts.lisp +++ b/tests/casts.lisp @@ -15,10 +15,12 @@ (uffi:def-function ("cast_test_int" cast-test-int) () + :module "c-uffi-test" :returning :pointer-void) (uffi:def-function ("cast_test_float" cast-test-float) () + :module "c-uffi-test" :returning :pointer-void) (deftest cast.1 diff --git a/tests/foreign-var.lisp b/tests/foreign-var.lisp index ee9bd22..9409eea 100644 --- a/tests/foreign-var.lisp +++ b/tests/foreign-var.lisp @@ -39,17 +39,17 @@ (d :double)) (uffi:def-foreign-var ("fvar_struct" *fvar-struct*) fvar-struct - "uffi_tests") + "c-uffi-tests") (uffi:def-function ("fvar_struct_int" fvar-struct-int) () :returning :int - :module "uffi_tests") + :module "c-uffi-test") (uffi:def-function ("fvar_struct_double" fvar-struct-double) () :returning :double - :module "uffi_tests") + :module "c-uffi-test") (deftest fvarst.1 *fvar-addend* 3) (deftest fvarst.2 (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 42) diff --git a/tests/getenv.lisp b/tests/getenv.lisp index 19fe193..6fafc45 100644 --- a/tests/getenv.lisp +++ b/tests/getenv.lisp @@ -18,16 +18,19 @@ (uffi:def-function ("getenv" c-getenv) ((name :cstring)) + :module "c" :returning :cstring) (uffi:def-function ("setenv" c-setenv) ((name :cstring) (value :cstring) (overwrite :int)) + :module "c" :returning :int) (uffi:def-function ("unsetenv" c-unsetenv) ((name :cstring)) + :module "c" :returning :void) (defun my-getenv (key) diff --git a/tests/gethostname.lisp b/tests/gethostname.lisp index 8213740..577335a 100644 --- a/tests/gethostname.lisp +++ b/tests/gethostname.lisp @@ -22,6 +22,7 @@ (uffi:def-function ("gethostname" c-gethostname) ((name (* :unsigned-char)) (len :int)) + :module "c" :returning :int) (defun gethostname () diff --git a/tests/strtol.lisp b/tests/strtol.lisp index c3bfe13..b9b73bd 100644 --- a/tests/strtol.lisp +++ b/tests/strtol.lisp @@ -25,6 +25,7 @@ ((nptr char-ptr) (endptr (* char-ptr)) (base :int)) + :module "c" :returning :long) (defun strtol (str &optional (base 10)) diff --git a/tests/time.lisp b/tests/time.lisp index cccd0b4..01c2090 100644 --- a/tests/time.lisp +++ b/tests/time.lisp @@ -32,14 +32,17 @@ (uffi:def-function ("time" c-time) ((time (* time-t))) + :module "c" :returning time-t) (uffi:def-function "gmtime" ((time (* time-t))) + :module "c" :returning (* tm)) (uffi:def-function "asctime" ((time (* tm))) + :module "c" :returning :cstring) (uffi:def-type time-t :unsigned-long) @@ -76,6 +79,7 @@ (uffi:def-function ("gettimeofday" c-gettimeofday) ((tv (* timeval)) (tz (* timezone))) + :module "c" :returning :int) (defun get-utime () diff --git a/tests/uffi-c-test-lib.lisp b/tests/uffi-c-test-lib.lisp index 95b411e..4e87608 100644 --- a/tests/uffi-c-test-lib.lisp +++ b/tests/uffi-c-test-lib.lisp @@ -19,6 +19,7 @@ (uffi:def-function ("cs_to_upper" cs-to-upper) ((input (* :unsigned-char))) :returning :void + :module "uffi-c-test" ) (defun string-to-upper (str) @@ -28,7 +29,8 @@ (uffi:def-function ("cs_count_upper" cs-count-upper) ((input :cstring)) - :returning :int) + :returning :int + :module "uffi-c-test") (defun string-count-upper (str) (uffi:with-cstring (str-cstring str) @@ -37,19 +39,24 @@ (uffi:def-function ("half_double_vector" half-double-vector) ((size :int) (vec (* :double))) - :returning :void) + :returning :void + :module "uffi-c-test") (uffi:def-function ("return_long_negative_one" return-long-negative-one) () - :returning :long) + :returning :long + :module "uffi-c-test") (uffi:def-function ("return_int_negative_one" return-int-negative-one) () - :returning :int) + :returning :int + :module "uffi-c-test") (uffi:def-function ("return_short_negative_one" return-short-negative-one) () - :returning :short) + :returning :short + :module "uffi-c-test") + (uffi:def-constant +double-vec-length+ 10) (defun test-half-double-vector () -- 2.34.1