VideoTexture: Bug report #17946: add (char*) casting to fix compile error with Python...
authorBenoit Bolsee <benoit.bolsee@online.be>
Tue, 4 Nov 2008 09:21:27 +0000 (09:21 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Tue, 4 Nov 2008 09:21:27 +0000 (09:21 +0000)
source/gameengine/VideoTexture/FilterBlueScreen.cpp
source/gameengine/VideoTexture/FilterColor.cpp
source/gameengine/VideoTexture/FilterNormal.cpp
source/gameengine/VideoTexture/ImageBuff.cpp
source/gameengine/VideoTexture/ImageMix.cpp
source/gameengine/VideoTexture/ImageRender.cpp
source/gameengine/VideoTexture/ImageViewport.cpp
source/gameengine/VideoTexture/PyTypeList.cpp
source/gameengine/VideoTexture/Texture.cpp
source/gameengine/VideoTexture/VideoFFmpeg.cpp
source/gameengine/VideoTexture/blendVideoTex.cpp

index 50c3a87ffc41947298bd1d520f00b87bb1e89f34..43d7566102a550792825a5f6e330f0e247c4631b 100644 (file)
@@ -125,10 +125,10 @@ static int setLimits (PyFilter * self, PyObject * value, void * closure)
 // attributes structure
 static PyGetSetDef filterBSGetSets[] =
 { 
-       {"color", (getter)getColor, (setter)setColor, "blue screen color", NULL},
-       {"limits", (getter)getLimits, (setter)setLimits, "blue screen color limits", NULL},
+       {(char*)"color", (getter)getColor, (setter)setColor, (char*)"blue screen color", NULL},
+       {(char*)"limits", (getter)getLimits, (setter)setLimits, (char*)"blue screen color limits", NULL},
        // attributes from FilterBase class
-       {"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, "previous pixel filter", NULL},
+       {(char*)"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, (char*)"previous pixel filter", NULL},
        {NULL}
 };
 
index a1ddf581aef162577de7df08a4cb1939b9f2152c..eaf6e955003ea0c4703957afd003ff39704667d9 100644 (file)
@@ -34,7 +34,7 @@ http://www.gnu.org/copyleft/lesser.txt.
 // attributes structure
 static PyGetSetDef filterGrayGetSets[] =
 { // attributes from FilterBase class
-       {"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, "previous pixel filter", NULL},
+       {(char*)"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, (char*)"previous pixel filter", NULL},
        {NULL}
 };
 
@@ -164,9 +164,9 @@ static int setMatrix (PyFilter * self, PyObject * value, void * closure)
 // attributes structure
 static PyGetSetDef filterColorGetSets[] =
 { 
-       {"matrix", (getter)getMatrix, (setter)setMatrix, "matrix [4][5] for color calculation", NULL},
+       {(char*)"matrix", (getter)getMatrix, (setter)setMatrix, (char*)"matrix [4][5] for color calculation", NULL},
        // attributes from FilterBase class
-       {"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, "previous pixel filter", NULL},
+       {(char*)"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, (char*)"previous pixel filter", NULL},
        {NULL}
 };
 
@@ -298,9 +298,9 @@ static int setLevels (PyFilter * self, PyObject * value, void * closure)
 // attributes structure
 static PyGetSetDef filterLevelGetSets[] =
 { 
-       {"levels", (getter)getLevels, (setter)setLevels, "levels matrix [4] (min, max)", NULL},
+       {(char*)"levels", (getter)getLevels, (setter)setLevels, (char*)"levels matrix [4] (min, max)", NULL},
        // attributes from FilterBase class
-       {"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, "previous pixel filter", NULL},
+       {(char*)"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, (char*)"previous pixel filter", NULL},
        {NULL}
 };
 
index 514214bec8b61aa5fac6fc79ef77f3d3abdd4f44..736b9e3b9588e7fe4c4bc53b586104e1aa338459 100644 (file)
@@ -109,10 +109,10 @@ static int setDepth (PyFilter * self, PyObject * value, void * closure)
 // attributes structure
 static PyGetSetDef filterNormalGetSets[] =
 { 
-       {"colorIdx", (getter)getColor, (setter)setColor, "index of color used to calculate normal (0 - red, 1 - green, 2 - blue)", NULL},
-       {"depth", (getter)getDepth, (setter)setDepth, "depth of relief", NULL},
+       {(char*)"colorIdx", (getter)getColor, (setter)setColor, (char*)"index of color used to calculate normal (0 - red, 1 - green, 2 - blue)", NULL},
+       {(char*)"depth", (getter)getDepth, (setter)setDepth, (char*)"depth of relief", NULL},
        // attributes from FilterBase class
-       {"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, "previous pixel filter", NULL},
+       {(char*)"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, (char*)"previous pixel filter", NULL},
        {NULL}
 };
 
index a0c6e1f6f744561886cc9c77cf0439bf24fa0d9e..a22757dca399be8a6579139f3e3aaa0cfc4309bb 100644 (file)
@@ -111,11 +111,11 @@ static PyMethodDef imageBuffMethods[] =
 // attributes structure
 static PyGetSetDef imageBuffGetSets[] =
 {      // attributes from ImageBase class
-       {"image", (getter)Image_getImage, NULL, "image data", NULL},
-       {"size", (getter)Image_getSize, NULL, "image size", NULL},
-       {"scale", (getter)Image_getScale, (setter)Image_setScale, "fast scale of image (near neighbour)", NULL},
-       {"flip", (getter)Image_getFlip, (setter)Image_setFlip, "flip image vertically", NULL},
-       {"filter", (getter)Image_getFilter, (setter)Image_setFilter, "pixel filter", NULL},
+       {(char*)"image", (getter)Image_getImage, NULL, (char*)"image data", NULL},
+       {(char*)"size", (getter)Image_getSize, NULL, (char*)"image size", NULL},
+       {(char*)"scale", (getter)Image_getScale, (setter)Image_setScale, (char*)"fast scale of image (near neighbour)", NULL},
+       {(char*)"flip", (getter)Image_getFlip, (setter)Image_setFlip, (char*)"flip image vertically", NULL},
+       {(char*)"filter", (getter)Image_getFilter, (setter)Image_setFilter, (char*)"pixel filter", NULL},
        {NULL}
 };
 
index 8532249f7d86e93aed4d5896a40969d8c81841f7..b07b362818cf968511a9062c280bdb4af18331af 100644 (file)
@@ -150,11 +150,11 @@ static PyMethodDef imageMixMethods[] =
 // attributes structure
 static PyGetSetDef imageMixGetSets[] =
 { // attributes from ImageBase class
-       {"image", (getter)Image_getImage, NULL, "image data", NULL},
-       {"size", (getter)Image_getSize, NULL, "image size", NULL},
-       {"scale", (getter)Image_getScale, (setter)Image_setScale, "fast scale of image (near neighbour)", NULL},
-       {"flip", (getter)Image_getFlip, (setter)Image_setFlip, "flip image vertically", NULL},
-       {"filter", (getter)Image_getFilter, (setter)Image_setFilter, "pixel filter", NULL},
+       {(char*)"image", (getter)Image_getImage, NULL, (char*)"image data", NULL},
+       {(char*)"size", (getter)Image_getSize, NULL, (char*)"image size", NULL},
+       {(char*)"scale", (getter)Image_getScale, (setter)Image_setScale, (char*)"fast scale of image (near neighbour)", NULL},
+       {(char*)"flip", (getter)Image_getFlip, (setter)Image_setFlip, (char*)"flip image vertically", NULL},
+       {(char*)"filter", (getter)Image_getFilter, (setter)Image_setFilter, (char*)"pixel filter", NULL},
        {NULL}
 };
 
index fb284261d705da8bdff27d66eb2b134e7a5a7704..2f2d9debd48451ba51506a04ff42ddcf965d9ee5 100644 (file)
@@ -207,13 +207,13 @@ static PyMethodDef imageRenderMethods[] =
 // attributes structure
 static PyGetSetDef imageRenderGetSets[] =
 { 
-       {"background", (getter)getBackground, (setter)setBackground, "background color", NULL},
+       {(char*)"background", (getter)getBackground, (setter)setBackground, (char*)"background color", NULL},
        // attributes from ImageBase class
-       {"image", (getter)Image_getImage, NULL, "image data", NULL},
-       {"size", (getter)Image_getSize, NULL, "image size", NULL},
-       {"scale", (getter)Image_getScale, (setter)Image_setScale, "fast scale of image (near neighbour)",       NULL},
-       {"flip", (getter)Image_getFlip, (setter)Image_setFlip, "flip image vertically", NULL},
-       {"filter", (getter)Image_getFilter, (setter)Image_setFilter, "pixel filter", NULL},
+       {(char*)"image", (getter)Image_getImage, NULL, (char*)"image data", NULL},
+       {(char*)"size", (getter)Image_getSize, NULL, (char*)"image size", NULL},
+       {(char*)"scale", (getter)Image_getScale, (setter)Image_setScale, (char*)"fast scale of image (near neighbour)", NULL},
+       {(char*)"flip", (getter)Image_getFlip, (setter)Image_setFlip, (char*)"flip image vertically", NULL},
+       {(char*)"filter", (getter)Image_getFilter, (setter)Image_setFilter, (char*)"pixel filter", NULL},
        {NULL}
 };
 
index 4ed1cd9e80132011ee9ca9559c700fd3d5dcd73f..6bee9fd66246f432098c474aa65465169b819a02 100644 (file)
@@ -239,15 +239,15 @@ static PyMethodDef imageViewportMethods[] =
 // attributes structure
 static PyGetSetDef imageViewportGetSets[] =
 { 
-       {"whole", (getter)ImageViewport_getWhole, (setter)ImageViewport_setWhole, "use whole viewport to capture", NULL},
-       {"position", (getter)ImageViewport_getPosition, (setter)ImageViewport_setPosition, "upper left corner of captured area", NULL},
-       {"capsize", (getter)ImageViewport_getCaptureSize, (setter)ImageViewport_setCaptureSize, "size of viewport area being captured", NULL},
+       {(char*)"whole", (getter)ImageViewport_getWhole, (setter)ImageViewport_setWhole, (char*)"use whole viewport to capture", NULL},
+       {(char*)"position", (getter)ImageViewport_getPosition, (setter)ImageViewport_setPosition, (char*)"upper left corner of captured area", NULL},
+       {(char*)"capsize", (getter)ImageViewport_getCaptureSize, (setter)ImageViewport_setCaptureSize, (char*)"size of viewport area being captured", NULL},
        // attributes from ImageBase class
-       {"image", (getter)Image_getImage, NULL, "image data", NULL},
-       {"size", (getter)Image_getSize, NULL, "image size", NULL},
-       {"scale", (getter)Image_getScale, (setter)Image_setScale, "fast scale of image (near neighbour)", NULL},
-       {"flip", (getter)Image_getFlip, (setter)Image_setFlip, "flip image vertically", NULL},
-       {"filter", (getter)Image_getFilter, (setter)Image_setFilter, "pixel filter", NULL},
+       {(char*)"image", (getter)Image_getImage, NULL, (char*)"image data", NULL},
+       {(char*)"size", (getter)Image_getSize, NULL, (char*)"image size", NULL},
+       {(char*)"scale", (getter)Image_getScale, (setter)Image_setScale, (char*)"fast scale of image (near neighbour)", NULL},
+       {(char*)"flip", (getter)Image_getFlip, (setter)Image_setFlip, (char*)"flip image vertically", NULL},
+       {(char*)"filter", (getter)Image_getFilter, (setter)Image_setFilter, (char*)"pixel filter", NULL},
        {NULL}
 };
 
index 0451d74c8add9f9835d884fe048c81998408421e..6d2676dce09b139c8e6aeb1d741fc57e21ce3a96 100644 (file)
@@ -78,6 +78,6 @@ void PyTypeList::reg (PyObject * module)
                        // increase ref count
                        Py_INCREF((*it)->getType());
                        // add type to module
-                       PyModule_AddObject(module, (*it)->getName(), (PyObject*)(*it)->getType());
+                       PyModule_AddObject(module, (char*)(*it)->getName(), (PyObject*)(*it)->getType());
                }
 }
index ceda39aeff44917c33f31055aa1f594f5824dc99..e922bbd768de061270005ba588b475768e924bcc 100644 (file)
@@ -412,8 +412,8 @@ static PyMethodDef textureMethods[] =
 // class Texture attributes
 static PyGetSetDef textureGetSets[] =
 { 
-       {"source", (getter)Texture_getSource, (setter)Texture_setSource, "source of texture", NULL},
-       {"mipmap", (getter)Texture_getMipmap, (setter)Texture_setMipmap, "mipmap texture", NULL},
+       {(char*)"source", (getter)Texture_getSource, (setter)Texture_setSource, (char*)"source of texture", NULL},
+       {(char*)"mipmap", (getter)Texture_getMipmap, (setter)Texture_setMipmap, (char*)"mipmap texture", NULL},
        {NULL}
 };
 
index 2af7228a1922a9773f82bfbd2a1e05b5f12503bb..b97c4d670c4421324a62fa4a1f3d164695d8cdc5 100644 (file)
@@ -692,18 +692,18 @@ static PyMethodDef videoMethods[] =
 // attributes structure
 static PyGetSetDef videoGetSets[] =
 { // methods from VideoBase class
-       {"status", (getter)Video_getStatus, NULL, "video status", NULL},
-       {"range", (getter)Video_getRange, (setter)Video_setRange, "replay range", NULL},
-       {"repeat", (getter)Video_getRepeat, (setter)Video_setRepeat, "repeat count, -1 for infinite repeat", NULL},
-       {"framerate", (getter)Video_getFrameRate, (setter)Video_setFrameRate, "frame rate", NULL},
+       {(char*)"status", (getter)Video_getStatus, NULL, (char*)"video status", NULL},
+       {(char*)"range", (getter)Video_getRange, (setter)Video_setRange, (char*)"replay range", NULL},
+       {(char*)"repeat", (getter)Video_getRepeat, (setter)Video_setRepeat, (char*)"repeat count, -1 for infinite repeat", NULL},
+       {(char*)"framerate", (getter)Video_getFrameRate, (setter)Video_setFrameRate, (char*)"frame rate", NULL},
        // attributes from ImageBase class
-       {"image", (getter)Image_getImage, NULL, "image data", NULL},
-       {"size", (getter)Image_getSize, NULL, "image size", NULL},
-       {"scale", (getter)Image_getScale, (setter)Image_setScale, "fast scale of image (near neighbour)", NULL},
-       {"flip", (getter)Image_getFlip, (setter)Image_setFlip, "flip image vertically", NULL},
-       {"filter", (getter)Image_getFilter, (setter)Image_setFilter, "pixel filter", NULL},
-       {"preseek", (getter)VideoFFmpeg_getPreseek, (setter)VideoFFmpeg_setPreseek, "nb of frames of preseek", NULL},
-       {"deinterlace", (getter)VideoFFmpeg_getDeinterlace, (setter)VideoFFmpeg_setDeinterlace, "deinterlace image", NULL},
+       {(char*)"image", (getter)Image_getImage, NULL, (char*)"image data", NULL},
+       {(char*)"size", (getter)Image_getSize, NULL, (char*)"image size", NULL},
+       {(char*)"scale", (getter)Image_getScale, (setter)Image_setScale, (char*)"fast scale of image (near neighbour)", NULL},
+       {(char*)"flip", (getter)Image_getFlip, (setter)Image_setFlip, (char*)"flip image vertically", NULL},
+       {(char*)"filter", (getter)Image_getFilter, (setter)Image_setFilter, (char*)"pixel filter", NULL},
+       {(char*)"preseek", (getter)VideoFFmpeg_getPreseek, (setter)VideoFFmpeg_setPreseek, (char*)"nb of frames of preseek", NULL},
+       {(char*)"deinterlace", (getter)VideoFFmpeg_getDeinterlace, (setter)VideoFFmpeg_setDeinterlace, (char*)"deinterlace image", NULL},
        {NULL}
 };
 
index 629b589c0e6b07836afec290908b36da33d22b60..f206e2f71b475582dd1a3571994ce43c55098549 100644 (file)
@@ -180,7 +180,7 @@ PyObject* initVideoTexture(void)
        pyFilterTypes.reg(m);
 
        Py_INCREF(&TextureType);
-       PyModule_AddObject(m, "Texture", (PyObject*)&TextureType);
+       PyModule_AddObject(m, (char*)"Texture", (PyObject*)&TextureType);
 
        // init last error description
        Exception::m_lastError[0] = '\0';