diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-03 20:58:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-03 20:58:06 +0300 |
commit | 709c727c510a85426b87a9a2fb7fb8517fef7de9 (patch) | |
tree | c4664d4773eb77cbf38ee264e9189a6557a310c4 /source/blender/makesrna | |
parent | 3326c0ca7523f5596a8ff96cb90a54b92e50ac5f (diff) |
replace 0 with NULL when used as a pointer
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nla.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 8 |
12 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index e4830494931..ae62ef55c01 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -363,7 +363,7 @@ static void rna_def_ID_properties(BlenderRNA *brna) prop= RNA_def_property(srna, "idp_array", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "PropertyGroup"); - RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_IDPArray_length", 0, 0); + RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_IDPArray_length", NULL, NULL); RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY); // never tested, maybe its useful to have this? diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index c422d787e16..17dc775787e 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -62,7 +62,7 @@ #include "rna_internal.h" -const PointerRNA PointerRNA_NULL= {{0}}; +const PointerRNA PointerRNA_NULL= {{NULL}}; /* Init/Exit */ @@ -110,7 +110,7 @@ void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr) StructRNA *type, *idtype= NULL; if(id) { - PointerRNA tmp= {{0}}; + PointerRNA tmp= {{NULL}}; tmp.data= id; idtype= rna_ID_refine(&tmp); @@ -3761,7 +3761,7 @@ char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, in } else { printf("RNA_string_get_alloc: %s.%s not found.\n", ptr->type->identifier, name); - return 0; + return NULL; } } diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index d80e2c0c465..b690a4f419a 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -169,9 +169,9 @@ static void rna_KeyingSetInfo_unregister(const bContext *C, StructRNA *type) static StructRNA *rna_KeyingSetInfo_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { - KeyingSetInfo dummyksi = {0}; + KeyingSetInfo dummyksi = {NULL}; KeyingSetInfo *ksi; - PointerRNA dummyptr = {{0}}; + PointerRNA dummyptr = {{NULL}}; int have_function[3]; /* setup dummy type info to store static properties in */ diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index f30c130469a..c32681c2826 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -49,7 +49,7 @@ /* Global used during defining */ -BlenderDefRNA DefRNA = {0, {0, 0}, {0, 0}, 0, 0, 0, 0, 1}; +BlenderDefRNA DefRNA = {NULL, {NULL, NULL}, {NULL, NULL}, NULL, 0, 0, 0, 1}; /* Duplicated code since we can't link in blenkernel or blenlib */ @@ -66,7 +66,7 @@ void rna_addtail(ListBase *listbase, void *vlink) link->prev = listbase->last; if (listbase->last) ((Link *)listbase->last)->next = link; - if (listbase->first == 0) listbase->first = link; + if (listbase->first == NULL) listbase->first = link; listbase->last = link; } @@ -659,7 +659,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char * if(DefRNA.preprocess) { RNA_def_property_struct_type(prop, "Property"); - RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", 0, 0, "rna_builtin_properties_lookup_string"); + RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", NULL, NULL, "rna_builtin_properties_lookup_string"); } else { #ifdef RNA_RUNTIME diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 7aca187acbf..a921bbbafad 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -296,7 +296,7 @@ static NlaStrip *rna_NlaStrip_new(NlaTrack *track, bContext *C, ReportList *repo * - only the nla_tracks list is needed there, which we aim to reverse engineer here... */ { - AnimData adt = {0}; + AnimData adt = {NULL}; NlaTrack *nlt, *nlt_p; /* 'first' NLA track is found by going back up chain of given track's parents until we fall off */ diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index eca06f87672..cd3796af435 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -377,7 +377,7 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], float ray_end[3], float r_location[3], float r_normal[3], int *index) { - BVHTreeFromMesh treeData= {0}; + BVHTreeFromMesh treeData= {NULL}; if(ob->derivedFinal==NULL) { BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for ray casting.", ob->id.name+2); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 817a59eb839..7453ca20c7d 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -477,12 +477,12 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr) if(part->pd->forcefield != PFIELD_TEXTURE && part->pd->tex) { part->pd->tex->id.us--; - part->pd->tex= 0; + part->pd->tex= NULL; } if(part->pd2->forcefield != PFIELD_TEXTURE && part->pd2->tex) { part->pd2->tex->id.us--; - part->pd2->tex= 0; + part->pd2->tex= NULL; } DAG_id_tag_update(&part->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME|PSYS_RECALC_RESET); @@ -494,7 +494,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr) if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) { ob->pd->tex->id.us--; - ob->pd->tex= 0; + ob->pd->tex= NULL; } DAG_id_tag_update(&ob->id, OB_RECALC_OB); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 670857c7d9a..658e1dc3b80 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -1211,7 +1211,7 @@ static void rna_def_pose(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "chanbase", NULL); RNA_def_property_struct_type(prop, "PoseBone"); RNA_def_property_ui_text(prop, "Pose Bones", "Individual pose bones for the armature"); - RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, "rna_PoseBones_lookup_string"); /* can be removed, only for fast lookup */ + RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_PoseBones_lookup_string"); /* can be removed, only for fast lookup */ /* bone groups */ prop= RNA_def_property(srna, "bone_groups", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "agroups", NULL); diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 5a3903a290d..49b28579ee1 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -115,8 +115,8 @@ static void rna_RenderEngine_unregister(const bContext *C, StructRNA *type) static StructRNA *rna_RenderEngine_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { - RenderEngineType *et, dummyet = {0}; - RenderEngine dummyengine= {0}; + RenderEngineType *et, dummyet = {NULL}; + RenderEngine dummyengine= {NULL}; PointerRNA dummyptr; int have_function[1]; diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index aabf38bd2ce..203a399ea6c 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -310,7 +310,7 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point { StructRNA *srna; PropertyRNA *prop; - PointerRNA propptr= {{0}}; + PointerRNA propptr= {{NULL}}; srna= ptr->type; diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index ee832d34bf7..d48c1d35c13 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -171,8 +171,8 @@ static void rna_Panel_unregister(const bContext *C, StructRNA *type) static StructRNA *rna_Panel_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { ARegionType *art; - PanelType *pt, dummypt = {0}; - Panel dummypanel= {0}; + PanelType *pt, dummypt = {NULL}; + Panel dummypanel= {NULL}; PointerRNA dummyptr; int have_function[3]; @@ -286,8 +286,8 @@ static void rna_Header_unregister(const bContext *C, StructRNA *type) static StructRNA *rna_Header_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { ARegionType *art; - HeaderType *ht, dummyht = {0}; - Header dummyheader= {0}; + HeaderType *ht, dummyht = {NULL}; + Header dummyheader= {NULL}; PointerRNA dummyhtr; int have_function[1]; @@ -404,8 +404,8 @@ static void rna_Menu_unregister(const bContext *C, StructRNA *type) static StructRNA *rna_Menu_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { - MenuType *mt, dummymt = {0}; - Menu dummymenu= {0}; + MenuType *mt, dummymt = {NULL}; + Menu dummymenu= {NULL}; PointerRNA dummymtr; int have_function[2]; diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 40d1996d8ce..631af91a5bf 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -836,8 +836,8 @@ static char _operator_name[OP_MAX_TYPENAME]; static char _operator_descr[1024]; static StructRNA *rna_Operator_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { - wmOperatorType dummyot = {0}; - wmOperator dummyop= {0}; + wmOperatorType dummyot = {NULL}; + wmOperator dummyop= {NULL}; PointerRNA dummyotr; int have_function[6]; @@ -939,8 +939,8 @@ static StructRNA *rna_Operator_register(bContext *C, ReportList *reports, void * static StructRNA *rna_MacroOperator_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { - wmOperatorType dummyot = {0}; - wmOperator dummyop= {0}; + wmOperatorType dummyot = {NULL}; + wmOperator dummyop= {NULL}; PointerRNA dummyotr; int have_function[4]; |