Merge branch 'release/1.10.x' into incoming

This commit is contained in:
rdb 2023-02-24 22:40:53 +01:00
commit 32c73763e2
3 changed files with 23 additions and 14 deletions

View File

@ -1207,13 +1207,16 @@ class Freezer:
except ImportError: except ImportError:
pass pass
else: else:
self.__loadModule(self.ModuleDef(modname, implicit = True)) try:
self.__loadModule(self.ModuleDef(modname, implicit = True))
except ImportError:
pass
# Special case for sysconfig, which depends on a platform-specific # Special case for sysconfig, which depends on a platform-specific
# sysconfigdata module on POSIX systems. # sysconfigdata module on POSIX systems.
missing = [] missing = []
if 'sysconfig' in self.mf.modules and \ if 'sysconfig' in self.mf.modules and \
('linux' in self.platform or 'mac' in self.platform): ('linux' in self.platform or 'mac' in self.platform or 'emscripten' in self.platform):
modname = '_sysconfigdata' modname = '_sysconfigdata'
if sys.version_info >= (3, 6): if sys.version_info >= (3, 6):
modname += '_' modname += '_'
@ -1225,6 +1228,12 @@ class Freezer:
modname += '_linux_' + arch + '-linux-gnu' modname += '_linux_' + arch + '-linux-gnu'
elif 'mac' in self.platform: elif 'mac' in self.platform:
modname += '_darwin_darwin' modname += '_darwin_darwin'
elif 'emscripten' in self.platform:
if '_' in self.platform:
arch = self.platform.split('_', 1)[1]
else:
arch = 'wasm32'
modname += '_emscripten_' + arch + '-emscripten'
try: try:
self.__loadModule(self.ModuleDef(modname, implicit=True)) self.__loadModule(self.ModuleDef(modname, implicit=True))

View File

@ -451,8 +451,8 @@ png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) {
* This is our own warning handler. It is called by the png library to issue * This is our own warning handler. It is called by the png library to issue
* a warning message. * a warning message.
*/ */
void PNMFileTypePNG::Reader:: void (PNMFileTypePNG::Reader::
png_warning(png_structp, png_const_charp warning_msg) { png_warning)(png_structp, png_const_charp warning_msg) {
pnmimage_png_cat.warning() pnmimage_png_cat.warning()
<< warning_msg << "\n"; << warning_msg << "\n";
} }
@ -461,8 +461,8 @@ png_warning(png_structp, png_const_charp warning_msg) {
* This is our own error handler. It is called by the png library to issue a * This is our own error handler. It is called by the png library to issue a
* fatal error message. * fatal error message.
*/ */
void PNMFileTypePNG::Reader:: void (PNMFileTypePNG::Reader::
png_error(png_structp png_ptr, png_const_charp error_msg) { png_error)(png_structp png_ptr, png_const_charp error_msg) {
pnmimage_png_cat.error() pnmimage_png_cat.error()
<< error_msg << "\n"; << error_msg << "\n";
@ -921,8 +921,8 @@ png_flush_data(png_structp png_ptr) {
* This is our own warning handler. It is called by the png library to issue * This is our own warning handler. It is called by the png library to issue
* a warning message. * a warning message.
*/ */
void PNMFileTypePNG::Writer:: void (PNMFileTypePNG::Writer::
png_warning(png_structp, png_const_charp warning_msg) { png_warning)(png_structp, png_const_charp warning_msg) {
pnmimage_png_cat.warning() pnmimage_png_cat.warning()
<< warning_msg << "\n"; << warning_msg << "\n";
} }
@ -931,8 +931,8 @@ png_warning(png_structp, png_const_charp warning_msg) {
* This is our own error handler. It is called by the png library to issue a * This is our own error handler. It is called by the png library to issue a
* fatal error message. * fatal error message.
*/ */
void PNMFileTypePNG::Writer:: void (PNMFileTypePNG::Writer::
png_error(png_structp png_ptr, png_const_charp error_msg) { png_error)(png_structp png_ptr, png_const_charp error_msg) {
pnmimage_png_cat.error() pnmimage_png_cat.error()
<< error_msg << "\n"; << error_msg << "\n";

View File

@ -58,8 +58,8 @@ public:
static void png_read_data(png_structp png_ptr, png_bytep data, static void png_read_data(png_structp png_ptr, png_bytep data,
png_size_t length); png_size_t length);
static void png_error(png_structp png_ptr, png_const_charp error_msg); static void (png_error)(png_structp png_ptr, png_const_charp error_msg);
static void png_warning(png_structp png_ptr, png_const_charp warning_msg); static void (png_warning)(png_structp png_ptr, png_const_charp warning_msg);
png_structp _png; png_structp _png;
png_infop _info; png_infop _info;
@ -84,8 +84,8 @@ public:
png_size_t length); png_size_t length);
static void png_flush_data(png_structp png_ptr); static void png_flush_data(png_structp png_ptr);
static void png_error(png_structp png_ptr, png_const_charp error_msg); static void (png_error)(png_structp png_ptr, png_const_charp error_msg);
static void png_warning(png_structp png_ptr, png_const_charp warning_msg); static void (png_warning)(png_structp png_ptr, png_const_charp warning_msg);
png_structp _png; png_structp _png;
png_infop _info; png_infop _info;