- bugfix (user supplied fix) [#20745] makesrna with rename error.

- error with last commit, length had an index arg.
This commit is contained in:
Campbell Barton 2010-01-22 14:59:01 +00:00
parent c6979aa0f4
commit 3b09e73e58
3 changed files with 4 additions and 2 deletions

@ -70,7 +70,6 @@ def load_scripts(reload_scripts=False):
reload(module)
except:
traceback.print_exc()
return None
if reload_scripts:
# reload modules that may not be directly included

@ -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;
}

@ -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);
}