diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-07 10:15:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-07 10:15:07 (GMT) |
commit | affe6d501aa7307a5b4ed4390011fece3980d24c (patch) | |
tree | 59fed70884a84cdf7f757c91899666298f01ab0b /generic | |
parent | 2e7f6db5b4e567c744ede8e8ffd46b5cf1d1cd21 (diff) | |
parent | a3bfe4a297587de13ae555332bb6180a193098c9 (diff) | |
download | tcl-affe6d501aa7307a5b4ed4390011fece3980d24c.zip tcl-affe6d501aa7307a5b4ed4390011fece3980d24c.tar.gz tcl-affe6d501aa7307a5b4ed4390011fece3980d24c.tar.bz2 |
merge trunk
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclLoadNone.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c index f030d89..5a2dc53 100644 --- a/generic/tclLoadNone.c +++ b/generic/tclLoadNone.c @@ -82,6 +82,39 @@ TclGuessPackageName( } /* + * These functions are fallbacks if we somehow determine that the platform can + * do loading from memory but the user wishes to disable it. They just report + * (gracefully) that they fail. + */ + +#ifdef TCL_LOAD_FROM_MEMORY + +MODULE_SCOPE void * +TclpLoadMemoryGetBuffer( + Tcl_Interp *interp, /* Dummy: unused by this implementation */ + int size) /* Dummy: unused by this implementation */ +{ + return NULL; +} + +MODULE_SCOPE int +TclpLoadMemory( + Tcl_Interp *interp, /* Used for error reporting. */ + void *buffer, /* Dummy: unused by this implementation */ + int size, /* Dummy: unused by this implementation */ + int codeSize, /* Dummy: unused by this implementation */ + Tcl_LoadHandle *loadHandle, /* Dummy: unused by this implementation */ + Tcl_FSUnloadFileProc **unloadProcPtr) + /* Dummy: unused by this implementation */ +{ + Tcl_SetResult(interp, "dynamic loading from memory is not available " + "on this system", TCL_STATIC); + return TCL_ERROR; +} + +#endif /* TCL_LOAD_FROM_MEMORY */ + +/* * Local Variables: * mode: c * c-basic-offset: 4 |