X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=init.in;h=972b8d5f87edafd4e986550d3b991473ff644017;hb=3cd6e84fb16187e3d85775397d35f5c432064e63;hp=bc41e7259209f96ec39d502c613df58d465cd45e;hpb=27dea572ce631f21e6dd27472a55c79092c682aa;p=xavierbot.git diff --git a/init.in b/init.in index bc41e72..972b8d5 100644 --- a/init.in +++ b/init.in @@ -1,5 +1,5 @@ (* Initialise the toplevel environment. -*- tuareg -*- - * $Id: init.in,v 1.4 2007/06/29 19:39:13 rjones Exp $ + * $Id: init.in,v 1.8 2008/02/13 17:35:32 rjones Exp $ * - Removes the Pervasives module and any dangerous functions. * - Loads just the modules we want to give access to, and just * the functions within those modules that we want to give. @@ -60,9 +60,11 @@ let _ = Complex.zero let _ = Hashtbl.create let _ = Int32.to_string let _ = Int64.to_string +let _ = Lazy.force let _ = List.length let _ = Nativeint.to_string let _ = Num.add_num +let _ = Random.int let _ = Ratio.null_denominator let _ = Stack.create let _ = Str.regexp @@ -192,11 +194,11 @@ end = struct include Scanf end module StringSet = Set.Make(String) module StringMap = Map.Make(String) -(* Create an object, so we get the CamlinternalOO module. *) -(* XXX Are any of the methods unsafe? *) +(* Create an object, so we get the CamlinternalOO module ... *) let _ = object end -(* Load our custom grammar, which disables "external". *) +(* ... but prevent public access to CamlinternalOO. *) +module CamlinternalOO = struct end #load "camlp4o.cma";; #load "./pa_noexternal.cmo";;