diff --git a/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h b/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h index d70c37d3b181ab0198c4f6c1572c7390da0d9d89..9f879c88d51059c613d0488e5e19337df7f768a5 100644 --- a/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h +++ b/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h @@ -386,6 +386,8 @@ typedef struct PyDapChainCellID{ dap_chain_cell_id_t cell_id; }PyDapChainCellIDObject; +PyObject *PyDapChainCellIdObject_str(PyObject *self); + static PyTypeObject DapChainCellIDObject_DapChainCellIDType = { PyVarObject_HEAD_INIT(NULL, 0) "CellFrame.ChainCellID" , /* tp_name */ @@ -402,7 +404,7 @@ static PyTypeObject DapChainCellIDObject_DapChainCellIDType = { 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ - 0, /* tp_str */ + PyDapChainCellIdObject_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ diff --git a/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c b/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c index 44c2d0f039f3e7911c29ee6532511e1c41184222..07be296e564948fa044a4e6e1e5f447486a1624f 100644 --- a/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c +++ b/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c @@ -4,6 +4,10 @@ PyObject *DapChainIdObject_str(PyObject *self){ return Py_BuildValue("s", dap_strdup_printf("0x%016"DAP_UINT64_FORMAT_x, ((PyDapChainIDObject*)self)->chain_id->uint64)); } +PyObject *PyDapChainCellIdObject_str(PyObject *self){ + return Py_BuildValue("s", dap_strdup_printf("0x%016"DAP_UINT64_FORMAT_x, ((PyDapChainCellIDObject*)self)->cell_id.uint64)); +} + PyObject *dap_chain_hash_slow_to_str_py(PyObject *self, PyObject *args){ PyObject *obj_hash_slow; char *str;