[cairo] Repost [PATCH cairo-www] Missing argument defs cause segfaults

Bryce Harrington bryce at osg.samsung.com
Wed Jun 7 00:54:04 UTC 2017


On Wed, May 17, 2017 at 04:59:43PM +1200, Lawrence D'Oliveiro wrote:
> The cookbook example of how to call FreeType using ctypes is missing
> the argtypes definition for cairo_font_face_get_user_data. This will
> cause segfaults.
> 
> Enclosed is a fix.

Thanks, pushed:
To git+ssh://cairographics.org/git/cairo-www
   b4b4640..a36e943  master -> master

> commit 03559f851898195868cf218905129000c5ca8d16
> Author: Lawrence D'Oliveiro <ldo at geek-central.gen.nz>
> Date:   Wed Apr 19 01:20:03 2017 +0000
> 
>     missing argument defs cause segfault
> 
> diff --git a/src/cookbook/freetypepython.mdwn b/src/cookbook/freetypepython.mdwn
> index 5aea77f..83f71d5 100644
> --- a/src/cookbook/freetypepython.mdwn
> +++ b/src/cookbook/freetypepython.mdwn
> @@ -32,6 +32,7 @@ The resulting cairo font face however can be used normally with pycairo.
>  			_cairo_so.cairo_ft_font_face_create_for_ft_face.restype = ct.c_void_p
>  			_cairo_so.cairo_ft_font_face_create_for_ft_face.argtypes = [ ct.c_void_p, ct.c_int ]
>  			_cairo_so.cairo_font_face_get_user_data.restype = ct.c_void_p
> +			_cairo_so.cairo_font_face_get_user_data.argtypes = (ct.c_void_p, ct.c_void_p)
>  			_cairo_so.cairo_font_face_set_user_data.argtypes = (ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p)
>  			_cairo_so.cairo_set_font_face.argtypes = [ ct.c_void_p, ct.c_void_p ]
>  			_cairo_so.cairo_font_face_status.argtypes = [ ct.c_void_p ]

> -- 
> cairo mailing list
> cairo at cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo



More information about the cairo mailing list