mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-gtk: add getter for values array
This commit is contained in:
@ -475,3 +475,17 @@ sysprof_normalized_series_set_series (SysprofNormalizedSeries *self,
|
||||
sysprof_series_set_model (SYSPROF_SERIES (self), G_LIST_MODEL (series));
|
||||
}
|
||||
}
|
||||
|
||||
const float *
|
||||
sysprof_normalized_series_get_values (SysprofNormalizedSeries *self,
|
||||
guint *n_values)
|
||||
{
|
||||
g_return_val_if_fail (SYSPROF_IS_NORMALIZED_SERIES (self), NULL);
|
||||
|
||||
if (self->values == NULL || self->values->len == 0)
|
||||
return NULL;
|
||||
|
||||
*n_values = self->values->len;
|
||||
|
||||
return &g_array_index (self->values, float, 0);
|
||||
}
|
||||
|
||||
@ -59,5 +59,8 @@ void sysprof_normalized_series_set_series (SysprofNormalizedSeries
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
float sysprof_normalized_series_value_at (SysprofNormalizedSeries *self,
|
||||
guint position);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
const float *sysprof_normalized_series_get_values (SysprofNormalizedSeries *self,
|
||||
guint *n_values);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user