X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bt_autodisc.i.h;h=cb1bd84a4170443fdc8d386ef1a496a104410220;hb=8b305066676fc7aa433e8eb668f9de8802008025;hp=aac92e129031fe77f2e26a01b583b5010e27506e;hpb=502332367236f0cc3bf05dc3c2c34ca48f3e2a2f;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/native_bt_autodisc.i.h b/src/bindings/python/bt2/bt2/native_bt_autodisc.i.h index aac92e12..cb1bd84a 100644 --- a/src/bindings/python/bt2/bt2/native_bt_autodisc.i.h +++ b/src/bindings/python/bt2/bt2/native_bt_autodisc.i.h @@ -47,6 +47,7 @@ * This function can also return None, if it failed to allocate memory * for the return value and status code. */ +static bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs, const bt_plugin_set *plugin_set) { @@ -69,9 +70,10 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs, result = bt_value_map_create(); if (!result) { - static const char * const err = "Failed to create a map value."; - BT_LOGE_STR(err); - BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name, err); +#define BT_FMT "Failed to create a map value." + BT_LOGE_STR(BT_FMT); + BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name, BT_FMT); +#undef BT_FMT PyErr_NoMemory(); goto end; }