Package: mgltools-opengltk / 1.5.6~rc3~cvs.20120601-2

opengl.patch Patch series | 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Author: Steffen Moeller <steffen_moeller@gmx.de>
Description: Enable proper usage of OpenGL function
 It seems like some platform specific size specifications in
 Swig wrappers have caused some issue. The patch below we
 have locally tested to solve the issue for us and now we wait
 for a confirmation by upstream.
Bugs-Closed: http://bugs.debian.org/693653

--- a/opengltk/extent/dejavu.i
+++ b/opengltk/extent/dejavu.i
@@ -3222,7 +3222,7 @@ void solidCylinder ( GLdouble radiusBase
 
 %typemap(in) const float *coords
 {
-  long buffer_len;
+  Py_ssize_t buffer_len;
   if (PyObject_AsWriteBuffer( $input, (void**)&$1, &buffer_len))
     return NULL;
   if (! $1) return PyErr_Format( PyExc_ValueError,
--- a/opengltk/extent/glArrayTypemap.i
+++ b/opengltk/extent/glArrayTypemap.i
@@ -107,7 +107,7 @@ extern int checkArgumentsInCWrapper=1;
   {
     if (isContiguosBuffer((PyObject*)$input))
     { 
-      int buffer_len;
+      Py_ssize_t buffer_len;
       array = NULL;
       if (PyObject_AsReadBuffer( $input, (const void**)&$1, &buffer_len))
         return NULL;
@@ -124,7 +124,7 @@ extern int checkArgumentsInCWrapper=1;
   }
   else
   {
-    int buffer_len;
+    Py_ssize_t buffer_len;
     array = NULL;
     if (PyObject_AsReadBuffer( $input, (const void**)&$1, &buffer_len))
       return NULL;
@@ -153,7 +153,7 @@ extern int checkArgumentsInCWrapper=1;
   {
     if (isContiguosBuffer((PyObject*)$input))
     { 
-      int buffer_len;
+      Py_ssize_t buffer_len;
       array = NULL;
       if (PyObject_AsReadBuffer( $input, (const void**)&$1, &buffer_len))
         return NULL;
@@ -173,7 +173,7 @@ extern int checkArgumentsInCWrapper=1;
   }
   else
   {
-    int buffer_len;
+    Py_ssize_t buffer_len;
     array = NULL;
     if (PyObject_AsReadBuffer( $input, (const void**)&$1, &buffer_len))
       return NULL;
@@ -202,7 +202,7 @@ void gluPickMatrix( GLdouble x, GLdouble
   {
     if (isContiguosBuffer((PyObject*)$input))
     { 
-      int buffer_len;
+      Py_ssize_t buffer_len;
       array = NULL;
       if (PyObject_AsReadBuffer( $input, (const void**)&$1, &buffer_len))
         return NULL;
@@ -222,7 +222,7 @@ void gluPickMatrix( GLdouble x, GLdouble
   }
   else
   {
-    int buffer_len;
+    Py_ssize_t buffer_len;
     array = NULL;
     if (PyObject_AsReadBuffer( $input, (const void**)&$1, &buffer_len))
       return NULL;
--- a/opengltk/extent/gltypemap.i
+++ b/opengltk/extent/gltypemap.i
@@ -63,7 +63,7 @@
   GLvoid*,
   GLint[ANY]
 {
-  long buffer_len;
+  Py_ssize_t buffer_len;
   if (PyObject_AsWriteBuffer( $input, (void**)&$1, &buffer_len))
     return NULL;
   if (! $1) return PyErr_Format( PyExc_ValueError,