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

[+] Added wrapping function dap_chain_hash_fast_to_str_new

parent 979bb87d
No related branches found
No related tags found
1 merge request!26Support 3689
...@@ -77,6 +77,7 @@ PyObject *dap_hash_fast_py(PyObject *self, PyObject *args); ...@@ -77,6 +77,7 @@ PyObject *dap_hash_fast_py(PyObject *self, PyObject *args);
PyObject *dap_hash_fast_compare_py(PyObject *self, PyObject *args); PyObject *dap_hash_fast_compare_py(PyObject *self, PyObject *args);
PyObject *dap_hash_fast_is_blank_py(PyObject *self, PyObject *args); PyObject *dap_hash_fast_is_blank_py(PyObject *self, PyObject *args);
PyObject *dap_chain_hash_fast_to_str_py(PyObject *self, PyObject *args); PyObject *dap_chain_hash_fast_to_str_py(PyObject *self, PyObject *args);
PyObject *dap_chain_hash_fast_to_str_new_py(PyObject *self, PyObject *args);
static PyMethodDef DapHashFastMethods[] = { static PyMethodDef DapHashFastMethods[] = {
{"strToHashFast", (PyCFunction)dap_chain_str_to_hash_fast_py, METH_VARARGS | METH_STATIC, ""}, {"strToHashFast", (PyCFunction)dap_chain_str_to_hash_fast_py, METH_VARARGS | METH_STATIC, ""},
...@@ -84,6 +85,7 @@ static PyMethodDef DapHashFastMethods[] = { ...@@ -84,6 +85,7 @@ static PyMethodDef DapHashFastMethods[] = {
{"compare", (PyCFunction)dap_hash_fast_compare_py, METH_VARARGS | METH_STATIC, ""}, {"compare", (PyCFunction)dap_hash_fast_compare_py, METH_VARARGS | METH_STATIC, ""},
{"isBlank", (PyCFunction)dap_hash_fast_is_blank_py, METH_VARARGS, ""}, {"isBlank", (PyCFunction)dap_hash_fast_is_blank_py, METH_VARARGS, ""},
{"toStr", (PyCFunction)dap_chain_hash_fast_to_str_py, METH_VARARGS, ""}, {"toStr", (PyCFunction)dap_chain_hash_fast_to_str_py, METH_VARARGS, ""},
{"toStrNew", (PyCFunction)dap_chain_hash_fast_to_str_new_py, METH_VARARGS, ""},
{NULL, NULL, 0, NULL} {NULL, NULL, 0, NULL}
}; };
......
...@@ -61,3 +61,8 @@ PyObject *dap_chain_hash_fast_to_str_py(PyObject *self, PyObject *args){ ...@@ -61,3 +61,8 @@ PyObject *dap_chain_hash_fast_to_str_py(PyObject *self, PyObject *args){
int res = dap_chain_hash_fast_to_str(((PyDapChainHashFastObject*)self)->hash_fast, str, str_max); int res = dap_chain_hash_fast_to_str(((PyDapChainHashFastObject*)self)->hash_fast, str, str_max);
return Py_BuildValue("sn", &str, &str_max); return Py_BuildValue("sn", &str, &str_max);
} }
PyObject *dap_chain_hash_fast_to_str_new_py(PyObject *self, PyObject *args){
char *res = dap_chain_hash_fast_to_str_new(((PyDapChainHashFastObject*)self)->hash_fast);
return Py_BuildValue("s", res);
}
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