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>2009-08-11 23:20:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-11 23:20:31 +0400
commitc77e556b23e8df10a829bdeebe86d718bd5e5ca6 (patch)
tree8e4d43480018f1bd84e2a8930b50072f590fe462
parentb2a77852ff99f1a8da8225239de68edc2aead6e2 (diff)
- missing a decref for new pytypes
- remove needless strlen
-rw-r--r--source/blender/blenkernel/intern/unit.c8
-rw-r--r--source/blender/python/intern/bpy_rna.c1
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 04b0530073e..87a21cc9798 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -37,7 +37,7 @@ typedef struct bUnitDef {
char *name_alt; /* alternative name */
double mul;
- double bias;
+ double bias; /* not used yet, needed for converting temperature */
} bUnitDef;
/* define a single unit */
@@ -175,6 +175,7 @@ static int unit_as_string(char *str, double value, int prec, bUnitCollection *us
return i;
}
+
/* Used for drawing number buttons, try keep fast */
void bUnit_AsString(char *str, double value, int prec, int system, int type, int split, int pad)
{
@@ -189,13 +190,12 @@ void bUnit_AsString(char *str, double value, int prec, int system, int type, int
/* check the 2 is a smaller unit */
if(unit_b > unit_a) {
- i= unit_as_string(str, value_a, prec, usys, unit_a, '\0');
- i= strlen(str);
+ i= unit_as_string(str, value_a, prec, usys, unit_a, '\0');
str[i++]= ',';
str[i++]= ' ';
/* use low precision since this is a smaller unit */
- unit_as_string(str+i, value_b, prec?1:0, usys, unit_b, '\0');
+ unit_as_string(str+i, value_b, prec?1:0, usys, unit_b, '\0');
return;
}
}
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 0edd5e8dbff..0c03b439e78 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -2371,6 +2371,7 @@ PyObject *pyrna_struct_CreatePyObject( PointerRNA *ptr )
if (tp) {
pyrna = (BPy_StructRNA *) tp->tp_alloc(tp, 0);
+ Py_DECREF(tp);
}
else {
fprintf(stderr, "Could not make type\n");