libsysprof-capture: Replace G_GNUC_INTERNAL with SYSPROF_INTERNAL

It does the same thing for modern compilers.

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

Helps: #40
This commit is contained in:
Philip Withnall
2020-07-01 16:41:52 +01:00
parent 41ec04ea99
commit c9f54fcc68
3 changed files with 22 additions and 17 deletions

View File

@ -57,31 +57,31 @@ typedef bool (*MappedRingBufferCallback) (const void *data,
size_t *length,
void *user_data);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
MappedRingBuffer *mapped_ring_buffer_new_reader (size_t buffer_size);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
MappedRingBuffer *mapped_ring_buffer_new_readwrite (size_t buffer_size);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
MappedRingBuffer *mapped_ring_buffer_new_writer (int fd);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
int mapped_ring_buffer_get_fd (MappedRingBuffer *self);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
MappedRingBuffer *mapped_ring_buffer_ref (MappedRingBuffer *self);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
void mapped_ring_buffer_unref (MappedRingBuffer *self);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
void mapped_ring_buffer_clear (MappedRingBuffer *self);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
void *mapped_ring_buffer_allocate (MappedRingBuffer *self,
size_t length);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
void mapped_ring_buffer_advance (MappedRingBuffer *self,
size_t length);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
bool mapped_ring_buffer_drain (MappedRingBuffer *self,
MappedRingBufferCallback callback,
void *user_data);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
bool mapped_ring_buffer_is_empty (MappedRingBuffer *self);
SYSPROF_END_DECLS

View File

@ -240,17 +240,16 @@ SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_writer_cat (SysprofCaptureWriter *self,
SysprofCaptureReader *reader,
GError **error);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
bool _sysprof_capture_writer_add_raw (SysprofCaptureWriter *self,
const SysprofCaptureFrame *frame);
G_GNUC_INTERNAL
SYSPROF_INTERNAL
bool _sysprof_capture_writer_splice_from_fd (SysprofCaptureWriter *self,
int fd,
GError **error) G_GNUC_INTERNAL;
G_GNUC_INTERNAL
GError **error) SYSPROF_INTERNAL;
SYSPROF_INTERNAL
bool _sysprof_capture_writer_set_time_range (SysprofCaptureWriter *self,
int64_t start_time,
int64_t end_time) G_GNUC_INTERNAL;
int64_t end_time) SYSPROF_INTERNAL;
SYSPROF_END_DECLS

View File

@ -66,3 +66,9 @@
#define SYSPROF_BEGIN_DECLS
#define SYSPROF_END_DECLS
#endif
#if defined (__GNUC__)
#define SYSPROF_INTERNAL __attribute__((visibility("hidden")))
#else
#define SYSPROF_INTERNAL
#endif