libsysprof-capture: Drop GError usage from SysprofCaptureReader

Use `errno` instead, which is icky, but given that all of the failure
modes are from POSIX I/O functions, it’s at least in keeping with them.

This is a major API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
This commit is contained in:
Philip Withnall
2020-07-02 12:56:12 +01:00
parent fde278fb7f
commit e19d70bca0
19 changed files with 114 additions and 131 deletions

View File

@ -67,11 +67,9 @@ SYSPROF_BEGIN_DECLS
typedef struct _SysprofCaptureReader SysprofCaptureReader;
SYSPROF_AVAILABLE_IN_ALL
SysprofCaptureReader *sysprof_capture_reader_new (const char *filename,
GError **error);
SysprofCaptureReader *sysprof_capture_reader_new (const char *filename);
SYSPROF_AVAILABLE_IN_ALL
SysprofCaptureReader *sysprof_capture_reader_new_from_fd (int fd,
GError **error);
SysprofCaptureReader *sysprof_capture_reader_new_from_fd (int fd);
SYSPROF_AVAILABLE_IN_ALL
SysprofCaptureReader *sysprof_capture_reader_copy (SysprofCaptureReader *self);
SYSPROF_AVAILABLE_IN_ALL
@ -128,12 +126,10 @@ SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_reader_reset (SysprofCaptureReader *self);
SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_reader_splice (SysprofCaptureReader *self,
SysprofCaptureWriter *dest,
GError **error);
SysprofCaptureWriter *dest);
SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_reader_save_as (SysprofCaptureReader *self,
const char *filename,
GError **error);
const char *filename);
SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_reader_get_stat (SysprofCaptureReader *self,
SysprofCaptureStat *st_buf);