@@ -882,7 +882,7 @@ font_render(FontObject *self, PyObject *args) {
882
882
if (max_image_pixels != Py_None ) {
883
883
if ((long long )(width > 1 ? width : 1 ) * (height > 1 ? height : 1 ) > PyLong_AsLongLong (max_image_pixels ) * 2 ) {
884
884
PyMem_Del (glyph_info );
885
- return Py_BuildValue ("O (ii)(ii)" , Py_None , width , height , 0 , 0 );
885
+ return Py_BuildValue ("(ii)(ii)" , width , height , 0 , 0 );
886
886
}
887
887
}
888
888
@@ -898,7 +898,7 @@ font_render(FontObject *self, PyObject *args) {
898
898
y_offset -= stroke_width ;
899
899
if (count == 0 || width == 0 || height == 0 ) {
900
900
PyMem_Del (glyph_info );
901
- return Py_BuildValue ("O (ii)(ii)" , image , width , height , x_offset , y_offset );
901
+ return Py_BuildValue ("(ii)(ii)" , width , height , x_offset , y_offset );
902
902
}
903
903
904
904
if (stroke_width ) {
@@ -1113,9 +1113,10 @@ font_render(FontObject *self, PyObject *args) {
1113
1113
if (bitmap_converted_ready ) {
1114
1114
FT_Bitmap_Done (library , & bitmap_converted );
1115
1115
}
1116
+ Py_DECREF (image );
1116
1117
FT_Stroker_Done (stroker );
1117
1118
PyMem_Del (glyph_info );
1118
- return Py_BuildValue ("O (ii)(ii)" , image , width , height , x_offset , y_offset );
1119
+ return Py_BuildValue ("(ii)(ii)" , width , height , x_offset , y_offset );
1119
1120
1120
1121
glyph_error :
1121
1122
if (im -> destroy ) {
0 commit comments