Skip to content

Commit 6bf45cd

Browse files
committed
FIX macos: Use the agg buffer_rgba rather than private attribute
The _renderer attribute has changed with the pybind11 update and we aren't able to access it as a buffer anymore. We can use the buffer_rgba method to get the direct memoryview of the buffer instead.
1 parent 0f70a22 commit 6bf45cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_macosx.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ -(void)drawRect:(NSRect)rect
12361236
CGContextRef cr = [[NSGraphicsContext currentContext] CGContext];
12371237

12381238
if (!(renderer = PyObject_CallMethod(canvas, "get_renderer", ""))
1239-
|| !(renderer_buffer = PyObject_GetAttrString(renderer, "_renderer"))) {
1239+
|| !(renderer_buffer = PyObject_CallMethod(renderer, "buffer_rgba", ""))) {
12401240
PyErr_Print();
12411241
goto exit;
12421242
}

0 commit comments

Comments
 (0)