Skip to content

Commit

Permalink
Merge pull request #27332 from meeseeksmachine/auto-backport-of-pr-27…
Browse files Browse the repository at this point in the history
…290-on-v3.7.x

Backport PR #27290 on branch v3.7.x (Ensure GIL while releasing buffer)
  • Loading branch information
QuLogic committed Nov 17, 2023
2 parents 49f77a0 + 2bbdeb1 commit 83191f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/_macosx.m
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,10 @@ - (void)setCanvas: (PyObject*)newCanvas
}

static void _buffer_release(void* info, const void* data, size_t size) {
PyGILState_STATE gstate = PyGILState_Ensure();
PyBuffer_Release((Py_buffer *)info);
free(info);
PyGILState_Release(gstate);
}

static int _copy_agg_buffer(CGContextRef cr, PyObject *renderer)
Expand Down

0 comments on commit 83191f4

Please sign in to comment.