4 * This procedure provides a version of the TclpDlopen for use in
5 * systems that don't support dynamic loading; it just returns an error.
7 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
9 * See the file "license.terms" for information on usage and redistribution of
10 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
16 *----------------------------------------------------------------------
20 * This procedure is called to carry out dynamic loading of binary code;
21 * it is intended for use only on systems that don't support dynamic
22 * loading (it returns an error).
25 * The result is TCL_ERROR, and an error message is left in the interp's
31 *----------------------------------------------------------------------
36 Tcl_Interp *interp, /* Used for error reporting. */
37 Tcl_Obj *pathPtr, /* Name of the file containing the desired
39 Tcl_LoadHandle *loadHandle, /* Filled with token for dynamically loaded
40 * file which will be passed back to
41 * (*unloadProcPtr)() to unload the file. */
42 Tcl_FSUnloadFileProc **unloadProcPtr,
43 /* Filled with address of Tcl_FSUnloadFileProc
44 * function which should be used for this
49 Tcl_SetObjResult(interp, Tcl_NewStringObj(
50 "dynamic loading is not currently available on this system",
57 *----------------------------------------------------------------------
59 * TclGuessPackageName --
61 * If the "load" command is invoked without providing a package name,
62 * this procedure is invoked to try to figure it out.
65 * Always returns 0 to indicate that we couldn't figure out a package
66 * name; generic code will then try to guess the package from the file
67 * name. A return value of 1 would have meant that we figured out the
68 * package name and put it in bufPtr.
73 *----------------------------------------------------------------------
78 const char *fileName, /* Name of file containing package (already
79 * translated to local form if needed). */
80 Tcl_DString *bufPtr) /* Initialized empty dstring. Append package
81 * name to this if possible. */
87 * These functions are fallbacks if we somehow determine that the platform can
88 * do loading from memory but the user wishes to disable it. They just report
89 * (gracefully) that they fail.
92 #ifdef TCL_LOAD_FROM_MEMORY
95 TclpLoadMemoryGetBuffer(
96 Tcl_Interp *interp, /* Dummy: unused by this implementation */
97 int size) /* Dummy: unused by this implementation */
104 Tcl_Interp *interp, /* Used for error reporting. */
105 void *buffer, /* Dummy: unused by this implementation */
106 int size, /* Dummy: unused by this implementation */
107 int codeSize, /* Dummy: unused by this implementation */
108 Tcl_LoadHandle *loadHandle, /* Dummy: unused by this implementation */
109 Tcl_FSUnloadFileProc **unloadProcPtr,
110 /* Dummy: unused by this implementation */
112 /* Dummy: unused by this implementation */
115 Tcl_SetObjResult(interp, Tcl_NewStringObj("dynamic loading from memory "
116 "is not available on this system", -1));
121 #endif /* TCL_LOAD_FROM_MEMORY */