gh-114099: Additions to standard library to support iOS (GH-117052)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Ned Deily <nad@python.org>
This commit is contained in:
Russell Keith-Magee 2024-03-28 15:59:33 +08:00 committed by GitHub
parent b44898299a
commit f006338017
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 474 additions and 48 deletions

View file

@ -14,6 +14,10 @@
#include "pycore_setobject.h" // _PySet_NextEntry()
#include "marshal.h" // Py_MARSHAL_VERSION
#ifdef __APPLE__
# include "TargetConditionals.h"
#endif /* __APPLE__ */
/*[clinic input]
module marshal
[clinic start generated code]*/
@ -33,11 +37,14 @@ module marshal
* #if defined(MS_WINDOWS) && defined(_DEBUG)
*/
#if defined(MS_WINDOWS)
#define MAX_MARSHAL_STACK_DEPTH 1000
# define MAX_MARSHAL_STACK_DEPTH 1000
#elif defined(__wasi__)
#define MAX_MARSHAL_STACK_DEPTH 1500
# define MAX_MARSHAL_STACK_DEPTH 1500
// TARGET_OS_IPHONE covers any non-macOS Apple platform.
#elif defined(__APPLE__) && TARGET_OS_IPHONE
# define MAX_MARSHAL_STACK_DEPTH 1500
#else
#define MAX_MARSHAL_STACK_DEPTH 2000
# define MAX_MARSHAL_STACK_DEPTH 2000
#endif
#define TYPE_NULL '0'

View file

@ -38,6 +38,7 @@ static const char* _Py_stdlib_module_names[] = {
"_heapq",
"_imp",
"_io",
"_ios_support",
"_json",
"_locale",
"_lsprof",