libsysprof-analyze: add helper for native byte order

This commit is contained in:
Christian Hergert
2023-05-03 17:07:19 -07:00
parent f550394b62
commit c0ade7da01
2 changed files with 13 additions and 4 deletions

View File

@ -24,6 +24,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
gboolean _sysprof_document_is_native (SysprofDocument *self);
char *_sysprof_document_ref_string (SysprofDocument *self, char *_sysprof_document_ref_string (SysprofDocument *self,
const char *name); const char *name);

View File

@ -326,3 +326,11 @@ sysprof_document_symbolize_finish (SysprofDocument *self,
return g_task_propagate_pointer (G_TASK (result), error); return g_task_propagate_pointer (G_TASK (result), error);
} }
gboolean
_sysprof_document_is_native (SysprofDocument *self)
{
g_return_val_if_fail (SYSPROF_IS_DOCUMENT (self), FALSE);
return self->needs_swap == FALSE;
}