From: Julien Desfossez Date: Tue, 13 Dec 2011 12:47:09 +0000 (-0500) Subject: Use the generic call to move_pos_slow X-Git-Tag: v0.9~41 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=31e670293588d7882a232bc14b93d5e956fa43f4 Use the generic call to move_pos_slow Replace two hardcoded calls to ctf_move_pos_slow by calls to the function pointer registered when opening a trace. Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/converter/babeltrace-lib.c b/converter/babeltrace-lib.c index 07536217..518ec612 100644 --- a/converter/babeltrace-lib.c +++ b/converter/babeltrace-lib.c @@ -279,7 +279,7 @@ static int babeltrace_filestream_seek(struct ctf_file_stream *file_stream, */ break; case BT_SEEK_BEGIN: - ctf_move_pos_slow(&file_stream->pos, 0, SEEK_SET); + file_stream->pos.move_pos_slow(&file_stream->pos, 0, SEEK_SET); ret = stream_read_event(file_stream); break; case BT_SEEK_TIME: diff --git a/include/babeltrace/ctf/types.h b/include/babeltrace/ctf/types.h index 60749a6c..68ccf7af 100644 --- a/include/babeltrace/ctf/types.h +++ b/include/babeltrace/ctf/types.h @@ -192,7 +192,7 @@ void ctf_pos_get_event(struct ctf_stream_pos *pos) if (pos->offset == pos->content_size) { printf_debug("ctf_move_pos_slow (before call): %zd\n", pos->offset); - ctf_move_pos_slow(pos, 0, SEEK_CUR); + pos->move_pos_slow(pos, 0, SEEK_CUR); printf_debug("ctf_move_pos_slow (after call): %zd\n", pos->offset); }