Merge branch 'master' into gltf_binary

pull/5154/head
Kim Kulling 2023-06-30 11:16:08 +02:00 committed by GitHub
commit 3e74453b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -268,6 +268,11 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT MINGW)
SET(CMAKE_CXX_STANDARD 17) SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON) SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
ENDIF() ENDIF()
IF(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 13)
MESSAGE(STATUS "GCC13 detected disabling \"-Wdangling-reference\" in Cpp files as it appears to be a false positive")
ADD_COMPILE_OPTIONS("$<$<COMPILE_LANGUAGE:CXX>:-Wno-dangling-reference>")
ENDIF()
# hide all not-exported symbols # hide all not-exported symbols
IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64" ) IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64" )
SET(CMAKE_CXX_FLAGS "-mxgot -fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}") SET(CMAKE_CXX_FLAGS "-mxgot -fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")

View File

@ -311,6 +311,7 @@ def load(filename,
Scene object with model data Scene object with model data
''' '''
from ctypes import c_char_p
if hasattr(filename, 'read'): if hasattr(filename, 'read'):
# This is the case where a file object has been passed to load. # This is the case where a file object has been passed to load.
# It is calling the following function: # It is calling the following function:
@ -324,7 +325,7 @@ def load(filename,
model = _assimp_lib.load_mem(data, model = _assimp_lib.load_mem(data,
len(data), len(data),
processing, processing,
file_type) c_char_p(file_type.encode(sys.getfilesystemencoding())))
else: else:
# a filename string has been passed # a filename string has been passed
model = _assimp_lib.load(filename.encode(sys.getfilesystemencoding()), processing) model = _assimp_lib.load(filename.encode(sys.getfilesystemencoding()), processing)