kivy-ios/kivy_ios/recipes/hostpython2/ssize-t-max.patch
Andre Miras 56431b6922 Moving to dedicated kivy_ios/ package directory
- updates all imports to prefix kivy_ios
- adds basic `setup.py` file
- adds a simple `toolchain.py` to the root folder for compat

Makes it possible to install kivy-ios from PyPI:
```
pip install kivy-ios
toolchain --help
```
Note the `rebuild_updated_recipes.py` is expected to fail as we
moved all the recipes.

This is a working, but unperfect iteration that come with limitations
we would address in subsequent pull requests, such as:
- the new usage is not yet documented
- CI is not testing the source distribution creation and install
- Continuous Delivery to PyPI is not in place
- `toolchain` binary is a bit too generic name
- we're still vendoring things under `tools/`
2020-05-03 23:29:41 +02:00

17 lines
719 B
Diff

diff -Naur Python-2.7.1.orig/Include/pyport.h Python-2.7.1/Include/pyport.h
--- Python-2.7.1.orig/Include/pyport.h 2010-09-14 18:10:22.000000000 +0200
+++ Python-2.7.1/Include/pyport.h 2011-05-13 12:24:53.000000000 +0200
@@ -186,9 +186,11 @@
#endif
/* Largest positive value of type Py_ssize_t. */
-#define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1))
+//#define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1))
/* Smallest negative value of type Py_ssize_t. */
-#define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1)
+//#define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1)
+#define PY_SSIZE_T_MAX TMP_MAX
+#define PY_SSIZE_T_MIN -TMP_MAX
#if SIZEOF_PID_T > SIZEOF_LONG
# error "Python doesn't support sizeof(pid_t) > sizeof(long)"