X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bt_autodisc.i.h;h=cb1bd84a4170443fdc8d386ef1a496a104410220;hp=612c9328fd8c6a60a05a528e08a735d2318e0600;hb=8b305066676fc7aa433e8eb668f9de8802008025;hpb=28ba44ad9ca14153e96c94a9100423ea224c1af3 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 612c9328..cb1bd84a 100644 --- a/src/bindings/python/bt2/bt2/native_bt_autodisc.i.h +++ b/src/bindings/python/bt2/bt2/native_bt_autodisc.i.h @@ -70,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; }