[Xotcl] Re: Safe interp for xotcl

Gustaf Neumann neumann at wu-wien.ac.at
Mon Apr 4 14:25:30 CEST 2005


Ben,

i have not done anything with safe interps until now. But try the following:
Add these lines to the end of xotcl*/generic/xotcl.c and recompile:
============================================
extern int
Xotcl_SafeInit(Tcl_Interp *interp) {
  /*** dummy for now **/
  return Xotcl_Init(interp);
}
============================================

then you should be able to do the following:

============================================
~rlwrap /usr/bin/tclsh
% package req XOTcl
1.3.7
% interp create -safe slave
slave
% load "" xotcl slave
% slave eval ::xotcl::Object o1
::o1
============================================

Since xotcl uses ordinary tcl interps, i would assume, it
inherits the safetiness of save tcl interps. Since xotcl does
not do any socket handling, file-i/o, exec's, etc., i would think,
this is a good start. If you see commands that we should deactivate
in safe interps, please let me know.

If nobody objects, i will add these lines to 1.3.7....

best regards
-gustaf neumann


Ben Thomasson schrieb:

>Hi Gustaf,
>
>Is there a safe interp for xotcl, or does xotcl work with the safe
>interp in Tcl?
>
>Thanks,
>
>Ben
>  
>



More information about the Xotcl mailing list