symbol visibility
This commit is contained in:
1 parent
6b80a026cf
commit
ed6d2d1cd5
5 files changed
+21
-10
No files matched your search
@@ -0,0 +1,7 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
#pragma once
|
||||
|
||||
#define EXPORT __attribute__((visibility("default")))
|
||||
@@ -56,6 +56,7 @@ tlsl_lib = shared_library(
|
||||
sources,
|
||||
include_directories: includes,
|
||||
c_args: args,
|
||||
gnu_symbol_visibility: 'hidden',
|
||||
)
|
||||
|
||||
tlsl_dep = declare_dependency(
|
||||
|
||||
+3
-2
@@ -4,9 +4,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "export.h"
|
||||
#include "public/array_list.h"
|
||||
|
||||
int array_list_raw_alloc(struct array_list *al, size_t cap, size_t elem_size) {
|
||||
EXPORT int array_list_raw_alloc(struct array_list *al, size_t cap, size_t elem_size) {
|
||||
void *buf;
|
||||
|
||||
if (!(buf = realloc(al->buf, cap * elem_size)))
|
||||
@@ -16,7 +17,7 @@ int array_list_raw_alloc(struct array_list *al, size_t cap, size_t elem_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void array_list_raw_cleanup(struct array_list *al) {
|
||||
EXPORT void array_list_raw_cleanup(struct array_list *al) {
|
||||
if (al->buf && al->cap) {
|
||||
free(al->buf);
|
||||
al->buf = NULL;
|
||||
|
||||
+8
-7
@@ -2,11 +2,12 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
#include "export.h"
|
||||
#include "eventloop_platform.h"
|
||||
#include "public/container_of.h"
|
||||
#include "public/list.h"
|
||||
|
||||
int tlsl_eventloop_init(struct tlsl_eventloop *el) {
|
||||
EXPORT int tlsl_eventloop_init(struct tlsl_eventloop *el) {
|
||||
int platform_res;
|
||||
|
||||
intrusive_list_init_empty(&el->event_list);
|
||||
@@ -18,7 +19,7 @@ int tlsl_eventloop_init(struct tlsl_eventloop *el) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void tlsl_eventloop_cleanup(struct tlsl_eventloop *el) {
|
||||
EXPORT void tlsl_eventloop_cleanup(struct tlsl_eventloop *el) {
|
||||
struct intrusive_list *li;
|
||||
struct tlsl_event *e;
|
||||
|
||||
@@ -34,7 +35,7 @@ void tlsl_eventloop_cleanup(struct tlsl_eventloop *el) {
|
||||
el->valid = false;
|
||||
}
|
||||
|
||||
int tlsl_eventloop_wait(
|
||||
EXPORT int tlsl_eventloop_wait(
|
||||
struct tlsl_eventloop *el,
|
||||
tlsl_event_id_t *id_out,
|
||||
uint32_t *flags_out,
|
||||
@@ -43,16 +44,16 @@ int tlsl_eventloop_wait(
|
||||
return tlsl_platform_el_wait(el, id_out, flags_out, timeout_ms);
|
||||
}
|
||||
|
||||
int tlsl_eventloop_clear(struct tlsl_eventloop *el, struct tlsl_event *e) {
|
||||
EXPORT int tlsl_eventloop_clear(struct tlsl_eventloop *el, struct tlsl_event *e) {
|
||||
return tlsl_platform_el_event_clear(el, e);
|
||||
}
|
||||
|
||||
void tlsl_eventloop_remove(struct tlsl_eventloop *el, struct tlsl_event *e) {
|
||||
EXPORT void tlsl_eventloop_remove(struct tlsl_eventloop *el, struct tlsl_event *e) {
|
||||
tlsl_platform_el_event_remove(el, e);
|
||||
tlsl_platform_el_event_cleanup(el, e);
|
||||
}
|
||||
|
||||
int tlsl_eventloop_add_timer(
|
||||
EXPORT int tlsl_eventloop_add_timer(
|
||||
struct tlsl_eventloop *el,
|
||||
struct tlsl_event *e,
|
||||
uint64_t millis,
|
||||
@@ -66,7 +67,7 @@ int tlsl_eventloop_add_timer(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int tlsl_eventloop_add_fd(
|
||||
EXPORT int tlsl_eventloop_add_fd(
|
||||
struct tlsl_eventloop *el,
|
||||
struct tlsl_event *e,
|
||||
int fd,
|
||||
|
||||
Reference in new issue
Block a user