New mason-based build system
This commit is contained in:
@@ -143,10 +143,15 @@ public:
|
||||
|
||||
private:
|
||||
// uv async callbacks
|
||||
#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
|
||||
static void render(uv_async_t *async, int status);
|
||||
static void terminate(uv_async_t *async, int status);
|
||||
static void cleanup(uv_async_t *async, int status);
|
||||
#else
|
||||
static void render(uv_async_t *async);
|
||||
static void terminate(uv_async_t *async);
|
||||
static void cleanup(uv_async_t *async);
|
||||
static void delete_async(uv_handle_t *handle);
|
||||
#endif
|
||||
|
||||
// Setup
|
||||
void setup();
|
||||
|
||||
@@ -65,7 +65,6 @@ constexpr EventSeverity disabledEventSeverities[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
constexpr Event disabledEvents[] = {
|
||||
Event(-1) // Avoid zero size array
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#ifdef __clang__
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-register"
|
||||
#else
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct uv_messenger_s uv_messenger_t;
|
||||
|
||||
#include <mbgl/util/uv-messenger.h>
|
||||
#include <mbgl/util/uv-channel.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -24,17 +24,31 @@ private:
|
||||
class loop {
|
||||
public:
|
||||
inline loop() {
|
||||
#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
|
||||
l = uv_loop_new();
|
||||
if (l == nullptr) {
|
||||
#else
|
||||
l = new uv_loop_t;
|
||||
if (uv_loop_init(&l) != 0) {
|
||||
#endif
|
||||
throw std::runtime_error("failed to initialize loop");
|
||||
}
|
||||
}
|
||||
|
||||
inline ~loop() { uv_loop_close(&l); }
|
||||
inline ~loop() {
|
||||
#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
|
||||
uv_loop_delete(l);
|
||||
#else
|
||||
uv_loop_close(l);
|
||||
delete l;
|
||||
#endif
|
||||
|
||||
inline uv_loop_t *operator*() { return &l; }
|
||||
}
|
||||
|
||||
inline uv_loop_t *operator*() { return l; }
|
||||
|
||||
private:
|
||||
uv_loop_t l;
|
||||
uv_loop_t *l = nullptr;
|
||||
};
|
||||
|
||||
class mutex {
|
||||
|
||||
Reference in New Issue
Block a user