RNA: use static declarations

This commit is contained in:
Campbell Barton 2014-08-13 08:37:41 +10:00
parent dea01a0928
commit 315c55916b
14 changed files with 23 additions and 20 deletions

@ -262,6 +262,7 @@ extern StructRNA RNA_GameProperty;
extern StructRNA RNA_GameSoftBodySettings; extern StructRNA RNA_GameSoftBodySettings;
extern StructRNA RNA_GameStringProperty; extern StructRNA RNA_GameStringProperty;
extern StructRNA RNA_GameTimerProperty; extern StructRNA RNA_GameTimerProperty;
extern StructRNA RNA_GaussianBlurSequence;
extern StructRNA RNA_GlowSequence; extern StructRNA RNA_GlowSequence;
extern StructRNA RNA_GreasePencil; extern StructRNA RNA_GreasePencil;
extern StructRNA RNA_Group; extern StructRNA RNA_Group;
@ -277,6 +278,7 @@ extern StructRNA RNA_ImagePaint;
extern StructRNA RNA_ImageSequence; extern StructRNA RNA_ImageSequence;
extern StructRNA RNA_ImageTexture; extern StructRNA RNA_ImageTexture;
extern StructRNA RNA_ImageUser; extern StructRNA RNA_ImageUser;
extern StructRNA RNA_ImapaintToolCapabilities;
extern StructRNA RNA_InflowFluidSettings; extern StructRNA RNA_InflowFluidSettings;
extern StructRNA RNA_IntProperty; extern StructRNA RNA_IntProperty;
extern StructRNA RNA_Itasc; extern StructRNA RNA_Itasc;

@ -55,6 +55,7 @@
#include "RNA_access.h" #include "RNA_access.h"
#include "RNA_define.h" #include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h" #include "WM_api.h"

@ -475,7 +475,7 @@ static int rna_Armature_is_editmode_get(PointerRNA *ptr)
return (arm->edbo != NULL); return (arm->edbo != NULL);
} }
void rna_Armature_transform(struct bArmature *arm, float *mat) static void rna_Armature_transform(struct bArmature *arm, float *mat)
{ {
ED_armature_transform(arm, (float (*)[4])mat); ED_armature_transform(arm, (float (*)[4])mat);
} }

@ -378,7 +378,7 @@ static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *repo
RNA_POINTER_INVALIDATE(element_ptr); RNA_POINTER_INVALIDATE(element_ptr);
} }
void rna_CurveMap_remove_point(CurveMap *cuma, ReportList *reports, PointerRNA *point_ptr) static void rna_CurveMap_remove_point(CurveMap *cuma, ReportList *reports, PointerRNA *point_ptr)
{ {
CurveMapPoint *point = point_ptr->data; CurveMapPoint *point = point_ptr->data;
if (curvemap_remove_point(cuma, point) == false) { if (curvemap_remove_point(cuma, point) == false) {

@ -43,7 +43,7 @@
#include "rna_internal.h" /* own include */ #include "rna_internal.h" /* own include */
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
void rna_Curve_transform(Curve *cu, float *mat) static void rna_Curve_transform(Curve *cu, float *mat)
{ {
ED_curve_transform(cu, (float (*)[4])mat); ED_curve_transform(cu, (float (*)[4])mat);
} }

@ -820,7 +820,7 @@ static FCM_EnvelopeData *rna_FModifierEnvelope_points_add(FModifier *fmod, Repor
return (env->data + i); return (env->data + i);
} }
void rna_FModifierEnvelope_points_remove(FModifier *fmod, ReportList *reports, PointerRNA *point) static void rna_FModifierEnvelope_points_remove(FModifier *fmod, ReportList *reports, PointerRNA *point)
{ {
FCM_EnvelopeData *cp = point->data; FCM_EnvelopeData *cp = point->data;
FMod_Envelope *env = (FMod_Envelope *)fmod->data; FMod_Envelope *env = (FMod_Envelope *)fmod->data;

@ -43,7 +43,7 @@
#include "rna_internal.h" /* own include */ #include "rna_internal.h" /* own include */
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
void rna_Lattice_transform(Lattice *lt, float *mat) static void rna_Lattice_transform(Lattice *lt, float *mat)
{ {
ED_lattice_transform(lt, (float (*)[4])mat); ED_lattice_transform(lt, (float (*)[4])mat);
} }

@ -683,14 +683,14 @@ static void rna_Main_grease_pencil_remove(Main *bmain, ReportList *reports, Poin
gpd->id.name + 2, ID_REAL_USERS(gpd)); gpd->id.name + 2, ID_REAL_USERS(gpd));
} }
FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name) static FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name)
{ {
FreestyleLineStyle *linestyle = BKE_linestyle_new(name, bmain); FreestyleLineStyle *linestyle = BKE_linestyle_new(name, bmain);
id_us_min(&linestyle->id); id_us_min(&linestyle->id);
return linestyle; return linestyle;
} }
void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineStyle *linestyle) static void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineStyle *linestyle)
{ {
if (ID_REAL_USERS(linestyle) <= 0) if (ID_REAL_USERS(linestyle) <= 0)
BKE_libblock_free(bmain, linestyle); BKE_libblock_free(bmain, linestyle);

@ -43,7 +43,7 @@
#include "rna_internal.h" /* own include */ #include "rna_internal.h" /* own include */
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
void rna_Meta_transform(struct MetaBall *mb, float *mat) static void rna_Meta_transform(struct MetaBall *mb, float *mat)
{ {
ED_mball_transform(mb, (float (*)[4])mat); ED_mball_transform(mb, (float (*)[4])mat);
} }

@ -45,14 +45,14 @@ EnumPropertyItem unpack_method_items[] = {
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
void rna_PackedImage_data_get(PointerRNA *ptr, char *value) static void rna_PackedImage_data_get(PointerRNA *ptr, char *value)
{ {
PackedFile *pf = (PackedFile *)ptr->data; PackedFile *pf = (PackedFile *)ptr->data;
memcpy(value, pf->data, (size_t)pf->size); memcpy(value, pf->data, (size_t)pf->size);
value[pf->size] = '\0'; value[pf->size] = '\0';
} }
int rna_PackedImage_data_len(PointerRNA *ptr) static int rna_PackedImage_data_len(PointerRNA *ptr)
{ {
PackedFile *pf = (PackedFile *)ptr->data; PackedFile *pf = (PackedFile *)ptr->data;
return pf->size; /* No need to include trailing NULL char here! */ return pf->size; /* No need to include trailing NULL char here! */

@ -316,9 +316,9 @@ static void rna_Particle_uv_on_emitter(ParticleData *particle, ReportList *repor
static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object,
int particle_no, int step, float n_co[3]) int particle_no, int step, float n_co[3])
{ {
ParticleSettings *part = 0; ParticleSettings *part = NULL;
ParticleData *pars = 0; ParticleData *pars = NULL;
ParticleCacheKey *cache = 0; ParticleCacheKey *cache = NULL;
int totchild = 0; int totchild = 0;
int path_nbr = 0; int path_nbr = 0;
int totpart; int totpart;
@ -437,7 +437,7 @@ static int rna_ParticleSystem_tessfaceidx_on_emitter(ParticleSystem *particlesys
ParticleSystemModifierData *modifier, ParticleData *particle, ParticleSystemModifierData *modifier, ParticleData *particle,
int particle_no, float (**r_fuv)[4]) int particle_no, float (**r_fuv)[4])
{ {
ParticleSettings *part = 0; ParticleSettings *part = NULL;
int totpart; int totpart;
int totchild = 0; int totchild = 0;
int totface; int totface;

@ -1300,25 +1300,25 @@ static int rna_SpaceNodeEditor_path_length(PointerRNA *ptr)
return ED_node_tree_path_length(snode); return ED_node_tree_path_length(snode);
} }
void rna_SpaceNodeEditor_path_clear(SpaceNode *snode, bContext *C) static void rna_SpaceNodeEditor_path_clear(SpaceNode *snode, bContext *C)
{ {
ED_node_tree_start(snode, NULL, NULL, NULL); ED_node_tree_start(snode, NULL, NULL, NULL);
ED_node_tree_update(C); ED_node_tree_update(C);
} }
void rna_SpaceNodeEditor_path_start(SpaceNode *snode, bContext *C, PointerRNA *node_tree) static void rna_SpaceNodeEditor_path_start(SpaceNode *snode, bContext *C, PointerRNA *node_tree)
{ {
ED_node_tree_start(snode, (bNodeTree *)node_tree->data, NULL, NULL); ED_node_tree_start(snode, (bNodeTree *)node_tree->data, NULL, NULL);
ED_node_tree_update(C); ED_node_tree_update(C);
} }
void rna_SpaceNodeEditor_path_append(SpaceNode *snode, bContext *C, PointerRNA *node_tree, PointerRNA *node) static void rna_SpaceNodeEditor_path_append(SpaceNode *snode, bContext *C, PointerRNA *node_tree, PointerRNA *node)
{ {
ED_node_tree_push(snode, node_tree->data, node->data); ED_node_tree_push(snode, node_tree->data, node->data);
ED_node_tree_update(C); ED_node_tree_update(C);
} }
void rna_SpaceNodeEditor_path_pop(SpaceNode *snode, bContext *C) static void rna_SpaceNodeEditor_path_pop(SpaceNode *snode, bContext *C)
{ {
ED_node_tree_pop(snode); ED_node_tree_pop(snode);
ED_node_tree_update(C); ED_node_tree_update(C);

@ -616,7 +616,7 @@ static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
win->newscreen = value.data; win->newscreen = value.data;
} }
int rna_Window_screen_assign_poll(PointerRNA *UNUSED(ptr), PointerRNA value) static int rna_Window_screen_assign_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{ {
bScreen *screen = (bScreen *)value.id.data; bScreen *screen = (bScreen *)value.id.data;

@ -111,7 +111,7 @@ static void rna_event_timer_remove(struct wmWindowManager *wm, wmTimer *timer)
} }
/* placeholder data for final implementation of a true progressbar */ /* placeholder data for final implementation of a true progressbar */
struct wmStaticProgress { static struct wmStaticProgress {
float min; float min;
float max; float max;
bool is_valid; bool is_valid;