- use static vars and functions where possible.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 28 Aug 2011 05:06:30 +0000 (05:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 28 Aug 2011 05:06:30 +0000 (05:06 +0000)
- use NULL rather than 0 when used as pointers.

28 files changed:
intern/guardedalloc/intern/mallocn.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/callbacks.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_texture.c
source/blender/python/intern/bpy_intern_string.c
source/blender/python/intern/bpy_props.c
source/blender/render/intern/source/pointdensity.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_keymap.c

index 55340d6011d9ea73954140761c6cc42c4b2c2361..2421c25398af99f4ce6cc300f03489b8ac94417f 100644 (file)
@@ -429,7 +429,7 @@ static int compare_len(const void *p1, const void *p2)
                return -1;
 }
 
-void MEM_printmemlist_stats()
+void MEM_printmemlist_stats(void)
 {
        MemHead *membl;
        MemPrintBlock *pb, *printblock;
index 9c455e84109dacbdc9cbf5026fa3267b00a3fca8..296159861919b71dd2904e8defa9c1ed716437fc 100644 (file)
@@ -515,7 +515,7 @@ short *give_totcolp_id(ID *id)
        return NULL;
 }
 
-void data_delete_material_index_id(ID *id, int index)
+static void data_delete_material_index_id(ID *id, int index)
 {
        switch(GS(id->name)) {
        case ID_ME:
@@ -1365,7 +1365,7 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
 }
 
 /* copy/paste buffer, if we had a propper py api that would be better */
-Material matcopybuf;
+static Material matcopybuf;
 static short matcopied= 0;
 
 void clear_matcopybuf(void)
index cf95692c8b4fe3a18407bd5a0e07af0054d6b60c..8b50ad2b04249a95426fbe80e86e008d78826fbc 100644 (file)
@@ -2873,7 +2873,7 @@ static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq,
 {
        Editing * ed;
        ListBase * seqbasep;
-       struct ImBuf * i = 0;
+       struct ImBuf * i= NULL;
 
        ed = context.scene->ed;
 
@@ -2908,7 +2908,7 @@ static struct ImBuf * do_adjustment(
        struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2), 
        struct ImBuf *UNUSED(ibuf3))
 {
-       struct ImBuf * i = 0;
+       struct ImBuf * i = NULL;
        struct ImBuf * out;
        Editing * ed;
 
index bfee350037ae898e06c2fc639ed6a09543f877ca..03e3b7ab5602cab7ec60c619c64bac6326562a8b 100644 (file)
@@ -40,7 +40,7 @@
 #include "BLO_sys_types.h" // for intptr_t support
 /***/
 
-unsigned int hashsizes[]= {
+static unsigned int hashsizes[]= {
        5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 
        16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169, 
        4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 
index a033e01696d16b1cabf650bea6abca7e789389ba..d28f794440f30eacfb869df7b050c103ed21f217 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "MEM_guardedalloc.h"
 
-static ListBase callback_slots[BLI_CB_EVT_TOT]= {{0}};
+static ListBase callback_slots[BLI_CB_EVT_TOT]= {{NULL}};
 
 void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt)
 {
index 3575a8527fc015f89e6c14b1c8edbe8a5fcf5511..ef88bb0bbb6639f098210e5f549b0d14e417e479 100644 (file)
@@ -1361,7 +1361,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
 static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt)
 {
        MenuType *mt= (MenuType*)arg_mt;
-       Menu menu = {0};
+       Menu menu = {NULL};
 
        menu.type= mt;
        menu.layout= layout;
index b8cdc18e7393011f5b9222123b669338e66e115c..4b0c1cb12227818a802d0c4417a2f263f071c90d 100644 (file)
@@ -3988,7 +3988,7 @@ static void PTCacheUndo_clear(PTCacheEdit *edit)
 {
        PTCacheUndo *undo;
 
-       if(edit==0) return;
+       if(edit==NULL) return;
        
        undo= edit->undo.first;
        while(undo) {
index 007ae96ae59876d9cf600b715066978980f70f71..b937f9a4104de69bf5d7fd84fca3f926d82c61b3 100644 (file)
@@ -64,6 +64,7 @@
 #include "DNA_brush_types.h"
 #include "DNA_screen_types.h"
 
+#include "BKE_brush.h"
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
 #include "BKE_global.h"
index 0ac30853eaec7e5b3dcc009d4fc03d5bef79e0ab..ede17790318e3e73c7eca709225c9f8b6db9dd72 100644 (file)
@@ -1702,7 +1702,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
-int region_scale_cancel(bContext *UNUSED(C), wmOperator *op)
+static int region_scale_cancel(bContext *UNUSED(C), wmOperator *op)
 {
        MEM_freeN(op->customdata);
        op->customdata = NULL;
index 3560bfb9896bc0c54bbe78b46b152d04873ed3a1..74e9e775087f0b44a49d2269d07ca7f0a6587668 100644 (file)
@@ -231,7 +231,7 @@ void outliner_free_tree(ListBase *lb)
 }
 
 /* Find ith item from the treestore */
-TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
+static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
 {
        TreeElement *te= lb->first, *tes;
        while(te) {
index dc84289a8de17f6ab7c0a473dc5b752fe34e0f9f..9a904b1a9709d22a811668c7029471445caaab22 100644 (file)
@@ -700,7 +700,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
        }
 }
 
-static Sequence *special_seq_update= 0;
+static Sequence *special_seq_update= NULL;
 
 static void UNUSED_FUNCTION(set_special_seq_update)(int val)
 {
@@ -710,14 +710,14 @@ static void UNUSED_FUNCTION(set_special_seq_update)(int val)
        if(val) {
 // XXX         special_seq_update= find_nearest_seq(&x);
        }
-       else special_seq_update= 0;
+       else special_seq_update= NULL;
 }
 
 void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs)
 {
        struct Main *bmain= CTX_data_main(C);
-       struct ImBuf *ibuf = 0;
-       struct ImBuf *scope = 0;
+       struct ImBuf *ibuf= NULL;
+       struct ImBuf *scope= NULL;
        struct View2D *v2d = &ar->v2d;
        int rectx, recty;
        float viewrectx, viewrecty;
index 0ac23765167a2cc4e3df688c80ea93cfa3b57531..86b28f5e89eb3d94498a8d859252e455f08a96a3 100644 (file)
@@ -846,7 +846,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
        for(seq= ed->seqbasep->first; seq; seq= seq->next) {
                seq_rectf(seq, &rq);
                
-               if(BLI_isect_rctf(&rq, &rectf, 0)) {
+               if(BLI_isect_rctf(&rq, &rectf, NULL)) {
                        if(selecting)           seq->flag |= SELECT;
                        else                            seq->flag &= ~SEQ_ALLSEL;
                        recurs_sel_seq(seq);
index 910576fa34ed46ff917ca4d1ed8907445511fbfc..77498835d57b6c916f87669cd1af7731b0349b08 100644 (file)
@@ -82,7 +82,7 @@ typedef enum GPUDataSource {
 } GPUDataSource;
 
 static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
-       0, 0, 0, 0, "mat3", 0, 0, 0, 0, 0, 0, "mat4"};
+       NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"};
 
 struct GPUNode {
        struct GPUNode *next, *prev;
@@ -451,7 +451,7 @@ static int codegen_input_has_texture(GPUInput *input)
        else if(input->ima)
                return 1;
        else
-               return input->tex != 0;
+               return input->tex != NULL;
 }
 
 const char *GPU_builtin_name(GPUBuiltin builtin)
@@ -880,7 +880,7 @@ void GPU_pass_unbind(GPUPass *pass)
                        GPU_texture_unbind(input->tex);
 
                if (input->ima)
-                       input->tex = 0;
+                       input->tex = NULL;
        }
        
        GPU_shader_unbind(shader);
index 9878d83ff5a4a1f788f541e9fdcda26e71f96b6c..7af5ef6ea14750a8f94271d9b0be4f2467b1c8af 100644 (file)
@@ -308,7 +308,7 @@ void GPU_set_anisotropic(float value)
        }
 }
 
-float GPU_get_anisotropic()
+float GPU_get_anisotropic(void)
 {
        return GTS.anisotropic;
 }
index f6352a968782d05805942733b694ffeebf1c54e6..c9f1b093b7a7e8c4ad06d61e230926e24e6b1319 100644 (file)
@@ -484,7 +484,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
        //if (fpixels)
        //      pixels = GPU_texture_convert_pixels(w*h*depth, fpixels);
 
-       glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, 0);
+       glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, NULL);
 
        GPU_print_error("3D glTexImage3D");
 
index 80299d44a78f2b1bc0c09934f11e5ebb1ff328f3..3e5e7bbdc0e48324f36e278ca3467ced01c95b1f 100644 (file)
@@ -137,18 +137,18 @@ const char *includefiles[] = {
        ""
 };
 
-int maxdata= 500000, maxnr= 50000;
-int nr_names=0;
-int nr_types=0;
-int nr_structs=0;
-char **names, *namedata;               /* at address names[a] is string a */
-char **types, *typedata;               /* at address types[a] is string a */
-short *typelens;                               /* at typelens[a] is de length of type a */
-short *alphalens;                          /* contains sizes as they are calculated on the DEC Alpha (64 bits) */
-short **structs, *structdata;  /* at sp= structs[a] is the first address of a struct definition
-                                                                  sp[0] is type number
-                                                                  sp[1] is amount of elements
-                                                                  sp[2] sp[3] is typenr,  namenr (etc) */
+static int maxdata= 500000, maxnr= 50000;
+static int nr_names=0;
+static int nr_types=0;
+static int nr_structs=0;
+static char **names, *namedata;                /* at address names[a] is string a */
+static char **types, *typedata;                /* at address types[a] is string a */
+static short *typelens;                                /* at typelens[a] is de length of type a */
+static short *alphalens;                       /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */
+static short **structs, *structdata;/* at sp= structs[a] is the first address of a struct definition
+                                                                      sp[0] is type number
+                                                                  sp[1] is amount of elements
+                                                                  sp[2] sp[3] is typenr,  namenr (etc) */
 /**
  * Variable to control debug output of makesdna.
  * debugSDNA:
@@ -157,8 +157,8 @@ short **structs, *structdata;       /* at sp= structs[a] is the first address of a str
  *  - 2 = full trace, tell which names and types were found
  *  - 4 = full trace, plus all gritty details
  */
-int debugSDNA = 0;
-int additional_slen_offset;
+static int debugSDNA = 0;
+static int additional_slen_offset;
 
 /* ************************************************************************** */
 /* Functions                                                                  */
@@ -889,7 +889,7 @@ void printStructLenghts(void)
 }
 
 
-int make_structDNA(char *baseDirectory, FILE *file)
+static int make_structDNA(char *baseDirectory, FILE *file)
 {
        int len, i;
        short *sp;
index d47abced85e207fc1039c7ff8839e0a67527671d..b95bd2b208769bbfaa9e90edd6188ca1fc69879f 100644 (file)
@@ -66,7 +66,7 @@ static int file_older(const char *file1, const char *file2)
 
        return (st1.st_mtime < st2.st_mtime);
 }
-const char *makesrna_path= NULL;
+static const char *makesrna_path= NULL;
 
 static int replace_if_different(char *tmpfile, const char *dep_files[])
 {
index 8ac620c2fcf7e522aedb53968d21acb06baaabab..ea0364084f92ae03c1a6ac9a77fdf14d36d322df 100644 (file)
@@ -38,6 +38,7 @@
 #include "RNA_define.h"
 #include "RNA_access.h"
 #include "RNA_enum_types.h"
+#include "rna_internal.h"
 
 #include "BKE_utildefines.h"
 
index 5c5391b0bba76af79cf61e4d8d44e17e0ee841dc..37a629f46d02e681849c34f4b6bcaaffb5f91c06 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdlib.h>
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
index 7fd6a9dacfe06982eaaacc4e486e02dfa60e2c53..56492a52da93d19730028ee8cde304aef4aea129 100644 (file)
@@ -732,7 +732,7 @@ static StructRNA* def_node(BlenderRNA *brna, int node_id)
        return srna;
 }
 
-void alloc_node_type_items(EnumPropertyItem *items, int category)
+static void alloc_node_type_items(EnumPropertyItem *items, int category)
 {
        int i;
        int count = 3;
index 463f65fd3d5ab4db73cfc42acc3b1de0325ae882..490d9c38840fc501832c9670fccf388d2aab36ab 100644 (file)
@@ -43,7 +43,7 @@
 #include "WM_api.h"
 #include "WM_types.h"
 
-EnumPropertyItem effector_shape_items[] = {
+static EnumPropertyItem effector_shape_items[] = {
        {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
        {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
        {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""},
@@ -51,20 +51,23 @@ EnumPropertyItem effector_shape_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem curve_shape_items[] = {
+#ifdef RNA_RUNTIME
+
+/* type spesific return values only used from functions */
+static EnumPropertyItem curve_shape_items[] = {
        {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
        {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
        {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem empty_shape_items[] = {
+static EnumPropertyItem empty_shape_items[] = {
        {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
        {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem vortex_shape_items[] = {
+static EnumPropertyItem vortex_shape_items[] = {
        {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
        {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
        {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""},
@@ -72,21 +75,19 @@ EnumPropertyItem vortex_shape_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem curve_vortex_shape_items[] = {
+static EnumPropertyItem curve_vortex_shape_items[] = {
        {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
        {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
        {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve (New)", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem empty_vortex_shape_items[] = {
+static EnumPropertyItem empty_vortex_shape_items[] = {
        {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
        {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-#ifdef RNA_RUNTIME
-
 #include "MEM_guardedalloc.h"
 
 #include "DNA_modifier_types.h"
index 30fce5716a9209b36966c8803a8b6a8b8a24ca16..ba91fc3536ba374ac4b5067c02b235fb20713e48 100644 (file)
@@ -33,6 +33,7 @@
 #include "limits.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
 #include "WM_types.h"
 #include "WM_api.h"
 
-EnumPropertyItem part_from_items[] = {
+static EnumPropertyItem part_from_items[] = {
        {PART_FROM_VERT, "VERT", 0, "Verts", ""},
        {PART_FROM_FACE, "FACE", 0, "Faces", ""},
        {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_reactor_from_items[] = {
+static EnumPropertyItem part_reactor_from_items[] = {
        {PART_FROM_VERT, "VERT", 0, "Verts", ""},
        {PART_FROM_FACE, "FACE", 0, "Faces", ""},
        {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_dist_items[] = {
+static EnumPropertyItem part_dist_items[] = {
        {PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
        {PART_DISTR_RAND, "RAND", 0, "Random", ""},
        {PART_DISTR_GRID, "GRID", 0, "Grid", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_hair_dist_items[] = {
+static EnumPropertyItem part_hair_dist_items[] = {
        {PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
        {PART_DISTR_RAND, "RAND", 0, "Random", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_draw_as_items[] = {
+static EnumPropertyItem part_draw_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
        {PART_DRAW_DOT, "DOT", 0, "Point", ""},
@@ -87,14 +88,14 @@ EnumPropertyItem part_draw_as_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_hair_draw_as_items[] = {
+static EnumPropertyItem part_hair_draw_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
        {PART_DRAW_PATH, "PATH", 0, "Path", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_ren_as_items[] = {
+static EnumPropertyItem part_ren_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_HALO, "HALO", 0, "Halo", ""},
        {PART_DRAW_LINE, "LINE", 0, "Line", ""},
@@ -105,7 +106,7 @@ EnumPropertyItem part_ren_as_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_hair_ren_as_items[] = {
+static EnumPropertyItem part_hair_ren_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_PATH, "PATH", 0, "Path", ""},
        {PART_DRAW_OB, "OBJECT", 0, "Object", ""},
index f459563f49eff6b34a5d66bcc6770d324c9622cd..0ecc41d80d86ec51c93e32ef73ad15606f840561 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdlib.h>
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
@@ -47,7 +48,7 @@
 
 #include "BKE_node.h"
 
-EnumPropertyItem texture_filter_items[] = {
+static EnumPropertyItem texture_filter_items[] = {
        {TXF_BOX, "BOX", 0, "Box", ""},
        {TXF_EWA, "EWA", 0, "EWA", ""},
        {TXF_FELINE, "FELINE", 0, "FELINE", ""},
index c66290075326b18250309701cfee585fb86c87b0..6fc861b2a0df5d0bfdfc34027fc7d18d1d5536e4 100644 (file)
 
 #include <Python.h>
 
+#include "bpy_intern_string.h"
+
 PyObject *bpy_intern_str_register;
 PyObject *bpy_intern_str_unregister;
 PyObject *bpy_intern_str_bl_rna;
 PyObject *bpy_intern_str_order;
 PyObject *bpy_intern_str_attr;
 PyObject *bpy_intern_str___slots__;
-PyObject *bpy_intern_str___bases__;
 
 void bpy_intern_string_init(void)
 {
index a0ad1ff78504b73d51180dc4fa6ed7321da7a45a..5da142aeea704dc4fe533a0919205e460ac6cc70 100644 (file)
@@ -117,7 +117,7 @@ static PyObject *pymeth_PointerProperty= NULL;
 static PyObject *pymeth_CollectionProperty= NULL;
 static PyObject *pymeth_RemoveProperty= NULL;
 
-PyObject *pyrna_struct_as_instance(PointerRNA *ptr)
+static PyObject *pyrna_struct_as_instance(PointerRNA *ptr)
 {
        PyObject *self= NULL;
        /* first get self */
@@ -177,7 +177,7 @@ static PyObject *bpy_prop_deferred_return(PyObject *func, PyObject *kw)
 }
 
 /* callbacks */
-void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
+static void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
 {
        PyGILState_STATE gilstate;
        PyObject **py_data= (PyObject **)RNA_property_py_data_get(prop);
index b45528b96d9a29460fb6b923357e5c89f68d9df2..980f6b6af1e55371c193e3d6bd5a117468e4c528 100644 (file)
@@ -104,7 +104,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
 {
        DerivedMesh* dm;
        ParticleKey state;
-       ParticleSimulationData sim= {0};
+       ParticleSimulationData sim= {NULL};
        ParticleData *pa=NULL;
        float cfra = BKE_curframe(re->scene);
        int i, childexists;
index cf91e219593e0e5ad18331a0e32abee8d6e73bdc..850de9029c9113fb209b932a452a7903dd7b5715 100644 (file)
@@ -116,7 +116,7 @@ static void wm_free_reports(bContext *C)
        BKE_reports_clear(CTX_wm_reports(C));
 }
 
-int wm_start_with_console = 0;
+int wm_start_with_console = 0; /* used in creator.c */
 
 /* only called once, for startup */
 void WM_init(bContext *C, int argc, const char **argv)
index 6887aa4c7173e67cc0c56aa4cc5a8175422a0b83..0e94ad72d350ea2d22898be8bd37022df3d418a3 100644 (file)
@@ -225,7 +225,7 @@ static wmKeyConfig *wm_keyconfig_list_find(ListBase *lb, char *idname)
        return NULL;
 }
 
-wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm)
+static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm)
 {
        wmKeyConfig *keyconf;