projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use glib portable macros to convert gpointer to int
[babeltrace.git]
/
formats
/
ctf
/
events.c
diff --git
a/formats/ctf/events.c
b/formats/ctf/events.c
index ea47a40355940d9707129e433a6246832c82ee17..0eb688a32c1c4966e6afaf0d19632038b9ed8fee 100644
(file)
--- a/
formats/ctf/events.c
+++ b/
formats/ctf/events.c
@@
-47,7
+47,7
@@
__thread int bt_ctf_last_field_error = 0;
const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event,
__thread int bt_ctf_last_field_error = 0;
const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event,
- enum
bt_
ctf_scope scope)
+ enum ctf_scope scope)
{
const struct bt_definition *tmp = NULL;
const struct ctf_event_definition *event;
{
const struct bt_definition *tmp = NULL;
const struct ctf_event_definition *event;
@@
-255,7
+255,7
@@
int bt_ctf_get_field_list(const struct bt_ctf_event *ctf_event,
goto error;
if (def_sequence->elems->pdata) {
*list = (struct bt_definition const* const*) def_sequence->elems->pdata;
goto error;
if (def_sequence->elems->pdata) {
*list = (struct bt_definition const* const*) def_sequence->elems->pdata;
- *count =
def_sequence->elems->len
;
+ *count =
(unsigned int) def_sequence->length->value._unsigned
;
goto end;
} else {
goto error;
goto end;
} else {
goto error;
@@
-315,18
+315,19
@@
int bt_ctf_event_get_handle_id(const struct bt_ctf_event *ctf_event)
return ret;
}
return ret;
}
-
uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *ctf_event
)
+
int bt_ctf_get_timestamp(const struct bt_ctf_event *ctf_event, int64_t *timestamp
)
{
const struct ctf_event_definition *event;
{
const struct ctf_event_definition *event;
- if (!ctf_event)
- return -1
ULL
;
+ if (!ctf_event
|| !timestamp
)
+ return -1;
event = ctf_event->parent;
if (event && event->stream->has_timestamp)
event = ctf_event->parent;
if (event && event->stream->has_timestamp)
-
return
event->stream->real_timestamp;
+
*timestamp =
event->stream->real_timestamp;
else
else
- return -1ULL;
+ return -1;
+ return 0;
}
uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *ctf_event)
}
uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *ctf_event)
@@
-478,7
+479,7
@@
const char *bt_ctf_get_enum_str(const struct bt_definition *field)
g_array_unref(array);
bt_ctf_field_set_error(-ENOENT);
return NULL;
g_array_unref(array);
bt_ctf_field_set_error(-ENOENT);
return NULL;
- }
+ }
/* Return first string. Arbitrary choice. */
ret = g_quark_to_string(g_array_index(array, GQuark, 0));
g_array_unref(array);
/* Return first string. Arbitrary choice. */
ret = g_quark_to_string(g_array_index(array, GQuark, 0));
g_array_unref(array);
@@
-689,7
+690,7
@@
int bt_ctf_get_event_decl_list(int handle_id, struct bt_context *ctx,
goto error;
handle = g_hash_table_lookup(ctx->trace_handles,
goto error;
handle = g_hash_table_lookup(ctx->trace_handles,
-
(gpointer) (unsigned long) handle_id
);
+
GUINT_TO_POINTER(handle_id)
);
if (!handle)
goto error;
if (!handle)
goto error;
@@
-721,7
+722,7
@@
uint64_t bt_ctf_get_decl_event_id(const struct bt_ctf_event_decl *event)
}
int bt_ctf_get_decl_fields(struct bt_ctf_event_decl *event_decl,
}
int bt_ctf_get_decl_fields(struct bt_ctf_event_decl *event_decl,
- enum
bt_
ctf_scope scope,
+ enum ctf_scope scope,
struct bt_ctf_field_decl const * const **list,
unsigned int *count)
{
struct bt_ctf_field_decl const * const **list,
unsigned int *count)
{
This page took
0.025636 seconds
and
4
git commands to generate.