Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Enhancement request: safe interpreter init in Tcl #106

Open
SwigAtSF opened this issue Jan 18, 2013 · 0 comments
Open

Enhancement request: safe interpreter init in Tcl #106

SwigAtSF opened this issue Jan 18, 2013 · 0 comments

Comments

@SwigAtSF
Copy link

  • Artifact_id: 772444
  • Opened: 2003-07-16 18:39:13 +0200
  • Submitter: Krzysztof Kozminski <kozminski@users.sf.net>
  • Assignee: <>
    Swig seems to generate only the initialization
    functions for use
    in trusted interpreters, and there seems to be no way to
    distinguish unsafe API from safe API. The manuals do
    not seem to mention the *_SafeInit functions at all.
    
    

It would be nice to be able to distinguish Tcl APIs
that should be present in safe interpreters versus
those to be present only in trusted interpreters. Two
implemetation possibilities occur to me:

  1. Specifying APIs to be available only in trusted (and
    not in safe) interpreters via some construct in Swig
    config files, e,g.:

%trusted {
void remove_home_directory(char *userid);
}

  1. Using #pragma in the source code (probably a better
    idea, since it avoids code duplication), e.g:

pragma SWIG trusted

void remove_home_directory(char *userid);

pragma SWIG safe

where the scope of the pragma effect would extend from
the occurrence to the next occurrence or to the end of
the file.

KK

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant