exposing procedure-rename, bitmap/url
This commit is contained in:
parent
8f87026c39
commit
8f7400b602
|
@ -210,7 +210,7 @@
|
||||||
-1 -1 2 1 #"\0"
|
-1 -1 2 1 #"\0"
|
||||||
0 -1 1 #"\0"
|
0 -1 1 #"\0"
|
||||||
0 10 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
|
0 10 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
|
||||||
-1 -1 0 34 0 26 3 12 #"#lang planet"
|
-1 -1 0 35 0 26 3 12 #"#lang planet"
|
||||||
0 0 26 3 15 #" dyoo/whalesong"
|
0 0 26 3 15 #" dyoo/whalesong"
|
||||||
0 0 4 29 1 #"\n"
|
0 0 4 29 1 #"\n"
|
||||||
0 0 22 3 1 #"("
|
0 0 22 3 1 #"("
|
||||||
|
@ -595,4 +595,5 @@
|
||||||
0 0 22 3 1 #")"
|
0 0 22 3 1 #")"
|
||||||
0 0 4 29 1 #"\n"
|
0 0 4 29 1 #"\n"
|
||||||
0 0 14 3 6 #"a-snip"
|
0 0 14 3 6 #"a-snip"
|
||||||
|
0 0 4 29 1 #"\n"
|
||||||
0 0
|
0 0
|
||||||
|
|
|
@ -280,12 +280,12 @@ EXPORTS['text/font'] =
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
EXPORTS['image-url'] =
|
EXPORTS['bitmap/url'] =
|
||||||
makeClosure(
|
makeClosure(
|
||||||
'image-url',
|
'bitmap/url',
|
||||||
1,
|
1,
|
||||||
function(MACHINE) {
|
function(MACHINE) {
|
||||||
var url = checkString(MACHINE, 'image-url', 0);
|
var url = checkString(MACHINE, 'bitmap/url', 0);
|
||||||
var oldArgcount = MACHINE.argcount;
|
var oldArgcount = MACHINE.argcount;
|
||||||
PAUSE(
|
PAUSE(
|
||||||
function(restart) {
|
function(restart) {
|
||||||
|
@ -315,9 +315,14 @@ EXPORTS['image-url'] =
|
||||||
});
|
});
|
||||||
|
|
||||||
EXPORTS['open-image-url'] =
|
EXPORTS['open-image-url'] =
|
||||||
plt.baselib.functions.renameProcedure(EXPORTS['image-url'],
|
plt.baselib.functions.renameProcedure(EXPORTS['bitmap/url'],
|
||||||
'open-image-url');
|
'open-image-url');
|
||||||
|
|
||||||
|
EXPORTS['image-url'] =
|
||||||
|
plt.baselib.functions.renameProcedure(EXPORTS['bitmap/url'],
|
||||||
|
'image-url');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EXPORTS['overlay'] =
|
EXPORTS['overlay'] =
|
||||||
|
|
|
@ -12,8 +12,11 @@
|
||||||
"js-impl.js")
|
"js-impl.js")
|
||||||
#:provided-values (text
|
#:provided-values (text
|
||||||
text/font
|
text/font
|
||||||
image-url
|
|
||||||
open-image-url
|
bitmap/url
|
||||||
|
image-url ;; older name for bitmap/url
|
||||||
|
open-image-url ;; older name for bitmap/url
|
||||||
|
|
||||||
overlay
|
overlay
|
||||||
overlay/xy
|
overlay/xy
|
||||||
overlay/align
|
overlay/align
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
(provide text
|
(provide text
|
||||||
text/font
|
text/font
|
||||||
image-url
|
|
||||||
open-image-url
|
|
||||||
overlay
|
overlay
|
||||||
overlay/xy
|
overlay/xy
|
||||||
overlay/align
|
overlay/align
|
||||||
|
@ -57,11 +55,11 @@
|
||||||
|
|
||||||
|
|
||||||
image?
|
image?
|
||||||
|
|
||||||
;; Something funky is happening on the Racket side of things with regards
|
;; Something funky is happening on the Racket side of things with regards
|
||||||
;; to step-count? See: http://bugs.racket-lang.org/query/?cmd=view&pr=12031
|
;; to step-count? See: http://bugs.racket-lang.org/query/?cmd=view&pr=12031
|
||||||
;; step-count?
|
;; step-count?
|
||||||
|
|
||||||
|
bitmap/url
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,13 +73,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define-stubs
|
(define-stubs color-list->image)
|
||||||
image-url
|
|
||||||
open-image-url
|
|
||||||
color-list->image
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define (my-step-count? x)
|
(define (my-step-count? x)
|
||||||
(and (integer? x)
|
(and (integer? x)
|
||||||
|
@ -92,5 +87,10 @@
|
||||||
(error 'png-bytes->image "not implemented yet"))
|
(error 'png-bytes->image "not implemented yet"))
|
||||||
|
|
||||||
|
|
||||||
|
(define image-url (procedure-rename bitmap/url 'image-url))
|
||||||
|
(define open-image-url (procedure-rename bitmap/url 'open-image-url))
|
||||||
|
|
||||||
(provide (rename-out [my-step-count? step-count?]))
|
|
||||||
|
(provide (rename-out [my-step-count? step-count?]
|
||||||
|
[bitmap/url image-url]
|
||||||
|
[bitmap/url open-image-url]))
|
|
@ -329,15 +329,11 @@
|
||||||
return makePrimitiveProcedure(
|
return makePrimitiveProcedure(
|
||||||
name,
|
name,
|
||||||
f.racketArity,
|
f.racketArity,
|
||||||
function () {
|
function (MACHINE) {
|
||||||
return f.apply(null, arguments);
|
return f(MACHINE);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return new Closure(
|
return makeClosure(name, f.racketArity, f.label, f.closedVals);
|
||||||
f.label,
|
|
||||||
f.racketArity,
|
|
||||||
f.closedVals,
|
|
||||||
name);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -881,6 +881,17 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
installPrimitiveProcedure(
|
||||||
|
'procedure-rename',
|
||||||
|
2,
|
||||||
|
function (MACHINE) {
|
||||||
|
var proc = checkProcedure(MACHINE, 'procedure-rename', 0);
|
||||||
|
var name = checkSymbol(MACHINE, 'procedure-rename', 1);
|
||||||
|
return baselib.functions.renameProcedure(proc, name);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
installPrimitiveProcedure(
|
installPrimitiveProcedure(
|
||||||
'member',
|
'member',
|
||||||
2,
|
2,
|
||||||
|
|
|
@ -255,6 +255,7 @@ raise-mismatch-error
|
||||||
procedure?
|
procedure?
|
||||||
procedure-arity
|
procedure-arity
|
||||||
procedure-arity-includes?
|
procedure-arity-includes?
|
||||||
|
procedure-rename
|
||||||
pair?
|
pair?
|
||||||
list?
|
list?
|
||||||
;; (undefined? -undefined?)
|
;; (undefined? -undefined?)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user