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/space_buttons | |
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/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 4a2860335fe..309c5cfc218 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -925,7 +925,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout) if(ptr->data) { icon= RNA_struct_ui_icon(ptr->type); - name= RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf)); + name= RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf), NULL); if(name) { if(!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE) && ptr->type == &RNA_Scene) diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 75b3eb950a5..3cf4de992e5 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -169,7 +169,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!prop) return OPERATOR_CANCELLED; - str= RNA_property_string_get_alloc(&ptr, prop, NULL, 0); + str= RNA_property_string_get_alloc(&ptr, prop, NULL, 0, NULL); /* useful yet irritating feature, Shift+Click to open the file * Alt+Click to browse a folder in the OS's browser */ |