Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: plt/racket
base: e04b74f22a
...
head fork: plt/racket
compare: 466ffadb12
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 01, 2012
@mflatt mflatt scribble/eval: change string or byte-string expression handling
Use `datum->syntax' instead of `begin' to protect the string or byte
string. Danny Yoo suggested this change.
2329661
@mflatt mflatt racket/sandbox: change syntax-object wrappers generated for locations
Generate wrappers consistent with a reader-level absence of `.'s,
instead of wrapping every pair. This change fixes the `syntax-e'
example in the Guide's description of syntax objects.
54a6ba8
Matthew Flatt racket/draw: use libpng15.so.15 when available
E.g., Mageia 2 has libpng15, not libpng12
466ffad
View
8 collects/racket/draw/unsafe/png.rkt
@@ -10,9 +10,11 @@
[(unix)
;; Most Linux distros supply "libpng12", while other Unix
;; variants often have just "libpng":
- (with-handlers ([exn:fail:filesystem?
- (lambda (exn) (ffi-lib "libpng"))])
- (ffi-lib "libpng12" '("0" "")))]
+ (ffi-lib "libpng12" '("0" "")
+ #:fail (lambda ()
+ (ffi-lib "libpng15" '("15" "")
+ #:fail (lambda ()
+ (ffi-lib "libpng")))))]
[(macosx) (ffi-lib "libpng15.15.dylib")]
[(windows)
(ffi-lib "zlib1.dll")
View
6 collects/racket/sandbox.rkt
@@ -503,6 +503,12 @@
(define (add-location x loc)
(cond [(null? x) null]
+ [(list? x)
+ ;; For a list, generate a syntax-object wrapper consistent with
+ ;; an absence of `.'s in the reader's input:
+ (make-orig (for/list ([i (in-list x)])
+ (add-location i loc))
+ loc)]
[(pair? x) (make-orig (cons (add-location (car x) loc)
(add-location (cdr x) loc))
loc)]
View
6 collects/scribble/eval.rkt
@@ -372,8 +372,10 @@
(syntax-case s (module)
[(module . _rest) (syntax->datum s)]
[_else s])]
- [(bytes? s) `(begin ,s)]
- [(string? s) `(begin ,s)]
+ ;; a sandbox treats strings and byte strings as code
+ ;; streams, so protect them as syntax objects:
+ [(string? s) (datum->syntax #f s)]
+ [(bytes? s) (datum->syntax #f s)]
[else s]))))
list)))
View
6 collects/tests/scribble/docs/stxobj.scrbl
@@ -0,0 +1,6 @@
+#lang scribble/manual
+@(require scribble/eval)
+
+@interaction[
+(syntax-e #'(+ 1 2))
+]
View
2  collects/tests/scribble/docs/stxobj.txt
@@ -0,0 +1,2 @@
+ > (syntax-e #'(+ 1 2))
+ '(#<syntax:1:0 +> #<syntax:1:0 1> #<syntax:1:0 2>)

No commit comments for this range

Something went wrong with that request. Please try again.