Skip to content

Commit

Permalink
Possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuzu-Typ committed Nov 30, 2020
1 parent e3a44aa commit 0c1a96a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PyGLM/types/glmArray/glmArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

#include "forward_declarations.h"

#define T_PTR_AS_NUM ((sizeof(void*) == sizeof(unsigned long long)) ? T_ULONGLONG : (sizeof(void*) == sizeof(unsigned long)) ? T_ULONG : (sizeof(void*) == sizeof(unsigned int)) ? T_UINT : T_PYSSIZET)

static PyMemberDef glmArray_members[] = {
{ (char*)"nbytes", T_PYSSIZET, offsetof(glmArray, nBytes), 1, (char*)"Total combined bytecount of all elements" },
{ (char*)"typecode", T_CHAR, offsetof(glmArray, format), 1, (char*)"The typecode character of the underlying format" },
{ (char*)"element_type", T_OBJECT, offsetof(glmArray, subtype), 1, (char*)"Type class of the contained elements" },
{ (char*)"itemsize", T_PYSSIZET, offsetof(glmArray, itemSize), 1, (char*)"The size of one array item in bytes " },
{ (char*)"dt_size", T_PYSSIZET, offsetof(glmArray, dtSize), 1, (char*)"The size of each single component of the elements in bytes (size of data type)" },
{ (char*)"address", T_ULONGLONG, offsetof(glmArray, data), 1, (char*)"The memory address where this array stores it's data" },
{ (char*)"address", T_PTR_AS_NUM, offsetof(glmArray, data), 1, (char*)"The memory address where this array stores it's data" },
{ (char*)"length", T_PYSSIZET, offsetof(glmArray, itemCount), 1, (char*)"The count of elements contained by this array" },
{ (char*)"readonly", T_BOOL, offsetof(glmArray, readonly), 1, (char*)"Whether or not the array is read-only" },
{ (char*)"reference", T_OBJECT, offsetof(glmArray, reference), 1, (char*)"The reference to the array owning the data (if any)" },
Expand Down

0 comments on commit 0c1a96a

Please sign in to comment.