"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.
Fixes error shown below:
File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 320, in load
scene = _init(model.contents)
File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 206, in _init
raise e
File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 187, in _init
call_init(e, target)
File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 80, in call_init
_init(obj.contents, obj, caller)
File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 214, in _init
if _is_init_type(obj):
File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 86, in _is_init_type
if helper.hasattr_silent(obj,'contents'): #pointer
File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\helper.py", line 277, in hasattr_silent
return hasattr(object, name)
ValueError: NULL pointer access
This error occurred because of error in finding .extension files.
os.path.splitext(filename)[-1].lower() not in ext_whitelist: ### this line had bugs, failed to select files with extensions .so.x [.so.1 .so.2 .so.3.1] but worked on simple extensions only. like- .so .dll
Added a mechanism to remove this bug.
Some are doxy comments, some are just trivial source comment typos.
Found using `codespell -q 3 --skip="./contrib" -I ../assimp-whitelist.txt`
whereby whitelist contained:
```
childs
iff
lod
nto
ot
whitespaces
```
When using python3 and running any of the provided scripts I get:
NameError: name 'unicode' is not defined. Python3 does not have unicode. Using try-except method helps to support python3
This reverts commit 33bd5cfcfb.
Installing the assimp library from setup.py is *not* a good idea as
it will break every packaging effort.
Besides, the original commit relies on an hard-coded path to find the
library that may not exist.