From e6d2c3c3d2dc9daac606c56719d43e6c0a8e58ab Mon Sep 17 00:00:00 2001
From: "Dmitriy A. Gerasimov" <dmitriy.gerasimov@demlabs.net>
Date: Sun, 23 Feb 2020 01:50:16 +0700
Subject: [PATCH] [*] Some fixes, including LOG_TAG fix

---
 src/libdap-python.c |  2 ++
 src/libdap-python.h | 28 ++++++++++++++--------------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/libdap-python.c b/src/libdap-python.c
index dbe6ac15..67fe53a5 100644
--- a/src/libdap-python.c
+++ b/src/libdap-python.c
@@ -1,5 +1,7 @@
 #include "libdap-python.h"
 
+#define LOG_TAG "libdap-python"
+
 PyObject *dap_set_log_level(PyObject *self, PyObject *args){
     short int new_log_level;
     if (!PyArg_ParseTuple(args, "h", &new_log_level))
diff --git a/src/libdap-python.h b/src/libdap-python.h
index 8e10eba8..5ef71241 100644
--- a/src/libdap-python.h
+++ b/src/libdap-python.h
@@ -5,12 +5,6 @@
 #include "dap_common.h"
 #include "dap_list.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LOG_TAG "libdap-python"
-
 typedef struct PyDap{
     PyObject_HEAD
 }PyDapObject;
@@ -33,13 +27,13 @@ PyObject* py_m_dap_config_get_item(PyObject *self, PyObject *args);
 
 PyObject* py_m_dap_config_get_item_default(PyObject *self, PyObject *args);
 
-static PyMethodDef DapMethods[] = {
+static PyMethodDef DapCoreMethods[] = {
         {NULL, NULL, 0, NULL}
 };
 
-static PyTypeObject DapObject_DapObjectType = {
+static PyTypeObject DapCoreObjectType = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "CellFrame.Dap",             /* tp_name */
+    "Dap",             /* tp_name */
     sizeof(PyDapObject),             /* tp_basicsize */
     0,                         /* tp_itemsize */
     0,			       /* tp_dealloc */
@@ -66,7 +60,7 @@ static PyTypeObject DapObject_DapObjectType = {
     0,		               /* tp_weaklistoffset */
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    DapMethods,                /* tp_methods */
+    DapCoreMethods,                /* tp_methods */
     0,                         /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -77,12 +71,18 @@ static PyTypeObject DapObject_DapObjectType = {
     0,                         /* tp_init */
     0,                         /* tp_alloc */
     PyType_GenericNew,         /* tp_new */
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
 };
-
 PyObject *dapListToPyList(dap_list_t *list);
 
 dap_list_t *pyListToDapList(PyObject *list);
 
-#ifdef  __cplusplus
-}
-#endif
-- 
GitLab