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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-22 17:59:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-22 17:59:01 +0300
commit3b09e73e5801e33c8ccac6b524f5ca201f3be4eb (patch)
treec39808956343ace25bd798a7f2afd8d262c77ac1 /source
parentc6979aa0f4d2edb1bb24ea9cbdaa1e7477899cb8 (diff)
- bugfix (user supplied fix) [#20745] makesrna with rename error.
- error with last commit, length had an index arg.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/makesrna.c3
-rw-r--r--source/blender/makesrna/intern/rna_rna.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index f1f0510f7ec..fe9caf26e1b 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -51,12 +51,14 @@ static int replace_if_different(char *tmpfile)
{
#define REN_IF_DIFF \
+ remove(orgfile); \
if(rename(tmpfile, orgfile) != 0) { \
fprintf(stderr, "%s:%d, rename error: \"%s\" -> \"%s\"\n", __FILE__, __LINE__, tmpfile, orgfile); \
return -1; \
} \
remove(tmpfile); \
return 1; \
+/* end REN_IF_DIFF */
FILE *fp_new, *fp_org;
@@ -112,6 +114,7 @@ static int replace_if_different(char *tmpfile)
REN_IF_DIFF;
}
else {
+ remove(tmpfile);
return 0;
}
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index a2a6e7c361c..51f0fe62722 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -799,7 +799,7 @@ static void rna_BlenderRNA_structs_begin(CollectionPropertyIterator *iter, Point
}
/* optional, for faster lookups */
-static int rna_BlenderRNA_structs_length(PointerRNA *ptr, int index)
+static int rna_BlenderRNA_structs_length(PointerRNA *ptr)
{
return BLI_countlist(&((BlenderRNA*)ptr->data)->structs);
}