@@ -882,7 +882,7 @@ font_render(FontObject *self, PyObject *args) {
882882 if (max_image_pixels != Py_None ) {
883883 if ((long long )(width > 1 ? width : 1 ) * (height > 1 ? height : 1 ) > PyLong_AsLongLong (max_image_pixels ) * 2 ) {
884884 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 );
886886 }
887887 }
888888
@@ -898,7 +898,7 @@ font_render(FontObject *self, PyObject *args) {
898898 y_offset -= stroke_width ;
899899 if (count == 0 || width == 0 || height == 0 ) {
900900 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 );
902902 }
903903
904904 if (stroke_width ) {
@@ -1113,9 +1113,10 @@ font_render(FontObject *self, PyObject *args) {
11131113 if (bitmap_converted_ready ) {
11141114 FT_Bitmap_Done (library , & bitmap_converted );
11151115 }
1116+ Py_DECREF (image );
11161117 FT_Stroker_Done (stroker );
11171118 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 );
11191120
11201121glyph_error :
11211122 if (im -> destroy ) {
0 commit comments