From: rjones Date: Wed, 13 Feb 2008 17:17:31 +0000 (+0000) Subject: Mask out CamlinternalOO. X-Git-Url: http://git.annexia.org/?p=xavierbot.git;a=commitdiff_plain;h=949764f5441703943c4ef21e36c333032880ef21 Mask out CamlinternalOO. --- diff --git a/init b/init index 246299d..d6a0d92 100644 --- a/init +++ b/init @@ -1,5 +1,5 @@ (* Initialise the toplevel environment. -*- tuareg -*- - * $Id: init,v 1.9 2008/02/01 15:25:16 rjones Exp $ + * $Id: init,v 1.10 2008/02/13 17:17:31 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. @@ -195,10 +195,11 @@ 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? *) let _ = object end -(* Load our custom grammar, which disables "external". *) +(* ... but prevent public access to CamlinternalOO. *) +module CamlinternalOO : sig +end = struct end #load "camlp4o.cma";; #load "./pa_noexternal.cmo";; diff --git a/init.in b/init.in index ee81f68..68dafc5 100644 --- a/init.in +++ b/init.in @@ -1,5 +1,5 @@ (* Initialise the toplevel environment. -*- tuareg -*- - * $Id: init.in,v 1.6 2008/02/01 15:25:16 rjones Exp $ + * $Id: init.in,v 1.7 2008/02/13 17:17:31 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. @@ -195,10 +195,11 @@ 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? *) let _ = object end -(* Load our custom grammar, which disables "external". *) +(* ... but prevent public access to CamlinternalOO. *) +module CamlinternalOO : sig +end = struct end #load "camlp4o.cma";; #load "./pa_noexternal.cmo";;