Skip to content

Commit

Permalink
Fix init aistring issue 5622 inpython module (#5625)
Browse files Browse the repository at this point in the history
* Draft: Update init of aiString

- closes #5622

* Update types.h

* Fix typo

* Fix another typo

* Adapt usage of AI_MAXLEN

* Fix compare operator

* Add missing renames

* Add missing renames
  • Loading branch information
kimkulling committed Jun 17, 2024
1 parent a51500b commit 07ab05c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions port/PyAssimp/pyassimp/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand All @@ -90,16 +90,16 @@ 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
# logical length of strings containing UTF-8 multibyte sequences! It's
# 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):
Expand Down

0 comments on commit 07ab05c

Please sign in to comment.