Skip to content

Commit

Permalink
Use float-features:with-float-traps-masked instead of self-written wi…
Browse files Browse the repository at this point in the history
…thout-fp-traps which works on sbcl only.
  • Loading branch information
Gleefre committed Jun 8, 2023
1 parent 80410b5 commit 1a60eaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions sdl2.asd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:cl-ppcre
:trivial-channels
:trivial-features
:float-features
#+darwin :cl-glut)
:pathname "src"
:serial t
Expand Down
9 changes: 1 addition & 8 deletions src/sdl2.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,8 @@ into CL's boolean type system."
:while msg :do
(handle-message msg)))

(defmacro without-fp-traps (&body body)
#+sbcl
`(sb-int:with-float-traps-masked (:underflow :overflow :inexact :invalid :divide-by-zero)
,@body)
#-sbcl
`(progn ,@body))

(defun sdl-main-thread ()
(without-fp-traps
(float-features:with-float-traps-masked t
(let ((*main-thread* (bt:current-thread)))
(loop :while *main-thread-channel* :do
(block loop-block
Expand Down

0 comments on commit 1a60eaa

Please sign in to comment.