libsysprof-capture: use signed int for backtrace return

This allows us to more safely subtract 1 from the unw_backtrace() to get
the proper number of frames (and detect it in the collector).
This commit is contained in:
Christian Hergert
2020-02-18 14:03:19 -08:00
parent 9f43bf2813
commit 7490a774ab
3 changed files with 16 additions and 12 deletions

View File

@ -72,9 +72,9 @@ typedef struct _SysprofCaptureWriter SysprofCaptureWriter;
*
* Returns: the number of addresses filled in @addrs
*/
typedef guint (*SysprofBacktraceFunc) (SysprofCaptureAddress *addrs,
guint n_addrs,
gpointer user_data);
typedef gint (*SysprofBacktraceFunc) (SysprofCaptureAddress *addrs,
guint n_addrs,
gpointer user_data);
SYSPROF_AVAILABLE_IN_ALL
SysprofCaptureWriter *sysprof_capture_writer_new_from_env (gsize buffer_size);