summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-05 13:55:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-05 13:55:53 (GMT)
commit6e294f0d1de5f6c72ec331e766f6234305ba00d5 (patch)
tree80ef4807aeda220f5c52f6856e2ca1639ff8b092 /generic
parent30b1119bc17675f5cbe79c4f25f3071f84c63444 (diff)
parent8941b209b0188f101901cd0ffb32a97d7d293f82 (diff)
downloadtcl-6e294f0d1de5f6c72ec331e766f6234305ba00d5.zip
tcl-6e294f0d1de5f6c72ec331e766f6234305ba00d5.tar.gz
tcl-6e294f0d1de5f6c72ec331e766f6234305ba00d5.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tclLoadNone.c33
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