projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: use BT_LIB_LOG*_APPEND_CAUSE() where appropriate
[babeltrace.git]
/
src
/
lib
/
graph
/
message
/
message.h
diff --git
a/src/lib/graph/message/message.h
b/src/lib/graph/message/message.h
index 98d27b9301c4988458156756ed35202ff56d346b..1df9c5204c41d5a6187ad6fef13ab2f9ba96634a 100644
(file)
--- a/
src/lib/graph/message/message.h
+++ b/
src/lib/graph/message/message.h
@@
-24,6
+24,11
@@
* SOFTWARE.
*/
* SOFTWARE.
*/
+/* Protection: this file uses BT_LIB_LOG*() macros directly */
+#ifndef BT_LIB_LOG_SUPPORTED
+# error Please include "lib/logging.h" before including this file.
+#endif
+
#include "common/macros.h"
#include "lib/object.h"
#include "common/assert.h"
#include "common/macros.h"
#include "lib/object.h"
#include "common/assert.h"
@@
-33,6
+38,11
@@
#include "lib/object-pool.h"
#include <babeltrace2/types.h>
#include "lib/object-pool.h"
#include <babeltrace2/types.h>
+/* Protection: this file uses BT_LIB_LOG*() macros directly */
+#ifndef BT_LIB_LOG_SUPPORTED
+# error Please include "lib/logging.h" before including this file.
+#endif
+
typedef struct bt_stream *(*get_stream_func)(
struct bt_message *message);
typedef struct bt_stream *(*get_stream_func)(
struct bt_message *message);
@@
-74,10
+84,9
@@
struct bt_message *bt_message_create_from_pool(
struct bt_message *msg = bt_object_pool_create_object(pool);
if (G_UNLIKELY(!msg)) {
struct bt_message *msg = bt_object_pool_create_object(pool);
if (G_UNLIKELY(!msg)) {
-#ifdef BT_LIB_LOGE
-
BT_LIB_LOGE(
"Cannot allocate one message from message pool: "
+ BT_LIB_LOGE_APPEND_CAUSE(
+
"Cannot allocate one message from message pool: "
"%![pool-]+o, %![graph-]+g", pool, graph);
"%![pool-]+o, %![graph-]+g", pool, graph);
-#endif
goto error;
}
goto error;
}
This page took
0.024896 seconds
and
4
git commands to generate.