[sr-dev] git:master:9cc9576c: app_python: declare global vars extern in header file

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 9 08:28:24 CET 2020


Module: kamailio
Branch: master
Commit: 9cc9576c025c541264a3679618bb2be8d108a9f6
URL: https://github.com/kamailio/kamailio/commit/9cc9576c025c541264a3679618bb2be8d108a9f6

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-03-09T08:27:15+01:00

app_python: declare global vars extern in header file

---

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

---

Diff:  https://github.com/kamailio/kamailio/commit/9cc9576c025c541264a3679618bb2be8d108a9f6.diff
Patch: https://github.com/kamailio/kamailio/commit/9cc9576c025c541264a3679618bb2be8d108a9f6.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