Skip to content
Snippets Groups Projects
Commit e6d2c3c3 authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov
Browse files

[*] Some fixes, including LOG_TAG fix

parent 226080a3
No related branches found
No related tags found
1 merge request!26Support 3689
#include "libdap-python.h" #include "libdap-python.h"
#define LOG_TAG "libdap-python"
PyObject *dap_set_log_level(PyObject *self, PyObject *args){ PyObject *dap_set_log_level(PyObject *self, PyObject *args){
short int new_log_level; short int new_log_level;
if (!PyArg_ParseTuple(args, "h", &new_log_level)) if (!PyArg_ParseTuple(args, "h", &new_log_level))
......
...@@ -5,12 +5,6 @@ ...@@ -5,12 +5,6 @@
#include "dap_common.h" #include "dap_common.h"
#include "dap_list.h" #include "dap_list.h"
#ifdef __cplusplus
extern "C" {
#endif
#define LOG_TAG "libdap-python"
typedef struct PyDap{ typedef struct PyDap{
PyObject_HEAD PyObject_HEAD
}PyDapObject; }PyDapObject;
...@@ -33,13 +27,13 @@ PyObject* py_m_dap_config_get_item(PyObject *self, PyObject *args); ...@@ -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); PyObject* py_m_dap_config_get_item_default(PyObject *self, PyObject *args);
static PyMethodDef DapMethods[] = { static PyMethodDef DapCoreMethods[] = {
{NULL, NULL, 0, NULL} {NULL, NULL, 0, NULL}
}; };
static PyTypeObject DapObject_DapObjectType = { static PyTypeObject DapCoreObjectType = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"CellFrame.Dap", /* tp_name */ "Dap", /* tp_name */
sizeof(PyDapObject), /* tp_basicsize */ sizeof(PyDapObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */
...@@ -66,7 +60,7 @@ static PyTypeObject DapObject_DapObjectType = { ...@@ -66,7 +60,7 @@ static PyTypeObject DapObject_DapObjectType = {
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
DapMethods, /* tp_methods */ DapCoreMethods, /* tp_methods */
0, /* tp_members */ 0, /* tp_members */
0, /* tp_getset */ 0, /* tp_getset */
0, /* tp_base */ 0, /* tp_base */
...@@ -77,12 +71,18 @@ static PyTypeObject DapObject_DapObjectType = { ...@@ -77,12 +71,18 @@ static PyTypeObject DapObject_DapObjectType = {
0, /* tp_init */ 0, /* tp_init */
0, /* tp_alloc */ 0, /* tp_alloc */
PyType_GenericNew, /* tp_new */ PyType_GenericNew, /* tp_new */
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
}; };
PyObject *dapListToPyList(dap_list_t *list); PyObject *dapListToPyList(dap_list_t *list);
dap_list_t *pyListToDapList(PyObject *list); dap_list_t *pyListToDapList(PyObject *list);
#ifdef __cplusplus
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment