Skip to content

ECL support #56

Description

@jldomenech

Hi!, ECL don't support negative pointers so (cffi:make-pointer -1) or (cffi:inc-pointer (cffi:make-pointer 0) -1) don't works.
I suggest the following change:

diff -u /home/jose/quicklisp/dists/quicklisp/software/lispbuilder-20160825-git/lispbuilder-sdl/sdl/video.lisp\~ /home/jose/quicklisp/dists/quicklisp/software/lispbuilder-20160825-git/lispbuilder-sdl/sdl/video.lisp
--- /home/jose/quicklisp/dists/quicklisp/software/lispbuilder-20160825-git/lispbuilder-sdl/sdl/video.lisp~	2017-03-19 08:40:37.938340720 +0100
+++ /home/jose/quicklisp/dists/quicklisp/software/lispbuilder-20160825-git/lispbuilder-sdl/sdl/video.lisp	2017-03-19 17:12:38.163713895 +0100
@@ -284,9 +284,10 @@
     (cond
       ((cffi:null-pointer-p listmodes) nil)
       ((equal (cffi:pointer-address listmodes)
-              (load-time-value (cffi:pointer-address
-                                (cffi:inc-pointer
-                                 (cffi:make-pointer 0) -1))))
+	      #+ecl -1
+              #-ecl (load-time-value (cffi:pointer-address
+				      (cffi:inc-pointer
+				       (cffi:make-pointer 0) -1))))
        t)
       (t
        (do ((i 0 (1+ i)))

Diff finished.  Sun Mar 19 17:17:35 2017

The comparison with -1 is still meaningless and it could be entirely omitted but i think this way is clearer what is trying to do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions