Skip to content
Snippets Groups Projects
Forked from antik / gsll
514 commits behind the upstream repository.
  • Liam Healy's avatar
    c057c7f3
    No 64 bit integers on 32 bit platforms · c057c7f3
    Liam Healy authored
    Both CLISP and SBCL fail when making arrays of 64 bit integers,
    despite cffi-features:no-long-long being absent for either.
    Therefore, conditionalize away these types in *array-element-types* on
    32 bit platforms in general, and conditionalize away all the 64 bit
    tests as well.  Separated out integer size check into types.lisp.
    Restored tests vector-min and vector-max which fail in SBCL for
    (signed-integer 8) and (signed-integer 16) for unknown reasons. 
    Test results:
    64 bit SBCL:   TOTAL: 1223 assertions passed, 5 failed, 0 execution errors.
    64 bit CCL:    TOTAL: 1228 assertions passed, 0 failed, 0 execution errors.
    32 bit SBCL:   TOTAL: 1069 assertions passed, 31 failed, 0 execution errors.
    32 bit CLISP:  TOTAL: 1051 assertions passed, 27 failed, 5 execution errors.
    c057c7f3
    History
    No 64 bit integers on 32 bit platforms
    Liam Healy authored
    Both CLISP and SBCL fail when making arrays of 64 bit integers,
    despite cffi-features:no-long-long being absent for either.
    Therefore, conditionalize away these types in *array-element-types* on
    32 bit platforms in general, and conditionalize away all the 64 bit
    tests as well.  Separated out integer size check into types.lisp.
    Restored tests vector-min and vector-max which fail in SBCL for
    (signed-integer 8) and (signed-integer 16) for unknown reasons. 
    Test results:
    64 bit SBCL:   TOTAL: 1223 assertions passed, 5 failed, 0 execution errors.
    64 bit CCL:    TOTAL: 1228 assertions passed, 0 failed, 0 execution errors.
    32 bit SBCL:   TOTAL: 1069 assertions passed, 31 failed, 0 execution errors.
    32 bit CLISP:  TOTAL: 1051 assertions passed, 27 failed, 5 execution errors.
types.lisp 798 B
;; Permissible types
;; Liam Healy 2008-12-31 21:06:34EST types.lisp
;; Time-stamp: <2008-12-31 21:52:33EST types.lisp>
;; $Id: $

(in-package :gsl)

;;;;****************************************************************************
;;;; Types for CFFI (will eventually be in CFFI)
;;;;****************************************************************************

(defvar *sizet-type* nil
  "The CL type for size_t.")

(case
  (cffi:foreign-type-size :long)
  (8
   (push :int64 *features*)
   (setf *sizet-type* '(unsigned-byte 64))
   (cffi:defctype sizet :uint64))
  (4
   (push :int32 *features*)
   (setf *sizet-type* '(unsigned-byte 32))
   (cffi:defctype sizet :uint32))
  (t (error "Size of :long unrecognized")))

;; cffi-features:no-long-long doesn't work for me, but ought to be checked?