cvs: gd /gd-pango gd_pango.c

[email protected] ("Takeshi Abe") Wed, 17 Dec 2008 12:13:44 -0000
Newsgroups php.gd.cvs
Message-ID <cvstabe1229516024@cvsserver>
tabe		Wed Dec 17 12:13:44 2008 UTC

  Modified files:              
    /gd/gd-pango	gd_pango.c 
  Log:
  cast some of pointers. (the patch of FS#187 applied)
  
http://cvs.php.net/viewvc.cgi/gd/gd-pango/gd_pango.c?r1=1.15&r2=1.16&diff_format=u
Index: gd/gd-pango/gd_pango.c
diff -u gd/gd-pango/gd_pango.c:1.15 gd/gd-pango/gd_pango.c:1.16
--- gd/gd-pango/gd_pango.c:1.15	Sun Sep 14 15:21:13 2008
+++ gd/gd-pango/gd_pango.c	Wed Dec 17 12:13:44 2008
@@ -15,7 +15,7 @@
   | Authors: Pierre-A. Joye <[email protected]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: gd_pango.c,v 1.15 2008/09/14 15:21:13 tabe Exp $ */
+/* $Id: gd_pango.c,v 1.16 2008/12/17 12:13:44 tabe Exp $ */
 /**
  * @file
  * @brief Pango support for GD
@@ -24,7 +24,7 @@
  *
  * @author Pierre-Alain Joye
  * @date   2006/12/19
- * $Id: gd_pango.c,v 1.15 2008/09/14 15:21:13 tabe Exp $
+ * $Id: gd_pango.c,v 1.16 2008/12/17 12:13:44 tabe Exp $
  */
 /**
  * \mainpage
@@ -140,12 +140,12 @@
 	}
 
 	while (tmp_list) {
-		PangoAttribute *attr = tmp_list->data;
+		PangoAttribute *attr = (PangoAttribute *)tmp_list->data;
 
 		switch (attr->klass->type) {
 		case PANGO_ATTR_UNDERLINE:
 			if (uline) {
-				*uline = ((PangoAttrInt *)attr)->value;
+				*uline = (PangoUnderline)((PangoAttrInt *)attr)->value;
 			}
 			break;
 
@@ -210,7 +210,7 @@
 static FT_Bitmap * gdPangoCreateFTBitmap(int width, int height)
 {
 	FT_Bitmap *bitmap;
-	bitmap = g_malloc(sizeof(FT_Bitmap));
+	bitmap = (FT_Bitmap *)g_malloc(sizeof(FT_Bitmap));
 	gdPangoSetFTBitmap(bitmap, width, height);
 	bitmap->buffer = g_new0(guchar, bitmap->pitch * bitmap->rows);
 	return bitmap;
@@ -227,7 +227,7 @@
 {
 	if (bitmap->width != width || bitmap->rows != height) {
 		gdPangoSetFTBitmap(bitmap, width, height);
-		bitmap->buffer = g_realloc(bitmap->buffer, bitmap->pitch * bitmap->rows);
+		bitmap->buffer = (unsigned char *)g_realloc( bitmap->buffer, bitmap->pitch * bitmap->rows);
 	}
 	gdPangoCleanFTBitmap(bitmap);
 }
@@ -507,7 +507,7 @@
  */
 gdPangoContext* gdPangoCreateContext(void)
 {
-	gdPangoContext *context = g_malloc(sizeof(gdPangoContext));
+	gdPangoContext *context = (gdPangoContext *)g_malloc(sizeof(gdPangoContext));
 	G_CONST_RETURN char *charset;
 
 	context->font_map = pango_ft2_font_map_new();
@@ -822,7 +822,7 @@
 	int n, r = GD_FAILURE;
 
 	fcBlanks = FcBlanksCreate();
-	fcPattern = FcFreeTypeQuery(fontlist, 0, fcBlanks, &numFonts);
+	fcPattern = FcFreeTypeQuery((FcChar8 *)fontlist, 0, fcBlanks, &numFonts);
 	if (!fcPattern) {
 		if (error) *error = GD_PANGO_ERROR_FC_FT;
 		goto fail0;
@@ -838,7 +838,7 @@
 		if (error) *error = GD_PANGO_ERROR_FORMAT;
 		goto fail1;
 	}
-	font_desc = g_malloc(n + 1);
+	font_desc = (char *)g_malloc(n + 1);
 	n = snprintf(font_desc, n + 1, "%s %f", fcFamilyName.u.s, ptsize);
 	if (n <= 0) {
 		if (error) *error = GD_PANGO_ERROR_FORMAT;