diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-05 04:10:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-05 04:10:33 +0400 |
commit | dee2f0c9ac8312ff71241d86591adb8f9b06c53a (patch) | |
tree | 1a426dea9e0d943932d17ec65bdf6d632e9db106 | |
parent | 54363910bc0d6a0e066d2508b216b5ad698f9185 (diff) |
correction to previous warning cleanup, also quiet shadow-warning for thumbnail `size`
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 4 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/ImageRender.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/ImageViewport.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/VideoBase.h | 7 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/blendVideoTex.cpp | 5 |
5 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 51c6c2fc2d9..44358d8147e 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -285,8 +285,8 @@ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, Im /* exception, skip images over 100mb */ if (source == THB_SOURCE_IMAGE) { - const size_t size = BLI_file_size(path); - if (size != -1 && size > THUMB_SIZE_MAX) { + const size_t file_size = BLI_file_size(path); + if (file_size != -1 && file_size > THUMB_SIZE_MAX) { // printf("file too big: %d, skipping %s\n", (int)size, path); return NULL; } diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp index c5938b59e3e..d251f4f7bcb 100644 --- a/source/gameengine/VideoTexture/ImageRender.cpp +++ b/source/gameengine/VideoTexture/ImageRender.cpp @@ -398,7 +398,7 @@ static PyGetSetDef imageRenderGetSets[] = // define python type -static PyTypeObject ImageRenderType = { +PyTypeObject ImageRenderType = { PyVarObject_HEAD_INIT(NULL, 0) "VideoTexture.ImageRender", /*tp_name*/ sizeof(PyImage), /*tp_basicsize*/ @@ -732,7 +732,7 @@ ImageRender::ImageRender (KX_Scene *scene, KX_GameObject *observer, KX_GameObjec // define python type -static PyTypeObject ImageMirrorType = { +PyTypeObject ImageMirrorType = { PyVarObject_HEAD_INIT(NULL, 0) "VideoTexture.ImageMirror", /*tp_name*/ sizeof(PyImage), /*tp_basicsize*/ diff --git a/source/gameengine/VideoTexture/ImageViewport.cpp b/source/gameengine/VideoTexture/ImageViewport.cpp index 480a592930a..18095ea631d 100644 --- a/source/gameengine/VideoTexture/ImageViewport.cpp +++ b/source/gameengine/VideoTexture/ImageViewport.cpp @@ -358,7 +358,7 @@ static PyGetSetDef imageViewportGetSets[] = // define python type -static PyTypeObject ImageViewportType = { +PyTypeObject ImageViewportType = { PyVarObject_HEAD_INIT(NULL, 0) "VideoTexture.ImageViewport", /*tp_name*/ sizeof(PyImage), /*tp_basicsize*/ diff --git a/source/gameengine/VideoTexture/VideoBase.h b/source/gameengine/VideoTexture/VideoBase.h index 8d64980c9c2..51f025909fd 100644 --- a/source/gameengine/VideoTexture/VideoBase.h +++ b/source/gameengine/VideoTexture/VideoBase.h @@ -199,6 +199,9 @@ int Video_setRepeat(PyImage *self, PyObject *value, void *closure); PyObject *Video_getFrameRate(PyImage *self, void *closure); int Video_setFrameRate(PyImage *self, PyObject *value, void *closure); +/* py api */ +extern PyTypeObject ImageRenderType; +extern PyTypeObject ImageMirrorType; +extern PyTypeObject ImageViewportType; -#endif - +#endif /* __VIDEOBASE_H__ */ diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp index e23bd1a3231..ab6dca0958f 100644 --- a/source/gameengine/VideoTexture/blendVideoTex.cpp +++ b/source/gameengine/VideoTexture/blendVideoTex.cpp @@ -134,11 +134,6 @@ extern PyTypeObject FilterRGBA32Type; extern PyTypeObject FilterBGR24Type; extern PyTypeObject ImageBuffType; extern PyTypeObject ImageMixType; -extern PyTypeObject ImageRenderType; -extern PyTypeObject ImageMirrorType; -extern PyTypeObject ImageViewportType; -extern PyTypeObject ImageViewportType; - static void registerAllTypes(void) { |