git.annexia.org
/
perl4caml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Memory allocation fixes.
[perl4caml.git]
/
perl.ml
diff --git
a/perl.ml
b/perl.ml
index
6110c20
..
a193446
100644
(file)
--- a/
perl.ml
+++ b/
perl.ml
@@
-1,19
+1,14
@@
(* Interface to Perl from OCaml.
* Copyright (C) 2003 Merjis Ltd.
(* Interface to Perl from OCaml.
* Copyright (C) 2003 Merjis Ltd.
- * $Id: perl.ml,v 1.1
0 2003-10-26 12:57:11
rich Exp $
+ * $Id: perl.ml,v 1.1
1 2003-12-11 17:41:52
rich Exp $
*)
*)
-type t
-
type sv
type av
type hv
exception Perl_failure of string
type sv
type av
type hv
exception Perl_failure of string
-external create : ?args:string array -> unit -> t
- = "perl4caml_create"
-
(* Initialization. This must happen first, otherwise other parts of the
* program will segfault because of a missing interpreter.
*)
(* Initialization. This must happen first, otherwise other parts of the
* program will segfault because of a missing interpreter.
*)
@@
-21,19
+16,8
@@
external c_init : unit -> unit = "perl4caml_init"
let () =
Callback.register_exception "perl4caml_perl_failure" (Perl_failure "");
c_init (); (* Initialise C code. *)
let () =
Callback.register_exception "perl4caml_perl_failure" (Perl_failure "");
c_init (); (* Initialise C code. *)
- (* Create the default interpreter. *)
- create ~args:[| ""; "-w"; "-e"; "0" |] ();
()
()
-external current_interpreter : unit -> t
- = "perl4caml_current_interpreter"
-
-external destroy : t -> unit
- = "perl4caml_destroy"
-
-external set_context : t -> unit
- = "perl4caml_set_context"
-
external int_of_sv : sv -> int = "perl4caml_int_of_sv"
external sv_of_int : int -> sv = "perl4caml_sv_of_int"
external float_of_sv : sv -> float = "perl4caml_float_of_sv"
external int_of_sv : sv -> int = "perl4caml_int_of_sv"
external sv_of_int : int -> sv = "perl4caml_sv_of_int"
external float_of_sv : sv -> float = "perl4caml_float_of_sv"