[sr-dev] git:5.3:e934227b: app_python: declare global vars extern in header file

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 9 09:22:03 CET 2020


Module: kamailio
Branch: 5.3
Commit: e934227bf3d7c082a4cd3125f32a002bda3dd8c4
URL: https://github.com/kamailio/kamailio/commit/e934227bf3d7c082a4cd3125f32a002bda3dd8c4

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-03-09T09:20:59+01:00

app_python: declare global vars extern in header file

(cherry picked from commit 9cc9576c025c541264a3679618bb2be8d108a9f6)

---

Modified: src/modules/app_python/app_python_mod.c
Modified: src/modules/app_python/python_support.h

---

Diff:  https://github.com/kamailio/kamailio/commit/e934227bf3d7c082a4cd3125f32a002bda3dd8c4.diff
Patch: https://github.com/kamailio/kamailio/commit/e934227bf3d7c082a4cd3125f32a002bda3dd8c4.patch

---

diff --git a/src/modules/app_python/app_python_mod.c b/src/modules/app_python/app_python_mod.c
index e901c91412..ee832feb3d 100644
--- a/src/modules/app_python/app_python_mod.c
+++ b/src/modules/app_python/app_python_mod.c
@@ -54,6 +54,8 @@ static void mod_destroy(void);
 
 PyObject *_sr_apy_handler_obj = NULL;
 
+PyObject *format_exc_obj = NULL;
+
 char *dname = NULL, *bname = NULL;
 
 int _apy_process_rank = 0;
diff --git a/src/modules/app_python/python_support.h b/src/modules/app_python/python_support.h
index 4d25564119..2a97d16ed8 100644
--- a/src/modules/app_python/python_support.h
+++ b/src/modules/app_python/python_support.h
@@ -25,7 +25,7 @@
 #include <Python.h>
 #include <stdarg.h>
 
-PyObject *format_exc_obj;
+extern PyObject *format_exc_obj;
 
 void python_handle_exception(const char *, ...);
 




More information about the sr-dev mailing list