Commits

illume committed e2651d3

disable gil release for image save for all platforms.

  • Participants
  • Parent commits 3e7d2a8

Comments (0)

Files changed (1)

File src/imageext.c

                 (name[namelen - 3]=='j' || name[namelen - 3]=='J'))))
         {
 #ifdef JPEGLIB_H
-#ifndef MS_WIN32
-            Py_BEGIN_ALLOW_THREADS;
-#endif
+            /* Png, and jpg save functions are not thread safe. */
+            /*Py_BEGIN_ALLOW_THREADS; */
             result = SaveJPEG (surf, name);
-#ifndef MS_WIN32
-            Py_END_ALLOW_THREADS;
-#endif
+            /*Py_END_ALLOW_THREADS; */
 
 #else
             return RAISE (PyExc_SDLError, "No support for jpg compiled in.");
         else if (name[namelen-1]=='g' || name[namelen-1]=='G')
         {
 #ifdef PNG_H
-#ifndef MS_WIN32
-            Py_BEGIN_ALLOW_THREADS;
-#endif
+            /*Py_BEGIN_ALLOW_THREADS; */
             result = SavePNG (surf, name);
-#ifndef MS_WIN32
-            Py_END_ALLOW_THREADS;
-#endif
+            /*Py_END_ALLOW_THREADS; */
 #else
             return RAISE (PyExc_SDLError, "No support for png compiled in.");
 #endif