ソースを参照

Fix "bytes aketrans" issues in Python>=3.1

Issue https://github.com/assimp/assimp/issues/2339
Huarong Chen 6 年 前
コミット
b6d3cbcb61
1 ファイル変更1 行追加1 行削除
  1. 1 1
      port/PyAssimp/pyassimp/core.py

+ 1 - 1
port/PyAssimp/pyassimp/core.py

@@ -93,7 +93,7 @@ def _is_init_type(obj):
         return False
         return False
     tname = obj.__class__.__name__
     tname = obj.__class__.__name__
     return not (tname[:2] == 'c_' or tname == 'Structure' \
     return not (tname[:2] == 'c_' or tname == 'Structure' \
-            or tname == 'POINTER') and not isinstance(obj,int)
+            or tname == 'POINTER') and not isinstance(obj, (int, str, bytes))
 
 
 def _init(self, target = None, parent = None):
 def _init(self, target = None, parent = None):
     """
     """