summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadDl.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2025-01-17 12:31:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2025-01-17 12:31:05 (GMT)
commit7efbca8bb1f0b71be7fc54cad0a60256cae86c7d (patch)
tree23c41f357a4b47e8da5db74edad726289c13a5b3 /unix/tclLoadDl.c
parentb5270c6e6c5aaf3acae369b2a4c95e128274c753 (diff)
parenteb701e1cec48b99353df102dad18ae701e957633 (diff)
downloadtcl-7efbca8bb1f0b71be7fc54cad0a60256cae86c7d.zip
tcl-7efbca8bb1f0b71be7fc54cad0a60256cae86c7d.tar.gz
tcl-7efbca8bb1f0b71be7fc54cad0a60256cae86c7d.tar.bz2
Add dummy TclpLoadMemoryGetBuffer/TclpLoadMemory for Windows and UNIX, so compiling with TCL_LOAD_FROM_MEMORY succeeds (but fallbacks normally at runtime)
Diffstat (limited to 'unix/tclLoadDl.c')
-rw-r--r--unix/tclLoadDl.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index 07bbc16..eabf387 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -268,6 +268,36 @@ UnloadFile(
}
/*
+ * 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_UNUSED(size_t))
+{
+ return NULL;
+}
+
+MODULE_SCOPE int
+TclpLoadMemory(
+ TCL_UNUSED(void *),
+ TCL_UNUSED(size_t),
+ TCL_UNUSED(Tcl_Size),
+ TCL_UNUSED(const char *),
+ TCL_UNUSED(Tcl_LoadHandle *),
+ TCL_UNUSED(Tcl_FSUnloadFileProc **),
+ TCL_UNUSED(int))
+{
+ return TCL_ERROR;
+}
+
+#endif /* TCL_LOAD_FROM_MEMORY */
+
+/*
* Local Variables:
* mode: c
* c-basic-offset: 4