aboutsummaryrefslogtreecommitdiff
path: root/jim-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim-load.c')
-rw-r--r--jim-load.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/jim-load.c b/jim-load.c
index 8572405..ebd6b63 100644
--- a/jim-load.c
+++ b/jim-load.c
@@ -116,3 +116,19 @@ int Jim_LoadLibrary(Jim_Interp *interp, const char *pathName)
}
#endif/* JIM_DYNLIB */
+/* [load] */
+static int Jim_LoadCoreCommand(Jim_Interp *interp, int argc,
+ Jim_Obj *const *argv)
+{
+ if (argc < 2) {
+ Jim_WrongNumArgs(interp, 1, argv, "libaryFile");
+ return JIM_ERR;
+ }
+ return Jim_LoadLibrary(interp, Jim_GetString(argv[1], NULL));
+}
+
+int Jim_loadInit(Jim_Interp *interp)
+{
+ Jim_CreateCommand(interp, "load", Jim_LoadCoreCommand, NULL, NULL);
+ return JIM_OK;
+}