From ab077a9081ad400a7fd1d585532c4bfcc036e10a Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Wed, 15 Jan 2020 21:58:21 +0700
Subject: [PATCH] [+] Added the ability to work with functions of a static
 class ChainGDB.

---
 include/python-cellframe.h | 1 +
 src/python-cellframe.c     | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/python-cellframe.h b/include/python-cellframe.h
index 014fb938..0cd0be87 100644
--- a/include/python-cellframe.h
+++ b/include/python-cellframe.h
@@ -53,6 +53,7 @@
 #include "dap_file_utils.h"
 #include "dap_string.h"
 #include "generator_config_file.h"
+#include "wrapping_dap_chain_gdb.h"
 
 #include "dap_common.h"
 
diff --git a/src/python-cellframe.c b/src/python-cellframe.c
index 68dc7f60..2e38d22c 100644
--- a/src/python-cellframe.c
+++ b/src/python-cellframe.c
@@ -271,7 +271,7 @@ static PyObject *python_cellframe_init(PyObject *self, PyObject *args){
             }
         }
         if (strcmp(c_value, "GDB") == 0){
-            if (dap_chain_gdb_init() != 0){
+            if (dap_chain_gdb_init_py() != 0){
                 PyErr_SetString(CellFrame_error, "Failed to initialize GDB module. ");
                 return NULL;
             }
@@ -334,6 +334,8 @@ PyMODINIT_FUNC PyInit_CellFrame(void){
             PyType_Ready(&DapChainNetStateObject_DapChainNetStateObjectType) < 0 ||
             // =============
 
+            PyType_Ready(&DapChainGDBObject_DapChainGDBType) < 0 ||
+
             PyType_Ready(&DapHTTP_DapHTTPType) < 0 ||
             PyType_Ready(&DapEncHTTP_DapEncHTTPType) < 0 ||
             PyType_Ready(&DapStream_DapStreamType) < 0 ||
@@ -402,6 +404,8 @@ PyMODINIT_FUNC PyInit_CellFrame(void){
     PyModule_AddObject(module, "ChainNetState", (PyObject*)&DapChainNetStateObject_DapChainNetStateObjectType);
     // =============
 
+    PyModule_AddObject(module, "ChainGDB", (PyObject*)&DapChainGDBObject_DapChainGDBType);
+
     PyModule_AddObject(module, "Http", (PyObject*)&DapHTTP_DapHTTPType);
     PyModule_AddObject(module, "EncHttp", (PyObject*)&DapEncHTTP_DapEncHTTPType);
     PyModule_AddObject(module, "Stream", (PyObject*)&DapStream_DapStreamType);
-- 
GitLab