File: 03_fixgccwarnings.diff

package info (click to toggle)
python-gd 0.56%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 288 kB
  • sloc: ansic: 3,314; python: 278; makefile: 34
file content (61 lines) | stat: -rw-r--r-- 1,615 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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;