From 3939176c0dde144e3d6fb9f9e443dbe9e826aa17 Mon Sep 17 00:00:00 2001 From: sdixon Date: Wed, 11 Dec 2024 15:11:54 +0000 Subject: [PATCH] fixing issues with using UDA_TYPE_OPAQUE for returning binary data --- source/clientserver/udaTypes.cpp | 4 +++- source/wrappers/python/pyuda/cpyuda/types.pyx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/clientserver/udaTypes.cpp b/source/clientserver/udaTypes.cpp index 7f5c0ae7..60a2badd 100755 --- a/source/clientserver/udaTypes.cpp +++ b/source/clientserver/udaTypes.cpp @@ -37,6 +37,8 @@ size_t getSizeOf(UDA_TYPE data_type) return sizeof(DCOMPLEX); case UDA_TYPE_CAPNP: return sizeof(char); + case UDA_TYPE_OPAQUE: + return sizeof(char); default: return 0; } @@ -78,4 +80,4 @@ size_t getPtrSizeOf(UDA_TYPE data_type) default: return 0; } -} \ No newline at end of file +} diff --git a/source/wrappers/python/pyuda/cpyuda/types.pyx b/source/wrappers/python/pyuda/cpyuda/types.pyx index 6a58c9be..c2a1088c 100644 --- a/source/wrappers/python/pyuda/cpyuda/types.pyx +++ b/source/wrappers/python/pyuda/cpyuda/types.pyx @@ -17,6 +17,7 @@ __uda2np_map = { 12: np.NPY_UINT64, # UDA_TYPE_UNSIGNED_LONG64 = 12, 13: np.NPY_COMPLEX64, # UDA_TYPE_COMPLEX = 13, 14: np.NPY_COMPLEX128, # UDA_TYPE_DCOMPLEX = 14, + 19: np.NPY_UINT8, # UDA_TYPE_OPAQUE } __np2uda_map = dict((__uda2np_map[i], i) for i in __uda2np_map)