Skip to content
Snippets Groups Projects
Commit f3230971 authored by Dmitry Puzyrkov's avatar Dmitry Puzyrkov
Browse files

Merge branch 'feature-16685' into 'master'

Empty list instead of null in get_items

See merge request !456
parents 4590549f 674d1c9d
No related branches found
No related tags found
1 merge request!456Empty list instead of null in get_items
......@@ -239,8 +239,13 @@ PyObject *wrapping_dap_chain_datum_tx_get_items(PyObject *self, PyObject *args){
while(l_tx_items_count < l_tx_items_size){
uint8_t *item = ((PyDapChainDatumTxObject*)self)->datum_tx->tx_items + l_tx_items_count;
size_t l_tx_item_size = dap_chain_datum_item_tx_get_size(item, 0);
if (l_tx_item_size == 0){
return NULL;
if (l_tx_item_size == 0) {
Py_DECREF(obj_list);
DAP_DELETE(l_tx_hf);
PyObject *empty_list = PyList_New(0);
return empty_list;
}
PyObject *obj_tx_item = NULL;
switch (*item) {
......
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