exposing procedure-rename, bitmap/url
This commit is contained in:
parent
8f87026c39
commit
8f7400b602
|
@ -210,7 +210,7 @@
|
|||
-1 -1 2 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
|
||||
-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 4 29 1 #"\n"
|
||||
0 0 22 3 1 #"("
|
||||
|
@ -595,4 +595,5 @@
|
|||
0 0 22 3 1 #")"
|
||||
0 0 4 29 1 #"\n"
|
||||
0 0 14 3 6 #"a-snip"
|
||||
0 0 4 29 1 #"\n"
|
||||
0 0
|
||||
|
|
|
@ -280,12 +280,12 @@ EXPORTS['text/font'] =
|
|||
});
|
||||
|
||||
|
||||
EXPORTS['image-url'] =
|
||||
EXPORTS['bitmap/url'] =
|
||||
makeClosure(
|
||||
'image-url',
|
||||
'bitmap/url',
|
||||
1,
|
||||
function(MACHINE) {
|
||||
var url = checkString(MACHINE, 'image-url', 0);
|
||||
var url = checkString(MACHINE, 'bitmap/url', 0);
|
||||
var oldArgcount = MACHINE.argcount;
|
||||
PAUSE(
|
||||
function(restart) {
|
||||
|
@ -315,9 +315,14 @@ EXPORTS['image-url'] =
|
|||
});
|
||||
|
||||
EXPORTS['open-image-url'] =
|
||||
plt.baselib.functions.renameProcedure(EXPORTS['image-url'],
|
||||
plt.baselib.functions.renameProcedure(EXPORTS['bitmap/url'],
|
||||
'open-image-url');
|
||||
|
||||
EXPORTS['image-url'] =
|
||||
plt.baselib.functions.renameProcedure(EXPORTS['bitmap/url'],
|
||||
'image-url');
|
||||
|
||||
|
||||
|
||||
|
||||
EXPORTS['overlay'] =
|
||||
|
|
|
@ -12,8 +12,11 @@
|
|||
"js-impl.js")
|
||||
#:provided-values (text
|
||||
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/xy
|
||||
overlay/align
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
(provide text
|
||||
text/font
|
||||
image-url
|
||||
open-image-url
|
||||
overlay
|
||||
overlay/xy
|
||||
overlay/align
|
||||
|
@ -57,11 +55,11 @@
|
|||
|
||||
|
||||
image?
|
||||
|
||||
;; 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
|
||||
;; step-count?
|
||||
|
||||
bitmap/url
|
||||
)
|
||||
|
||||
|
||||
|
@ -75,13 +73,10 @@
|
|||
|
||||
|
||||
|
||||
(define-stubs
|
||||
image-url
|
||||
open-image-url
|
||||
color-list->image
|
||||
)
|
||||
(define-stubs color-list->image)
|
||||
|
||||
|
||||
|
||||
|
||||
(define (my-step-count? x)
|
||||
(and (integer? x)
|
||||
|
@ -92,5 +87,10 @@
|
|||
(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(
|
||||
name,
|
||||
f.racketArity,
|
||||
function () {
|
||||
return f.apply(null, arguments);
|
||||
function (MACHINE) {
|
||||
return f(MACHINE);
|
||||
});
|
||||
} else {
|
||||
return new Closure(
|
||||
f.label,
|
||||
f.racketArity,
|
||||
f.closedVals,
|
||||
name);
|
||||
return makeClosure(name, f.racketArity, f.label, f.closedVals);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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(
|
||||
'member',
|
||||
2,
|
||||
|
|
|
@ -255,6 +255,7 @@ raise-mismatch-error
|
|||
procedure?
|
||||
procedure-arity
|
||||
procedure-arity-includes?
|
||||
procedure-rename
|
||||
pair?
|
||||
list?
|
||||
;; (undefined? -undefined?)
|
||||
|
|
Loading…
Reference in New Issue
Block a user