use 'const char *' by default with RNA functions except when the value is flagged as PROP_THICK_WRAP.

Also use const char in many other parts of blenders code.

Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
This commit is contained in:
2010-11-17 09:45:45 +00:00
parent acc883da83
commit 51dcbdde03
105 changed files with 374 additions and 362 deletions

View File

@@ -984,7 +984,7 @@ int CustomData_get_layer_index(const CustomData *data, int type)
return -1;
}
int CustomData_get_named_layer_index(const CustomData *data, int type, char *name)
int CustomData_get_named_layer_index(const CustomData *data, int type, const char *name)
{
int i;
@@ -1371,7 +1371,7 @@ void *CustomData_duplicate_referenced_layer(struct CustomData *data, int type)
}
void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
int type, char *name)
int type, const char *name)
{
CustomDataLayer *layer;
int layer_index;
@@ -1603,7 +1603,7 @@ void *CustomData_get_layer_n(const CustomData *data, int type, int n)
}
void *CustomData_get_layer_named(const struct CustomData *data, int type,
char *name)
const char *name)
{
int layer_index = CustomData_get_named_layer_index(data, type, name);
if(layer_index < 0) return NULL;