diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-22 14:49:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-22 14:49:35 +0400 |
commit | ebe63b664baa2f4e65643a2535766e5babf9c8a7 (patch) | |
tree | 7b0303d4f8311bd34483c0c7999c4c29b40f2263 /source/blender/editors/interface/interface_templates.c | |
parent | cac4fde224f3dfb2831779df7b61f819a3564e2d (diff) |
py api - added PyC_UnicodeFromByteAndSize() to match PyUnicode_FromStringAndSize()
also made RNA_property_string_get_alloc() return the length of the new string to avoid having to run strlen on it after.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index c6bc0f58b5b..34f9849fac7 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2085,7 +2085,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe if(icon == ICON_NONE || icon == ICON_DOT) icon= 0; - namebuf= RNA_struct_name_get_alloc(itemptr, NULL, 0); + namebuf= RNA_struct_name_get_alloc(itemptr, NULL, 0, NULL); name= (namebuf)? namebuf: ""; /* hardcoded types */ @@ -2270,7 +2270,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * if(found) { /* create button */ - name= RNA_struct_name_get_alloc(&itemptr, NULL, 0); + name= RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); icon= list_item_icon_get(C, &itemptr, rnaicon, 0); uiItemL(row, (name)? name: "", icon); |