[Rt-commit] [svn] r1017 - in mzscheme: . Language-MzScheme
Language-MzScheme/t Language-MzScheme/t/scripts
autrijus at pallas.eruditorum.org
autrijus at pallas.eruditorum.org
Mon Jun 7 12:02:15 EDT 2004
Author: autrijus
Date: Mon Jun 7 12:02:11 2004
New Revision: 1017
Removed:
mzscheme/Language-MzScheme/t/scripts/
Modified:
mzscheme/ (props changed)
mzscheme/Language-MzScheme/mzscheme.c
mzscheme/Language-MzScheme/mzscheme.h
mzscheme/Language-MzScheme/mzscheme.i
mzscheme/Language-MzScheme/t/1-basic.t
Log:
----------------------------------------------------------------------
r5457 at not: autrijus | 2004-06-07T16:02:07.048165Z
* move scripts/three.pl back to t/1-basic.t now we have string ports.
----------------------------------------------------------------------
Modified: mzscheme/Language-MzScheme/mzscheme.c
==============================================================================
--- mzscheme/Language-MzScheme/mzscheme.c (original)
+++ mzscheme/Language-MzScheme/mzscheme.c Mon Jun 7 12:02:11 2004
@@ -16,10 +16,10 @@
}
Scheme_Object *
-_mzscheme_closed_prim_CV (void *d, int argc, Scheme_Object **argv) {
+_mzscheme_closed_prim_CV (void *callback, int argc, Scheme_Object **argv) {
dSP ;
PUSHs((SV *)newRV((SV*)_mzscheme_objects_AV(argv)));
- call_sv((SV *)d, G_SCALAR);
+ call_sv((SV *)callback, G_SCALAR);
return (Scheme_Object *)SvIV((SV*)SvRV(POPs));
}
Modified: mzscheme/Language-MzScheme/mzscheme.h
==============================================================================
--- mzscheme/Language-MzScheme/mzscheme.h (original)
+++ mzscheme/Language-MzScheme/mzscheme.h Mon Jun 7 12:02:11 2004
@@ -1,5 +1,6 @@
void mzscheme_init ();
+Scheme_Object* mzscheme_make_perl_prim_w_arity (SV *cv_ref, const char *name, int mina, int maxa);
AV* _mzscheme_objects_AV (Scheme_Object ** objects);
Scheme_Object* _mzscheme_closed_prim_CV (void *d, int argc, Scheme_Object **argv);
Modified: mzscheme/Language-MzScheme/mzscheme.i
==============================================================================
--- mzscheme/Language-MzScheme/mzscheme.i (original)
+++ mzscheme/Language-MzScheme/mzscheme.i Mon Jun 7 12:02:11 2004
@@ -5,8 +5,7 @@
%}
void mzscheme_init();
-Scheme_Object* mzscheme_make_perl_prim_w_arity
- (SV *cv_ref, const char *name, int mina, int maxa);
+Scheme_Object* mzscheme_make_perl_prim_w_arity(SV *cv_ref, const char *name, int mina, int maxa);
%typemap(in) Scheme_Object ** {
AV *tempav;
Modified: mzscheme/Language-MzScheme/t/1-basic.t
==============================================================================
--- mzscheme/Language-MzScheme/t/1-basic.t (original)
+++ mzscheme/Language-MzScheme/t/1-basic.t Mon Jun 7 12:02:11 2004
@@ -3,8 +3,19 @@
use strict;
use Test;
use FindBin;
+use Language::MzScheme;
BEGIN { plan tests => 1 }
-chdir $FindBin::Bin;
-ok(`$^X scripts/three.pl`, "3\n");
+my $env = scheme_basic_env();
+ok(eval_scheme('(+ 1 2)'), 3);
+
+my $code = sub { "Hello from Perl!" };
+#mzscheme_make_perl_prim_w_arity($code, 'hello', 0, 0); # XXX FIXME
+
+sub eval_scheme {
+ my $out = scheme_make_string_output_port();
+ my $val = scheme_eval_string($_[0], $env);
+ scheme_display($val, $out);
+ return scheme_get_string_output($out);
+}
More information about the Rt-commit
mailing list