From 07ab05cc418f2b2fde1615be24c9718cb40b73ec Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 17 Jun 2024 23:52:23 +0200 Subject: [PATCH] Fix init aistring issue 5622 inpython module (#5625) * Draft: Update init of aiString - closes https://github.com/assimp/assimp/issues/5622 * Update types.h * Fix typo * Fix another typo * Adapt usage of AI_MAXLEN * Fix compare operator * Add missing renames * Add missing renames --- port/PyAssimp/pyassimp/structs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/port/PyAssimp/pyassimp/structs.py b/port/PyAssimp/pyassimp/structs.py index 932998025..4364e2793 100644 --- a/port/PyAssimp/pyassimp/structs.py +++ b/port/PyAssimp/pyassimp/structs.py @@ -70,7 +70,7 @@ class String(Structure): See 'types.h' for details. """ - MAXLEN = 1024 + AI_MAXLEN = 1024 _fields_ = [ # Binary length of the string excluding the terminal 0. This is NOT the @@ -79,7 +79,7 @@ class String(Structure): ("length", c_uint32), # String buffer. Size limit is MAXLEN - ("data", c_char*MAXLEN), + ("data", c_char*AI_MAXLEN), ] class MaterialPropertyString(Structure): @@ -90,7 +90,7 @@ class MaterialPropertyString(Structure): material property (see MaterialSystem.cpp aiMaterial::AddProperty() for details). """ - MAXLEN = 1024 + AI_MAXLEN = 1024 _fields_ = [ # Binary length of the string excluding the terminal 0. This is NOT the @@ -98,8 +98,8 @@ class MaterialPropertyString(Structure): # the number of bytes from the beginning of the string to its end. ("length", c_uint32), - # String buffer. Size limit is MAXLEN - ("data", c_char*MAXLEN), + # String buffer. Size limit is AI_MAXLEN + ("data", c_char*AI_MAXLEN), ] class MemoryInfo(Structure):