API cleanup: Move bt_iter_create/destroy to internal header
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 8 Mar 2012 21:10:26 +0000 (16:10 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 8 Mar 2012 21:10:26 +0000 (16:10 -0500)
bt_iter is an abstract class, so its constructor/destructor should not
be public.

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/babeltrace/iterator-internal.h
include/babeltrace/iterator.h

index 626a7a0009b16377406bc4e51d99425e6eda4e7e..ea47745a723c9b1a84d82942daa8434885be9917 100644 (file)
@@ -33,6 +33,27 @@ struct bt_iter {
        struct bt_iter_pos *end_pos;
 };
 
+/*
+ * bt_iter_create - Allocate a trace collection iterator.
+ *
+ * begin_pos and end_pos are optional parameters to specify the position
+ * at which the trace collection should be seeked upon iterator
+ * creation, and the position at which iteration will start returning
+ * "EOF".
+ *
+ * By default, if begin_pos is NULL, a BT_SEEK_CUR is performed at
+ * creation. By default, if end_pos is NULL, a BT_SEEK_END (end of
+ * trace) is the EOF criterion.
+ */
+struct bt_iter *bt_iter_create(struct bt_context *ctx,
+               struct bt_iter_pos *begin_pos,
+               struct bt_iter_pos *end_pos);
+
+/*
+ * bt_iter_destroy - Free a trace collection iterator.
+ */
+void bt_iter_destroy(struct bt_iter *iter);
+
 int bt_iter_init(struct bt_iter *iter,
                struct bt_context *ctx,
                struct bt_iter_pos *begin_pos,
index 530d8460c2e0ca11db57f2534c5b4266ab008ce8..94df03c868526b1bcdf3fdbe935d8dfbf09406c9 100644 (file)
@@ -38,27 +38,6 @@ struct bt_iter_pos {
        } u;
 };
 
-/*
- * bt_iter_create - Allocate a trace collection iterator.
- *
- * begin_pos and end_pos are optional parameters to specify the position
- * at which the trace collection should be seeked upon iterator
- * creation, and the position at which iteration will start returning
- * "EOF".
- *
- * By default, if begin_pos is NULL, a BT_SEEK_CUR is performed at
- * creation. By default, if end_pos is NULL, a BT_SEEK_END (end of
- * trace) is the EOF criterion.
- */
-struct bt_iter *bt_iter_create(struct bt_context *ctx,
-               struct bt_iter_pos *begin_pos,
-               struct bt_iter_pos *end_pos);
-
-/*
- * bt_iter_destroy - Free a trace collection iterator.
- */
-void bt_iter_destroy(struct bt_iter *iter);
-
 /*
  * bt_iter_next: Move trace collection position to the next event.
  *
This page took 0.027233 seconds and 4 git commands to generate.