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