Skip to content
Snippets Groups Projects
Commit 5611f40a authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[+] Added initialize mempool module

parent e00df308
No related branches found
No related tags found
1 merge request!5Urgently
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "libdap_chain_atom_iter_python.h" #include "libdap_chain_atom_iter_python.h"
#include "wrapping_dap_chain_cell.h" #include "wrapping_dap_chain_cell.h"
#include "wrapping_dap_chain_common.h" #include "wrapping_dap_chain_common.h"
#include "wrapping_dap_chain_common_objects.h"
#include "wrapping_dap_chain_cs.h" #include "wrapping_dap_chain_cs.h"
#include "wrapping_dap_chain_datum.h" #include "wrapping_dap_chain_datum.h"
#include "wrapping_dap_chain_datum_token.h" #include "wrapping_dap_chain_datum_token.h"
...@@ -31,6 +30,7 @@ ...@@ -31,6 +30,7 @@
#include "wrapping_dap_enc_http.h" #include "wrapping_dap_enc_http.h"
#include "wrapping_dap_stream.h" #include "wrapping_dap_stream.h"
#include "wrapping_dap_stream_ctl.h" #include "wrapping_dap_stream_ctl.h"
#include "wrapping_dap_mempool.h"
#include "dap_common.h" #include "dap_common.h"
......
...@@ -144,6 +144,12 @@ static PyObject *python_cellframe_init(PyObject *self, PyObject *args){ ...@@ -144,6 +144,12 @@ static PyObject *python_cellframe_init(PyObject *self, PyObject *args){
return NULL; return NULL;
} }
} }
if (strcmp(c_value, "Mempool") == 0){
if (dap_datum_mempool_init() != 0){
PyErr_SetString(CellFrame_error, "Failed to initialize Mempool module. ");
return NULL;
}
}
} }
return PyLong_FromLong(0); return PyLong_FromLong(0);
} }
...@@ -194,7 +200,8 @@ PyMODINIT_FUNC PyInit_CellFrame(void){ ...@@ -194,7 +200,8 @@ PyMODINIT_FUNC PyInit_CellFrame(void){
PyType_Ready(&DapHTTP_DapHTTPType) < 0 || PyType_Ready(&DapHTTP_DapHTTPType) < 0 ||
PyType_Ready(&DapEncHTTP_DapEncHTTPType) < 0 || PyType_Ready(&DapEncHTTP_DapEncHTTPType) < 0 ||
PyType_Ready(&DapStream_DapStreamType) < 0 || PyType_Ready(&DapStream_DapStreamType) < 0 ||
PyType_Ready(&DapStreamCtl_DapStreamCtlType) < 0 PyType_Ready(&DapStreamCtl_DapStreamCtlType) < 0 ||
PyType_Ready(&DapMempool_DapMempoolType) < 0
) )
return NULL; return NULL;
...@@ -262,6 +269,7 @@ PyMODINIT_FUNC PyInit_CellFrame(void){ ...@@ -262,6 +269,7 @@ PyMODINIT_FUNC PyInit_CellFrame(void){
PyModule_AddObject(module, "EncHttp", (PyObject*)&DapEncHTTP_DapEncHTTPType); PyModule_AddObject(module, "EncHttp", (PyObject*)&DapEncHTTP_DapEncHTTPType);
PyModule_AddObject(module, "Stream", (PyObject*)&DapStream_DapStreamType); PyModule_AddObject(module, "Stream", (PyObject*)&DapStream_DapStreamType);
PyModule_AddObject(module, "StreamCtl", (PyObject*)&DapStreamCtl_DapStreamCtlType); PyModule_AddObject(module, "StreamCtl", (PyObject*)&DapStreamCtl_DapStreamCtlType);
PyModule_AddObject(module, "Mempool", (PyObject*)&DapMempool_DapMempoolType);
return module; return module;
......
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