* Compile fix for RNA + makefiles.

* Fix for bug in collection string lookup function.
This commit is contained in:
Brecht Van Lommel 2008-11-11 18:28:00 +00:00
parent 4a4b0732e5
commit 44f94f7927
2 changed files with 8 additions and 8 deletions

@ -61,7 +61,7 @@ clean::
# is done quite intentionally. If there is a bug in that lib, it needs
# to be fixed by the module maintainer.
RNAOBJS = $(filter-out %RNA.o, $(OBJS))
RNAOBJS = $(filter-out %rna_dependency.o, $(filter-out %rna_access.o, $(filter-out %RNA.o, $(OBJS))))
$(DIR)/$(DEBUG_DIR)makesrna: $(RNAOBJS) $(DIR)/$(DEBUG_DIR)makesrna.o $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
$(CC) $(LDFLAGS) -o $@ $(WINLIBS) $^

@ -27,14 +27,14 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "RNA_access.h"
#include "RNA_types.h"
#include "rna_internal.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
/* Pointer */
void RNA_pointer_main_get(struct Main *main, struct PointerRNA *r_ptr)
@ -374,7 +374,7 @@ int RNA_property_collection_lookup_string(PropertyRNA *prop, PointerRNA *ptr, co
else {
/* no callback defined, compare with name properties if they exist */
CollectionPropertyIterator iter;
PropertyRNA *prop;
PropertyRNA *nameprop;
PointerRNA iterptr;
char name[256], *nameptr;
int length, alloc, found= 0;
@ -384,9 +384,9 @@ int RNA_property_collection_lookup_string(PropertyRNA *prop, PointerRNA *ptr, co
RNA_property_collection_get(prop, &iter, &iterptr);
if(iterptr.data && iterptr.type->nameproperty) {
prop= iterptr.type->nameproperty;
nameprop= iterptr.type->nameproperty;
length= RNA_property_string_length(prop, &iterptr);
length= RNA_property_string_length(nameprop, &iterptr);
if(sizeof(name)-1 < length) {
nameptr= name;
@ -397,7 +397,7 @@ int RNA_property_collection_lookup_string(PropertyRNA *prop, PointerRNA *ptr, co
alloc= 1;
}
RNA_property_string_get(prop, &iterptr, nameptr);
RNA_property_string_get(nameprop, &iterptr, nameptr);
if(strcmp(nameptr, key) == 0) {
*r_ptr= iterptr;