Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Deprecate cffi-features.

- Keep it around for backwards compatibility.
- Don't use it from CFFI itself or the test suite.
- Update the manual.
  • Loading branch information...
commit 0f40767045ed09a8f2ad422d74cdefc72dfee51c 1 parent 62c6a8a
@luismbo luismbo authored
View
6 cffi.asd
@@ -38,8 +38,7 @@
((:module src
:serial t
:components
- ((:file "features")
- #+openmcl (:file "cffi-openmcl")
+ (#+openmcl (:file "cffi-openmcl")
#+sbcl (:file "cffi-sbcl")
#+cmu (:file "cffi-cmucl")
#+scl (:file "cffi-scl")
@@ -56,7 +55,8 @@
(:file "enum")
(:file "strings")
(:file "functions")
- (:file "foreign-vars")))))
+ (:file "foreign-vars")
+ (:file "features")))))
(defmethod operation-done-p ((o test-op) (c (eql (find-system :cffi))))
nil)
View
52 doc/cffi-manual.texinfo
@@ -1774,7 +1774,7 @@ natively on all implementations. However, they are emulated by
@code{mem-ref} and @code{mem-set}.
When those types are @strong{not} available, the symbol
-@code{cffi-features:no-long-long} is pushed into @code{*features*}.
+@code{cffi-sys::no-long-long} is pushed into @code{*features*}.
@ForeignType{:uchar}
@ForeignType{:ushort}
@@ -5097,7 +5097,7 @@ foreign functions.
@item
Corman Lisp does not support @code{foreign-funcall}. On
implementations that @strong{don't} support @code{foreign-funcall}
-@code{cffi-features:no-foreign-funcall} will be present in
+@code{cffi-sys::no-foreign-funcall} will be present in
@code{*features*}. Note: in these Lisps you can still use the
@code{defcfun} interface.
@end itemize
@@ -5192,7 +5192,7 @@ foreign functions.
@item
Corman Lisp does not support @code{foreign-funcall}. On
implementations that @strong{don't} support @code{foreign-funcall}
-@code{cffi-features:no-foreign-funcall} will be present in
+@code{cffi-sys::no-foreign-funcall} will be present in
@code{*features*}. Note: in these Lisps you can still use the
@code{defcfun} interface.
@end itemize
@@ -5410,14 +5410,11 @@ Creates a new library designator called @var{name}. The
When trying to load the library @var{name}, the relevant function
searches the @var{load-clause}s in order for the first one where
@var{feature} evaluates to true. That happens for any of the
-following situations:@footnote{This is described in
-@code{cffi-feature-p} in @file{libraries.lisp}.}
+following situations:
@enumerate 1
@item
-If @var{feature} is a symbol (idiomatically a keyword), a symbol with
-the same name, but interned into the @code{cffi-features} package, is
-present in @code{common-lisp:*features*}.
+If @var{feature} is a symbol present in @code{common-lisp:*features*}.
@item
If @var{feature} is a list, depending on @code{(first @var{feature})},
@@ -5957,7 +5954,7 @@ forms. For example:
@end deffn
@lisp
-#+cffi-features:freebsd
+#+freebsd
(progn
(constant (ev-enable "EV_ENABLE"))
(constant (ev-disable "EV_DISABLE")))
@@ -6171,54 +6168,31 @@ C @code{struct}s cannot be passed by value.
@node Platform-specific features
@appendix Platform-specific features
-@cffi{} does some platform tests on loading. The details vary between
-Lisps; in fact, the purpose is to unify the list of available platform
-features for use elsewhere in the @cffi{} code. These features are
-also part of the public interface; see @ref{define-foreign-library}.
-
-The exact meanings of the features follow. Though you will usually
-refer to these symbols as keywords, @cffi{} internally views them in
-the package @code{cffi-features}.
+Whenever a backend doesn't support one of @cffi{}'s features, a
+specific symbol is pushed onto @code{common-lisp:*features*}. The
+meanings of these symbol follow.
@table @var
-@item flat-namespace
+@item cffi-sys::flat-namespace
This Lisp has a flat namespace for foreign symbols meaning that you
won't be able to load two different libraries with homograph functions
and successfully differentiate them through the @code{:library}
option to @code{defcfun}, @code{defcvar}, etc@dots{}
-@item darwin
-This operating system is Darwin or a derivative thereof, such as
-Mac @acronym{OS X}.
-
-@item no-foreign-funcall
+@item cffi-sys::no-foreign-funcall
The macro @code{foreign-funcall} is @strong{not} available. On such
platforms, the only way to call a foreign function is through
@code{defcfun}. @xref{foreign-funcall}, and @ref{defcfun}.
-@item no-long-long
+@item cffi-sys::no-long-long
The C @code{long long} type is @strong{not} available as a foreign
type.
-@item no-stdcall
+@item cffi-sys::no-stdcall
This Lisp doesn't support the @code{stdcall} calling convention. Note
that it only makes sense to support @code{stdcall} on (32-bit) x86
platforms.
-@item ppc32
-The underlying @acronym{CPU} architecture is 32-bit PowerPC.
-
-@item unix
-This operating system is a @sc{unix}-like, such as
-@acronym{GNU}/Linux, Darwin, or even Cygwin on Lisps that show the
-@sc{unix}-like interface provided by Cygwin to Lisp code.
-
-@item windows
-This operating system is Windows.
-
-@item x86
-The underlying @acronym{CPU} architecture is x86, such as on
-processors from Intel or @acronym{AMD}.
@end table
View
6 src/cffi-allegro.lisp
@@ -62,10 +62,8 @@
;;;# Mis-features
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(cffi-features:no-long-long
- cffi-features:flat-namespace)))
+(pushnew 'no-long-long *features*)
+(pushnew 'flat-namespace *features*)
;;;# Symbol Case
View
2  src/cffi-clisp.lisp
@@ -96,7 +96,7 @@
;; of foreign types part of the public interface in CLisp. :-)
(defun %foreign-type-alignment (type)
"Return the structure alignment in bytes of foreign TYPE."
- #+(and cffi-features:darwin cffi-features:ppc32)
+ #+(and darwin ppc)
(case type
((:double :long-long :unsigned-long-long)
(return-from %foreign-type-alignment 8)))
View
6 src/cffi-cmucl.lisp
@@ -60,11 +60,9 @@
(in-package #:cffi-sys)
-;;;# Features
+;;;# Misfeatures
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(cffi-features:flat-namespace)))
+(pushnew 'flat-namespace *features*)
;;;# Symbol Case
View
8 src/cffi-corman.lisp
@@ -63,12 +63,10 @@
(in-package #:cffi-sys)
-;;;# Mis-features
+;;;# Misfeatures
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(cffi-features:no-long-long
- cffi-features:no-foreign-funcall)))
+(pushnew 'no-long-long *features*)
+(pushnew 'no-foreign-funcall *features*)
;;;$ Symbol Case
View
6 src/cffi-ecl.lisp
@@ -60,10 +60,8 @@
;;;# Mis-features
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(#-x86-64 cffi-features:no-long-long
- cffi-features:flat-namespace)))
+(pushnew 'no-long-long *features*)
+(pushnew 'flat-namespace *features*)
;;;# Symbol Case
View
6 src/cffi-lispworks.lisp
@@ -60,11 +60,9 @@
(in-package #:cffi-sys)
-;;;# Mis-features
+;;;# Misfeatures
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(#-lispworks-64bit cffi-features:no-long-long)))
+#-lispworks-64bit (pushnew 'no-long-long *features*)
;;;# Symbol Case
View
6 src/cffi-openmcl.lisp
@@ -60,11 +60,9 @@
(in-package #:cffi-sys)
-;;;# Mis-features
+;;;# Misfeatures
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(cffi-features:flat-namespace)))
+(pushnew 'flat-namespace *features*)
;;;# Symbol Case
View
6 src/cffi-sbcl.lisp
@@ -60,11 +60,9 @@
(in-package #:cffi-sys)
-;;;# Mis-features
+;;;# Misfeatures
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(cffi-features:flat-namespace)))
+(pushnew 'flat-namespace *features*)
;;;# Symbol Case
View
4 src/cffi-scl.lisp
@@ -63,9 +63,7 @@
;;;# Mis-features
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (mapc (lambda (feature) (pushnew feature *features*))
- '(cffi-features:flat-namespace)))
+(pushnew 'flat-namespace *features*)
;;;# Symbol Case
View
13 src/features.lisp
@@ -34,9 +34,9 @@
;;; *features*. See each cffi-*.lisp file.
;;;
;;; Not anymore, I think we should use TRIVIAL-FEATURES for the
-;;; platform features instead. Less pain. And maybe the
-;;; CFFI-specific features should be in the CFFI-SYS package,
-;;; unexported? This is here now for backwards compatibility.
+;;; platform features instead. Less pain. CFFI-FEATURES is now
+;;; deprecated and this code will stay here for a while for backwards
+;;; compatibility purposes, to be removed in a future release.
(defpackage #:cffi-features
(:use #:cl)
@@ -103,4 +103,9 @@ that belong to the CFFI-FEATURES package."
#+sparc sparc
#+sparc64 sparc64
#+hppa hppa
- #+hppa64 hppa64))
+ #+hppa64 hppa64
+ #+cffi-sys::no-long-long no-long-long
+ #+cffi-sys::flat-namespace flat-namespace
+ #+cffi-sys::no-foreign-funcall no-foreign-funcall
+ #+cffi-sys::no-stdcall no-stdcall
+ ))
View
12 src/libraries.lisp
@@ -95,7 +95,7 @@
;;;
;;; This information is stored in the *FOREIGN-LIBRARIES* hashtable
;;; and when the library is loaded through LOAD-FOREIGN-LIBRARY (or
-;;; USE-FOREIGN-LIBRARY) the first clause matched by CFFI-FEATURE-P is
+;;; USE-FOREIGN-LIBRARY) the first clause matched by FEATUREP is
;;; processed.
(defvar *foreign-libraries* (make-hash-table :test 'eq)
@@ -117,7 +117,7 @@
(setf (gethash name *foreign-libraries*) value))
(defun %foreign-library-spec (lib)
- (assoc-if #'cffi-feature-p (slot-value lib 'spec)))
+ (assoc-if #'featurep (slot-value lib 'spec)))
(defun foreign-library-spec (lib)
(second (%foreign-library-spec lib)))
@@ -211,9 +211,9 @@ none of alternatives were successfully loaded."
(fl-error "Unable to load any of the alternatives:~% ~S" library-list))
(defparameter *cffi-feature-suffix-map*
- '((cffi-features:windows . ".dll")
- (cffi-features:darwin . ".dylib")
- (cffi-features:unix . ".so")
+ '((:windows . ".dll")
+ (:darwin . ".dylib")
+ (:unix . ".so")
(t . ".so"))
"Mapping of OS feature keywords to shared library suffixes.")
@@ -221,7 +221,7 @@ none of alternatives were successfully loaded."
"Return a string to use as default library suffix based on the
operating system. This is used to implement the :DEFAULT option.
This will need to be extended as we test on more OSes."
- (or (cdr (assoc-if #'cffi-feature-p *cffi-feature-suffix-map*))
+ (or (cdr (assoc-if #'featurep *cffi-feature-suffix-map*))
(fl-error "Unable to determine the default library suffix on this OS.")))
(defun load-foreign-library-helper (name thing)
View
18 src/types.lisp
@@ -42,7 +42,7 @@
(define-built-in-foreign-type :double)
(define-built-in-foreign-type :void)
-#-cffi-features:no-long-long
+#-cffi-sys::no-long-long
(progn
(define-built-in-foreign-type :long-long)
(define-built-in-foreign-type :unsigned-long-long))
@@ -53,7 +53,7 @@
;;; A possibly better, certainly faster though more intrusive,
;;; alternative is available here:
;;; <http://article.gmane.org/gmane.lisp.cffi.devel/1091>
-#+cffi-features:no-long-long
+#+cffi-sys::no-long-long
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass emulated-llong-type (foreign-type) ())
(defmethod foreign-type-size ((tp emulated-llong-type)) 8)
@@ -96,7 +96,7 @@
value))
;;; When some lisp other than SCL supports :long-double we should
-;;; use #-cffi-features:no-long-double here instead.
+;;; use #-cffi-sys::no-long-double here instead.
#+(and scl long-float) (define-built-in-foreign-type :long-double)
;;;# Foreign Pointers
@@ -110,7 +110,7 @@ we don't return its 'value' but a pointer to it, which is PTR itself."
(if (aggregatep ptype)
(inc-pointer ptr offset)
(let ((ctype (canonicalize ptype)))
- #+cffi-features:no-long-long
+ #+cffi-sys::no-long-long
(when (or (eq ctype :long-long) (eq ctype :unsigned-long-long))
(return-from mem-ref
(translate-from-foreign (%emulated-mem-ref-64 ptr ctype offset)
@@ -124,7 +124,7 @@ we don't return its 'value' but a pointer to it, which is PTR itself."
(let* ((parsed-type (parse-type (eval type)))
(ctype (canonicalize parsed-type)))
;; Bail out when using emulated long long types.
- #+cffi-features:no-long-long
+ #+cffi-sys::no-long-long
(when (member ctype '(:long-long :unsigned-long-long))
(return-from mem-ref form))
(if (aggregatep parsed-type)
@@ -136,7 +136,7 @@ we don't return its 'value' but a pointer to it, which is PTR itself."
"Set the value of TYPE at OFFSET bytes from PTR to VALUE."
(let* ((ptype (parse-type type))
(ctype (canonicalize ptype)))
- #+cffi-features:no-long-long
+ #+cffi-sys::no-long-long
(when (or (eq ctype :long-long) (eq ctype :unsigned-long-long))
(return-from mem-set
(%emulated-mem-set-64 (translate-to-foreign value ptype)
@@ -177,7 +177,7 @@ to open-code (SETF MEM-REF) forms."
(let* ((parsed-type (parse-type (eval type)))
(ctype (canonicalize parsed-type)))
;; Bail out when using emulated long long types.
- #+cffi-features:no-long-long
+ #+cffi-sys::no-long-long
(when (member ctype '(:long-long :unsigned-long-long))
(return-from mem-set form))
`(%mem-set ,(expand-to-foreign value parsed-type) ,ptr ,ctype ,offset))
@@ -821,8 +821,8 @@ The buffer has dynamic extent and may be stack allocated."
'foreign-boolean-type :actual-type
(ecase (canonicalize-foreign-type base-type)
((:char :unsigned-char :int :unsigned-int :long :unsigned-long
- #-cffi-features:no-long-long :long-long
- #-cffi-features:no-long-long :unsigned-long-long) base-type))))
+ #-cffi-sys::no-long-long :long-long
+ #-cffi-sys::no-long-long :unsigned-long-long) base-type))))
(defmethod translate-to-foreign (value (type foreign-boolean-type))
(if value 1 0))
View
38 tests/callbacks.lisp
@@ -40,7 +40,7 @@
(defcfun "expect_pointer_sum" :int (f :pointer))
(defcfun "expect_strcat" :int (f :pointer))
-#-cffi-features:no-long-long
+#-cffi-sys::no-long-long
(progn
(defcfun "expect_long_long_sum" :int (f :pointer))
(defcfun "expect_unsigned_long_long_sum" :int (f :pointer)))
@@ -81,7 +81,7 @@
((a :unsigned-long) (b :unsigned-long))
(+ a b))
-#-cffi-features:no-long-long
+#-cffi-sys::no-long-long
(progn
(defcallback sum-long-long :long-long
((a :long-long) (b :long-long))
@@ -142,7 +142,7 @@
(expect-unsigned-long-sum (callback sum-unsigned-long))
1)
-#-cffi-features:no-long-long
+#-cffi-sys::no-long-long
(progn
#+openmcl (push 'callbacks.long-long rt::*expected-failures*)
@@ -175,11 +175,11 @@
(expect-strcat (callback lisp-strcat))
1)
-#-cffi-features:no-foreign-funcall
+#-cffi-sys::no-foreign-funcall
(defcallback return-a-string-not-nil :string ()
"abc")
-#-cffi-features:no-foreign-funcall
+#-cffi-sys::no-foreign-funcall
(deftest callbacks.string-not-docstring
(foreign-funcall-pointer (callback return-a-string-not-nil) () :string)
"abc")
@@ -216,11 +216,11 @@
(defcfun "pass_int_ref" :void (f :pointer))
;;; CMUCL chokes on this one for some reason.
-#-(and cffi-features:darwin cmu)
+#-(and darwin cmu)
(defcallback read-int-from-pointer :void ((a :pointer))
(setq *int* (mem-ref a :int)))
-#+(and cffi-features:darwin cmu)
+#+(and darwin cmu)
(pushnew 'callbacks.void rt::*expected-failures*)
(deftest callbacks.void
@@ -232,7 +232,7 @@
;;; test funcalling of a callback and also declarations inside
;;; callbacks.
-#-cffi-features:no-foreign-funcall
+#-cffi-sys::no-foreign-funcall
(progn
(defcallback sum-2 :int ((a :int) (b :int) (c :int))
(declare (ignore c))
@@ -319,7 +319,7 @@
(format t "a~A: ~A~%" i arg))
(reduce #'+ args)))
-#+(or openmcl cmu ecl (and cffi-features:darwin (or allegro lispworks)))
+#+(or openmcl cmu ecl (and darwin (or allegro lispworks)))
(push 'callbacks.bff.1 regression-test::*expected-failures*)
#+#.(cl:if (cl:>= cl:lambda-parameters-limit 127) '(:and) '(:or))
@@ -329,7 +329,7 @@
;;; (cb-test)
-#-(or cffi-features:no-long-long
+#-(or cffi-sys::no-long-long
#.(cl:if (cl:>= cl:lambda-parameters-limit 127) '(or) '(and)))
(progn
(defcfun "call_sum_127" :long-long (cb :pointer))
@@ -403,7 +403,7 @@
;;; point arithmetic rounding errors.
;;;
;;; CMUCL chokes on this one.
-#-(and cffi-features:darwin cmu)
+#-(and darwin cmu)
(defcallback double26 :double
((a1 :double) (a2 :double) (a3 :double) (a4 :double) (a5 :double)
(a6 :double) (a7 :double) (a8 :double) (a9 :double) (a10 :double)
@@ -420,17 +420,17 @@
(defcfun "call_double26" :double (f :pointer))
-#+(and cffi-features:darwin (or allegro cmu))
+#+(and darwin (or allegro cmu))
(pushnew 'callbacks.double26 rt::*expected-failures*)
(deftest callbacks.double26
(call-double26 (callback double26))
81.64d0)
-#+(and cffi-features:darwin cmu)
+#+(and darwin cmu)
(pushnew 'callbacks.double26.funcall rt::*expected-failures*)
-#-cffi-features:no-foreign-funcall
+#-cffi-sys::no-foreign-funcall
(deftest callbacks.double26.funcall
(foreign-funcall-pointer
(callback double26) () :double 3.14d0 :double 3.14d0
@@ -444,7 +444,7 @@
81.64d0)
;;; Same as above, for floats.
-#-(and cffi-features:darwin cmu)
+#-(and darwin cmu)
(defcallback float26 :float
((a1 :float) (a2 :float) (a3 :float) (a4 :float) (a5 :float)
(a6 :float) (a7 :float) (a8 :float) (a9 :float) (a10 :float)
@@ -461,17 +461,17 @@
(defcfun "call_float26" :float (f :pointer))
-#+(and cffi-features:darwin (or lispworks openmcl cmu))
+#+(and darwin (or lispworks openmcl cmu))
(pushnew 'callbacks.float26 regression-test::*expected-failures*)
(deftest callbacks.float26
(call-float26 (callback float26))
130.0)
-#+(and cffi-features:darwin (or lispworks openmcl cmu))
+#+(and darwin (or lispworks openmcl cmu))
(pushnew 'callbacks.float26.funcall regression-test::*expected-failures*)
-#-cffi-features:no-foreign-funcall
+#-cffi-sys::no-foreign-funcall
(deftest callbacks.float26.funcall
(foreign-funcall-pointer
(callback float26) () :float 5.0 :float 5.0
@@ -498,7 +498,7 @@
;;;# Stdcall
-#+(and cffi-features:x86 (not cffi-features:no-stdcall))
+#+(and x86 (not cffi-sys::no-stdcall))
(progn
(defcallback (stdcall-cb :cconv :stdcall) :int
((a :int) (b :int) (c :int))
View
8 tests/defcfun.lisp
@@ -274,8 +274,8 @@
;;; (c-function rettype arg-types)
;;; (gen-function-test rettype arg-types))
-#-(:or :ecl cffi-features:no-long-long
- #.(cl:if (cl:>= cl:lambda-parameters-limit 127) '(:or) '(:and)))
+#-(or ecl cffi-sys::no-long-long
+ #.(cl:if (cl:>= cl:lambda-parameters-limit 127) '(:or) '(:and)))
(progn
(defcfun "sum_127" :long-long
(a1 :pointer) (a2 :pointer) (a3 :float) (a4 :unsigned-long) (a5 :pointer)
@@ -383,7 +383,7 @@
;;;# Namespaces
-#-cffi-features:flat-namespace
+#-cffi-sys::flat-namespace
(progn
(defcfun ("ns_function" ns-fun1 :library libtest) :boolean)
(defcfun ("ns_function" ns-fun2 :library libtest2) :boolean)
@@ -394,7 +394,7 @@
;;;# stdcall
-#+(and x86 windows (not cffi-features:no-stdcall))
+#+(and x86 windows (not cffi-sys::no-stdcall))
(progn
(defcfun ("stdcall_fun@12" stdcall-fun :cconv :stdcall) :int
(a :int)
View
2  tests/foreign-globals.lisp
@@ -247,7 +247,7 @@
;;;# Namespace
-#-cffi-features:flat-namespace
+#-cffi-sys::flat-namespace
(progn
(deftest foreign-globals.namespace.1
(values
View
10 tests/funcall.lisp
@@ -35,7 +35,7 @@
;;; Don't run these tests if the implementation does not support
;;; foreign-funcall.
-#-cffi-features:no-foreign-funcall
+#-cffi-sys::no-foreign-funcall
(progn
(deftest funcall.char
@@ -59,7 +59,7 @@
(foreign-funcall "labs" :long -131072 :long)
131072)
-#-cffi-features:no-long-long
+#-cffi-sys::no-long-long
(deftest funcall.long-long
(foreign-funcall "my_llabs" :long-long -9223372036854775807 :long-long)
9223372036854775807)
@@ -173,7 +173,7 @@
;;;# Namespaces
-#-cffi-features:flat-namespace
+#-cffi-sys::flat-namespace
(deftest funcall.namespace.1
(values (foreign-funcall ("ns_function" :library libtest) :boolean)
(foreign-funcall ("ns_function" :library libtest2) :boolean))
@@ -181,7 +181,7 @@
;;;# stdcall
-#+(and x86 windows (not cffi-features:no-stdcall))
+#+(and x86 windows (not cffi-sys::no-stdcall))
(deftest funcall.stdcall.1
(flet ((fun ()
(foreign-funcall ("stdcall_fun@12" :cconv :stdcall)
@@ -190,4 +190,4 @@
finally (return (fun))))
6)
-) ;; #-cffi-features:no-foreign-funcall
+) ;; #-cffi-sys::no-foreign-funcall
View
6 tests/memory.lisp
@@ -75,7 +75,7 @@
(mem-ref p :unsigned-long))
536870912)
-#+(and cffi-features:darwin openmcl)
+#+(and darwin openmcl)
(pushnew 'deref.long-long rt::*expected-failures*)
(deftest deref.long-long
@@ -128,7 +128,7 @@
;;; TODO: use something like *DOUBLE-MIN/MAX* above once we actually
;;; have an available lisp that supports long double.
-;#-cffi-features:no-long-float
+;#-cffi-sys::no-long-float
#+(and scl long-double)
(progn
(deftest deref.long-double.1
@@ -452,7 +452,7 @@
(mem-ref p type)))
536870912)
-#+(and cffi-features:darwin openmcl)
+#+(and darwin openmcl)
(pushnew 'deref.nonconst.long-long rt::*expected-failures*)
(deftest deref.nonconst.long-long
View
2  tests/misc-types.lisp
@@ -170,7 +170,7 @@
(expand-abs -1)
1)
-#-cffi-features:no-foreign-funcall
+#-cffi-sys::no-foreign-funcall
(deftest misc-types.expand.2
(foreign-funcall "abs" error-error -1 error-error)
1)
View
58 tests/misc.lisp
@@ -27,56 +27,6 @@
(in-package #:cffi-tests)
-;;; From CLRFI-1
-(defun featurep (feature-expression)
- (etypecase feature-expression
- (symbol (not (null (member feature-expression *features*))))
- (cons ; Not LIST, as we've already eliminated NIL.
- (ecase (first feature-expression)
- (:and (every #'featurep (rest feature-expression)))
- (:or (some #'featurep (rest feature-expression)))
- (:not (not (featurep (cadr feature-expression))))))))
-
-;;;# Test relations between OS features.
-
-(deftest features.os.1
- (if (featurep 'cffi-features:windows)
- (not (or (featurep 'cffi-features:unix)
- (featurep 'cffi-features:darwin)))
- t)
- t)
-
-(deftest features.os.2
- (if (featurep 'cffi-features:darwin)
- (and (not (featurep 'cffi-features:windows))
- (featurep 'cffi-features:unix))
- t)
- t)
-
-(deftest features.os.3
- (if (featurep 'cffi-features:unix)
- (not (featurep 'cffi-features:windows))
- t)
- t)
-
-;;;# Test mutual exclusiveness of CPU features.
-
-(defparameter *cpu-features*
- '(cffi-features:x86
- cffi-features:x86-64
- cffi-features:ppc32
- cffi-features:sparc
- cffi-features:sparc64
- cffi-features:hppa
- cffi-features:hppa64
- ))
-
-(deftest features.cpu.1
- (loop for feature in *cpu-features*
- when (featurep feature)
- sum 1)
- 1)
-
;;;# foreign-symbol-pointer tests
;;; This might be useful for some libraries that compare function
@@ -103,7 +53,7 @@
;;; loaded and stuff like that. That could work.
#||
-#-(and :ecl (not :dffi))
+#-(and ecl (not dffi))
(deftest library.close.2
(unwind-protect
(progn
@@ -112,9 +62,9 @@
(load-test-libraries))
nil)
-#-(or (and :ecl (not :dffi))
- cffi-features:flat-namespace
- cffi-features:no-foreign-funcall)
+#-(or (and ecl (not dffi))
+ cffi-sys::flat-namespace
+ cffi-sys::no-foreign-funcall)
(deftest library.close.2
(unwind-protect
(values
Please sign in to comment.
Something went wrong with that request. Please try again.