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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-25 16:55:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-25 16:55:14 +0400
commit71d1b09708f742ee084c498ae031a1c7da6d6328 (patch)
treeac303322eeec8dde4723658a72a96e4c6b996ba0 /source/blender/python
parent179ac9ebc0c47ca0f0f068a6258ec16ed787db4b (diff)
minor code cleanup
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_rna.c4
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c4
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.h4
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index bd660ae0001..4ae8e821298 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -369,7 +369,7 @@ static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item
static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, PointerRNA *ptr, PropertyRNA *prop,
Py_ssize_t start, Py_ssize_t stop, Py_ssize_t length);
-static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback);
+static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, const short order_fallback);
/* bpyrna vector/euler/quat callbacks */
static unsigned char mathutils_rna_array_cb_index = -1; /* index for our callbacks */
@@ -571,7 +571,7 @@ static Mathutils_Callback mathutils_rna_matrix_cb = {
NULL
};
-static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback)
+static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, const short order_fallback)
{
/* attempt to get order */
if (*prop_eul_order == NULL)
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 583831b1655..468ef3788c1 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -701,7 +701,7 @@ PyTypeObject euler_Type = {
* (i.e. it was allocated elsewhere by MEM_mallocN())
* pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON
* (i.e. it must be created here with PyMEM_malloc())*/
-PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *base_type)
+PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type)
{
EulerObject *self;
@@ -738,7 +738,7 @@ PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *
return (PyObject *)self;
}
-PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, short order,
+PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order,
unsigned char cb_type, unsigned char cb_subtype)
{
EulerObject *self = (EulerObject *)Euler_CreatePyObject(NULL, order, Py_NEW, NULL);
diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.h
index bcbc6c60ca7..e04d45e4630 100644
--- a/source/blender/python/mathutils/mathutils_Euler.h
+++ b/source/blender/python/mathutils/mathutils_Euler.h
@@ -48,8 +48,8 @@ typedef struct {
* blender (stored in blend_data). This is an either/or struct not both */
//prototypes
-PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *base_type);
-PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, short order,
+PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type);
+PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order,
unsigned char cb_type, unsigned char cb_subtype);
short euler_order_from_string(const char *str, const char *error_prefix);
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index d98c6e9d2fd..be519ded88e 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -995,7 +995,7 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args)
if (eul_compat) {
if (order == 1) mat3_to_compatible_eul(eul, eul_compatf, mat);
- else mat3_to_compatible_eulO(eul, eul_compatf, order, mat);
+ else mat3_to_compatible_eulO(eul, eul_compatf, order, mat);
}
else {
if (order == 1) mat3_to_eul(eul, mat);