diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-05 09:17:44 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-05 09:17:44 (GMT) |
commit | d20b1b94254275c9b62e7adf30c09a2a7c5443b2 (patch) | |
tree | 153779091d3d93f5d4622c4a171b50094a5ced48 | |
parent | f1cc0757254d92df5b8f6fc68a55f5741dfde088 (diff) | |
download | tcl-d20b1b94254275c9b62e7adf30c09a2a7c5443b2.zip tcl-d20b1b94254275c9b62e7adf30c09a2a7c5443b2.tar.gz tcl-d20b1b94254275c9b62e7adf30c09a2a7c5443b2.tar.bz2 |
[Bug 3433012]: Added dummy version of TclpLoadMemory to use in the event that a
platform thinks it can load from memory but cannot actually do so due to it
being disabled at configuration time.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | generic/tclLoadNone.c | 33 |
2 files changed, 40 insertions, 0 deletions
@@ -1,3 +1,10 @@ +2013-02-05 Donal K. Fellows <dkf@users.sf.net> + + * generic/tclLoadNone.c (TclpLoadMemory): [Bug 3433012]: Added dummy + version of this function to use in the event that a platform thinks it + can load from memory but cannot actually do so due to it being + disabled at configuration time. + 2013-01-30 Andreas Kupries <andreask@activestate.com> * library/platform/platform.tcl (::platform::LibcVersion): See diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c index d328a41..af4ca81 100644 --- a/generic/tclLoadNone.c +++ b/generic/tclLoadNone.c @@ -134,6 +134,39 @@ TclpUnloadFile( } /* + * 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 |