Skip to content

Commit

Permalink
BUG Switch type dispatch to use NPY_INTxx format
Browse files Browse the repository at this point in the history
This makes it easier to see what is handled (NPY_ULONG was missing
before)
  • Loading branch information
luispedro committed Jul 12, 2024
1 parent 6fa0088 commit 6f2b09a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions mahotas/numpypp/dispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ typedef unsigned char uchar;
typedef unsigned short ushort;
#define HANDLE_INTEGER_TYPES() \
case NPY_BOOL: HANDLE(bool); break; \
case NPY_UBYTE: HANDLE(unsigned char); break; \
case NPY_BYTE: HANDLE(char); break; \
case NPY_SHORT: HANDLE(short); break; \
case NPY_USHORT: HANDLE(unsigned short); break; \
case NPY_INT: HANDLE(int); break; \
case NPY_UINT: HANDLE(unsigned int); break; \
case NPY_LONG: HANDLE(npy_long); break; \
case NPY_LONGLONG: HANDLE(npy_longlong); break; \
case NPY_ULONGLONG: HANDLE(npy_ulonglong); break;
case NPY_INT8: HANDLE(npy_int8); break; \
case NPY_UINT8: HANDLE(npy_uint8); break; \
case NPY_INT16: HANDLE(npy_int16); break; \
case NPY_UINT16: HANDLE(npy_uint16); break; \
case NPY_INT32: HANDLE(npy_int32); break; \
case NPY_UINT32: HANDLE(npy_uint32); break; \
case NPY_INT64: HANDLE(npy_int64); break; \
case NPY_UINT64: HANDLE(npy_uint64); break;

#if defined(NPY_FLOAT128)
#define HANDLE_FLOAT128() case NPY_FLOAT128: HANDLE(npy_float128)
Expand Down

0 comments on commit 6f2b09a

Please sign in to comment.