Description: Fix gcc warnings.
Forwarded: no
Author: Julián Moreno Patiño <darkjunix@gmail.com>
Last-Update: 2010-12-10
--- a/_gdmodule.c
+++ b/_gdmodule.c
@@ -149,7 +149,9 @@
 
 
 static PyObject *ErrorObject;
+#ifndef errno
 extern int errno;
+#endif
 
 /*
 ** Declarations for objects of type image
@@ -166,7 +168,7 @@
 
 
 // 2.0.22 replaces gdFontTinyRep with gdFontGetTiny, and so on
-typedef gdFontPtr (*ptrGetFontFunction)();
+typedef gdFontPtr (*ptrGetFontFunction)(void);
 typedef struct {
     char *name;
     ptrGetFontFunction func;
@@ -986,7 +988,7 @@
 static PyObject *image_string(imageobject *self, PyObject *args)
 {
     int x,y,font,color;
-    char *str;
+    unsigned char *str;
 
     if(!PyArg_ParseTuple(args, "i(ii)si", &font,&x,&y,&str,&color))
         return NULL;
@@ -1000,7 +1002,7 @@
 static PyObject *image_string16(imageobject *self, PyObject *args)
 {
     int x,y,font,color;
-    Py_UNICODE *ustr;
+    unsigned short *ustr; //Py_UNICODE *ustr;
 
     if(!PyArg_ParseTuple(args, "i(ii)ui", &font,&x,&y,&ustr,&color))
         return NULL;
@@ -1015,7 +1017,7 @@
 static PyObject *image_stringup(imageobject *self, PyObject *args)
 {
     int x,y,font,color;
-    char *str;
+    unsigned char *str;
 
     if(!PyArg_ParseTuple(args, "i(ii)si", &font,&x,&y,&str,&color))
         return NULL;
@@ -1029,7 +1031,7 @@
 static PyObject *image_stringup16(imageobject *self, PyObject *args)
 {
     int x,y,font,color;
-    Py_UNICODE *ustr;
+    unsigned short *ustr; //Py_UNICODE *ustr;
 
     if(!PyArg_ParseTuple(args, "i(ii)ui", &font,&x,&y,&ustr,&color))
         return NULL;
