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

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.lib.cairo
Organization Geek Central
Message-ID <[email protected]>
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.

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
ldo-cookbook-get-user-data-argtypes.patch (text/x-patch, 1021 B)
commit 03559f851898195868cf218905129000c5ca8d16
Author: Lawrence D'Oliveiro <[email protected]>
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 ]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.