Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Disarm reader macros.

  • Loading branch information...
commit 8f7bbc9f05a85fe449377f1959d1951c5376fc01 1 parent 4766d20
Orivej Desh authored

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. +10 1 quickdist.lisp
11 quickdist.lisp
@@ -79,10 +79,19 @@ system-index-url: {base-url}/{name}/{version}/systems.txt
79 79 if (string= "asd" (pathname-type file)) collect file)
80 80 #'string< :key #'pathname-name))
81 81
  82 +(defvar *safe-readtable*
  83 + (let ((readtable (copy-readtable)))
  84 + (flet ((read* (stream &rest ignore)
  85 + (declare (ignore ignore))
  86 + (read stream nil (values) t)))
  87 + (set-dispatch-macro-character #\# #\. #'read* readtable))
  88 + readtable))
  89 +
82 90 (defun get-systems (path)
83 91 (with-open-file (s path)
84 92 (let* ((package (make-package (symbol-name (gensym "TMPPKG"))))
85   - (*package* package))
  93 + (*package* package)
  94 + (*readtable* *safe-readtable*))
86 95 (unwind-protect
87 96 (sort
88 97 (loop for form = (read s nil)

0 comments on commit 8f7bbc9

Please sign in to comment.
Something went wrong with that request. Please try again.