From bc18d20d90ba1fd6efc894558bef2fdacaac28a8 Mon Sep 17 00:00:00 2001 From: edoapra Date: Wed, 13 Dec 2023 10:39:35 -0800 Subject: [PATCH] more python updates --- src/python/nw_inp_from_string.c | 2 -- src/python/nwchem_wrap.c | 6 ------ src/python/task_python.c | 2 ++ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/python/nw_inp_from_string.c b/src/python/nw_inp_from_string.c index 010f1c1f04..47204b383c 100644 --- a/src/python/nw_inp_from_string.c +++ b/src/python/nw_inp_from_string.c @@ -29,8 +29,6 @@ int nw_inp_from_string(Integer rtdb, const char *input) FILE *file; #if (defined(USE_FCD) || defined(WIN32)) && !defined(__MINGW32__) _fcd fstring; -#else - char fstring[255]; #endif int status; const char base[] = "temp"; diff --git a/src/python/nwchem_wrap.c b/src/python/nwchem_wrap.c index 4aac5ea9b6..a407d0d72c 100644 --- a/src/python/nwchem_wrap.c +++ b/src/python/nwchem_wrap.c @@ -1797,12 +1797,6 @@ struct module_state { static struct module_state _state; #endif -static PyObject* error_out(PyObject *m) { - struct module_state *st = GETSTATE(m); - PyErr_SetString(st->error, "something bad happened"); - return NULL; -} - #if PY_MAJOR_VERSION >= 3 static int nwchem_traverse(PyObject *m, visitproc visit, void *arg) { diff --git a/src/python/task_python.c b/src/python/task_python.c index 6091ab2c3e..01d0862be9 100644 --- a/src/python/task_python.c +++ b/src/python/task_python.c @@ -42,7 +42,9 @@ int FATR task_python_(Integer *rtdb_ptr) wchar_t nwprogram[20]; mbstowcs(nwprogram, "NWChem", strlen("NWChem") + 1); #else +#if PY_VERSION_HEX < 0x03080000 wchar_t *nwprogram = Py_DecodeLocale("NWChem", NULL); +#endif #endif #if PY_VERSION_HEX < 0x03080000 Py_SetProgramName(nwprogram);