Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-12-09 02:24:41 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-12-09 02:24:41 +0400
commit3c4987f98378d44eda133311c65aa19412e4cd38 (patch)
tree4371b4117d3290e60a58190481e926ebb17fcf28 /source/blender/freestyle/intern/python
parentec33687d6cf74775e37fdc1a14e22dea08289cb1 (diff)
Fix for a number of compiler warnings as well as a bug hidden by the warnings.
Patch contribution by Bastien Montagne, thanks!
Diffstat (limited to 'source/blender/freestyle/intern/python')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.cpp4
-rw-r--r--source/blender/freestyle/intern/python/Director.cpp18
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp14
5 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp
index 9254badd95d..8f8336f6c17 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Id.cpp
@@ -55,9 +55,9 @@ static char Id___doc__[] =
static int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds)
{
int first = 0, second = 0;
- static char *kwlist[] = {"first", "second", NULL};
+ static const char *kwlist[] = {"first", "second", NULL};
- if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist, &first, &second) )
+ if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", (char**)kwlist, &first, &second) )
return -1;
self->id = new Id( first, second );
diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp
index 1948da2b6b0..7471edea07c 100644
--- a/source/blender/freestyle/intern/python/Director.cpp
+++ b/source/blender/freestyle/intern/python/Director.cpp
@@ -50,7 +50,7 @@ int Director_BPy_BinaryPredicate0D___call__( BinaryPredicate0D *bp0D, Interface0
Py_XDECREF(arg2);
return -1;
}
- PyObject *result = PyObject_CallMethod( bp0D->py_bp0D, "__call__", "OO", arg1, arg2 );
+ PyObject *result = PyObject_CallMethod( bp0D->py_bp0D, (char*)"__call__", (char*)"OO", arg1, arg2 );
Py_DECREF(arg1);
Py_DECREF(arg2);
if (!result)
@@ -77,7 +77,7 @@ int Director_BPy_BinaryPredicate1D___call__( BinaryPredicate1D *bp1D, Interface1
Py_XDECREF(arg2);
return -1;
}
- PyObject *result = PyObject_CallMethod( bp1D->py_bp1D, "__call__", "OO", arg1, arg2 );
+ PyObject *result = PyObject_CallMethod( bp1D->py_bp1D, (char*)"__call__", (char*)"OO", arg1, arg2 );
Py_DECREF(arg1);
Py_DECREF(arg2);
if (!result)
@@ -100,7 +100,7 @@ int Director_BPy_UnaryPredicate0D___call__( UnaryPredicate0D *up0D, Interface0DI
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( up0D->py_up0D, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( up0D->py_up0D, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -122,7 +122,7 @@ int Director_BPy_UnaryPredicate1D___call__( UnaryPredicate1D *up1D, Interface1D&
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( up1D->py_up1D, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( up1D->py_up1D, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -144,7 +144,7 @@ int Director_BPy_StrokeShader_shade( StrokeShader *ss, Stroke& s ) {
PyObject *arg = BPy_Stroke_from_Stroke(s);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( ss->py_ss, "shade", "O", arg );
+ PyObject *result = PyObject_CallMethod( ss->py_ss, (char*)"shade", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -158,7 +158,7 @@ int Director_BPy_ChainingIterator_init( ChainingIterator *c_it ) {
PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_c_it) not initialized");
return -1;
}
- PyObject *result = PyObject_CallMethod( c_it->py_c_it, "init", "");
+ PyObject *result = PyObject_CallMethod( c_it->py_c_it, (char*)"init", NULL);
if (!result)
return -1;
Py_DECREF(result);
@@ -173,7 +173,7 @@ int Director_BPy_ChainingIterator_traverse( ChainingIterator *c_it, AdjacencyIte
PyObject *arg = BPy_AdjacencyIterator_from_AdjacencyIterator(a_it);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( c_it->py_c_it, "traverse", "O", arg );
+ PyObject *result = PyObject_CallMethod( c_it->py_c_it, (char*)"traverse", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -201,7 +201,7 @@ int Director_BPy_UnaryFunction0D___call__( void *uf0D, PyObject *obj, Interface0
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( obj, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( obj, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -261,7 +261,7 @@ int Director_BPy_UnaryFunction1D___call__( void *uf1D, PyObject *obj, Interface1
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( obj, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( obj, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index c85134f71d5..343e65e9fe6 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -37,7 +37,7 @@ static char Chain___doc__[] =
" :arg id: An Id object.\n"
" :type id: :class:`Id`\n";
-int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds)
+static int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds)
{
PyObject *obj = 0;
@@ -77,7 +77,7 @@ static char Chain_push_viewedge_back___doc__[] =
" processed.\n"
" :type orientation: bool\n";
-PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) {
+static PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) {
PyObject *obj1 = 0, *obj2 = 0;
if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) ))
@@ -101,7 +101,7 @@ static char Chain_push_viewedge_front___doc__[] =
" processed.\n"
" :type orientation: bool\n";
-PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) {
+static PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) {
PyObject *obj1 = 0, *obj2 = 0;
if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) ))
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index d1a8fbef6b9..f66d95b3a39 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -68,7 +68,7 @@ static char CurvePointIterator_t___doc__[] =
" :return: The curvilinear abscissa.\n"
" :rtype: float\n";
-PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) {
+static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) {
return PyFloat_FromDouble( self->cp_it->t() );
}
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
index 67a7955f0d5..6d50a1ed437 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
@@ -52,7 +52,7 @@ static char UnaryFunction1DVec3f___doc__[] =
" :arg integration: An integration method.\n"
" :type integration: :class:`IntegrationType`\n";
-int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args)
+static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args)
{
PyObject *obj = 0;
@@ -69,7 +69,7 @@ int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args
return 0;
}
-void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
+static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
{
if (self->uf1D_vec3f)
delete self->uf1D_vec3f;
@@ -77,7 +77,7 @@ void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
}
-PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self)
+static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self)
{
return PyUnicode_FromFormat("type: %s - address: %p", self->uf1D_vec3f->getName().c_str(), self->uf1D_vec3f );
}
@@ -90,12 +90,12 @@ static char UnaryFunction1DVec3f_getName___doc__[] =
" :return: The name of the unary 1D function.\n"
" :rtype: str\n";
-PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self )
+static PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self )
{
return PyUnicode_FromString( self->uf1D_vec3f->getName().c_str() );
}
-PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
{
PyObject *obj;
@@ -129,7 +129,7 @@ static char UnaryFunction1DVec3f_setIntegrationType___doc__[] =
" :arg integration: An integration method.\n"
" :type integration: :class:`IntegrationType`\n";
-PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args)
+static PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args)
{
PyObject *obj;
@@ -148,7 +148,7 @@ static char UnaryFunction1DVec3f_getIntegrationType___doc__[] =
" :return: The integration method.\n"
" :rtype: :class:`IntegrationType`\n";
-PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self) {
+static PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self) {
return BPy_IntegrationType_from_IntegrationType( self->uf1D_vec3f->getIntegrationType() );
}