[cairo-commit] [cairo-www] src/cookbook

Bryce Harrington bryce at freedesktop.org
Wed Jun 7 00:53:26 UTC 2017


 src/cookbook/freetypepython.mdwn |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit a36e9434df031618fc5626942f5225b774366318
Author: Lawrence D'Oliveiro <ldo at geek-central.gen.nz>
Date:   Wed May 17 16:59:43 2017 +1200

    Repost [PATCH cairo-www] Missing argument defs cause segfaults
    
    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.
    
    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 ]


More information about the cairo-commit mailing list