ソースを参照

Use POINTER(c_char) for binary data with pyassimp

"For a general character pointer that may also point to binary data,
POINTER(c_char) must be used." c_char_p is for a zero-terminated string.

Reference: https://docs.python.org/3/library/ctypes.html#ctypes.c_char_p

Applying this change to the 4.1.4 released python module fixes #2339 for
me in Ubuntu.
Eric Olson 4 年 前
コミット
f17d58cadd
1 ファイル変更2 行追加2 行削除
  1. 2 2
      port/PyAssimp/pyassimp/structs.py

+ 2 - 2
port/PyAssimp/pyassimp/structs.py

@@ -1,6 +1,6 @@
 #-*- coding: utf-8 -*-
 
-from ctypes import POINTER, c_void_p, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte, c_size_t, c_uint32
+from ctypes import POINTER, c_void_p, c_uint, c_char, c_float, Structure, c_double, c_ubyte, c_size_t, c_uint32
 
 
 class Vector2D(Structure):
@@ -1121,7 +1121,7 @@ class Scene(Structure):
             ("mMetadata", POINTER(Metadata)),
 
             # Internal data, do not touch
-            ("mPrivate", c_char_p),
+            ("mPrivate", POINTER(c_char)),
         ]
 
 assimp_structs_as_tuple = (Matrix4x4,