File tree Expand file tree Collapse file tree
pythonforandroid/recipes/pil Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ class PILRecipe(CompiledComponentsPythonRecipe):
1111 site_packages_name = 'PIL'
1212
1313 patches = ['disable-tk.patch' ,
14- 'fix-directories.patch' ]
14+ 'fix-directories.patch' ,
15+ 'fix-reinit-access.patch' ]
1516
1617 def get_recipe_env (self , arch = None ):
1718 env = super (PILRecipe , self ).get_recipe_env (arch )
Original file line number Diff line number Diff line change 1+ --- Imaging-1.1.7/_imaging.c.orig 2016-08-16 11:22:50.645124791 +0700
2+ +++ Imaging-1.1.7/_imaging.c 2016-08-16 11:22:30.833125194 +0700
3+ @@ -3251,6 +3251,7 @@
4+ {
5+ PyObject* m;
6+ PyObject* d;
7+ + static int is_init = 0;
8+
9+ /* Patch object type */
10+ Imaging_Type.ob_type = &PyType_Type;
11+ @@ -3260,7 +3261,13 @@
12+ #endif
13+ PixelAccess_Type.ob_type = &PyType_Type;
14+
15+ - ImagingAccessInit();
16+ + /* FIXME: prevent exit(1) in libImaging/Access.c due to hash collision
17+ + * if it's re-initialized.
18+ + */
19+ + if (!is_init) {
20+ + ImagingAccessInit();
21+ + is_init = 1;
22+ + }
23+
24+ m = Py_InitModule("_imaging", functions);
25+ d = PyModule_GetDict(m);
26+
You can’t perform that action at this time.
0 commit comments