浏览代码

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
     tname = obj.__class__.__name__
     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):
     """