]> jfr.im git - irc/evilnet/x3.git/commitdiff
mod-python: remove unused function
authorhstuart <redacted>
Mon, 5 Oct 2009 11:25:43 +0000 (11:25 +0000)
committerhstuart <redacted>
Mon, 5 Oct 2009 11:25:43 +0000 (11:25 +0000)
ChangeLog
src/mod-python.c

index 274d8e429319b4a83f013ea15e3145150407cf8a..bf954b2fd4c302d54229bc62ae29d2e720eca260 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
 /***********************************************************************
 X3 ChangeLog
 
+2009-10-05  Henrik Stuart <evilnet@hstuart.dk>
+
+       * src/mod-python.c: Remove unused function.
+
 2009-10-05  Henrik Stuart <evilnet@hstuart.dk>
 
        * src/mod-python.c: Generalise cmd_run to handle arbitrary statements.
index 8e5351622137cbd7f99264a237e84a718ec4510e..78e15b7e0c8cb27ddc2ac8a1cd0c560943b0e151 100644 (file)
@@ -825,40 +825,6 @@ cleanup:
     return strdup("unknown exception");
 }
 
-static int python_run_statements(char const* msg, char** err) {
-    PyObject* o;
-    char* exmsg = NULL;
-    PyObject* py_main_module = NULL;
-    PyObject* py_globals;
-
-    py_main_module = PyImport_AddModule("__main__");
-    if (!py_main_module) {
-        exmsg = format_python_error(1);
-        if (exmsg)
-            *err = exmsg;
-        else
-            *err = strdup("unknown exception");
-        return 1;
-    }
-
-    py_globals = PyModule_GetDict(py_main_module);
-
-    o = PyRun_String(msg, Py_file_input, py_globals, py_globals);
-    if (o == NULL) {
-        exmsg = format_python_error(1);
-        if (exmsg)
-            *err = exmsg;
-        else
-            *err = strdup("unknown exception");
-        return 1;
-    }
-    else {
-        Py_DECREF(o);
-    }
-
-    return 0;
-}
-
 static MODCMD_FUNC(cmd_run) {
     /* this method allows running arbitrary python commands.
      * use with care.