Skip to content
Snippets Groups Projects
Commit 65060774 authored by Roman Khlopkov's avatar Roman Khlopkov 🔜
Browse files

Merge branch 'bugfix-6745' into 'develop'

[*] The wrapper of the dap_chain_net_id_from_str function has been redone,...

See merge request !174
parents 7bfb0fb1 dc2b125b
No related branches found
No related tags found
1 merge request!174[*] The wrapper of the dap_chain_net_id_from_str function has been redone,...
...@@ -425,7 +425,12 @@ PyObject *dap_chain_net_id_from_str_py(PyObject *self, PyObject *args){ ...@@ -425,7 +425,12 @@ PyObject *dap_chain_net_id_from_str_py(PyObject *self, PyObject *args){
if (!PyArg_ParseTuple(args, "s", &str)) if (!PyArg_ParseTuple(args, "s", &str))
return NULL; return NULL;
PyObject *obj_net_id = _PyObject_New(&DapChainNetIdObjectType); PyObject *obj_net_id = _PyObject_New(&DapChainNetIdObjectType);
((PyDapChainNetIdObject*)obj_net_id)->net_id = dap_chain_net_id_from_str(str); if (dap_sscanf(str, "0x%016"DAP_UINT64_FORMAT_X, &((PyDapChainNetIdObject*)obj_net_id)->net_id.uint64) != 1) {
char *l_err = dap_strdup_printf("Wrong id format (\"%s\"). Must be like \"0x0123456789ABCDE\"" , str);
PyErr_SetString(PyExc_AttributeError, l_err);
DAP_DELETE(l_err);
return NULL;
}
return Py_BuildValue("O", obj_net_id); return Py_BuildValue("O", obj_net_id);
} }
......
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