This addresses part of #3862.
- Remove default log handler.
- Log callback can now be set to nullptr, which just makes logging a no-op.
- Initial log callback is nullptr.
- Also tweaked format of token error log message and removed newline.
Assimp code that uses this may regain logging output by installing a callback and directing the output through appropriate logging facilities.
Use IsAlNum instead (gtest-port.h), which deals with char signedness correctly. This was the only spot in gtest where a cctype function was called instead of its gtest-port.h equivalent.
Addresses https://github.com/assimp/assimp/issues/3867 and then some.
The OpenGEX importer defined a few global std::string constants, only to convert them back to C strings on use. This commit defines them as C strings from the beginning.
strncmp() was used to compare these strings to other strings, but the length limit was set to string length, which made it equivalent to strcmp(), just slower. Fixed that as well.
The DXF importer defined a global std::string constant, only to convert it back to a C string on use.
This commit defines the constant as a C string right away, thus saving 340 B of code and data.
"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.
No effect on runtime speed/size. Slightly slower link time, but debugging experience improves by a million times.
- /Zi – Store debug information in a .pdb file, not directly in the DLL/EXE
- /DEBUG:FULL – generate debug information during link
- /PDBALTPATH:%_PDB% – do not store the file system path of the .pdb, just the filename and hash (no disclose paths on distribution)
- /OPT:REF /OPT:ICF – remove unreferenced functions and fold identical functions (this was enabled before, but requires explicit enabling if /DEBUG:FULL is specified)