diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-07-23 19:20:03 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-07-23 19:20:03 -0400 |
commit | be2e3ed7ea4d38eac3b0d4b6f83d78ff24e3b48e (patch) | |
tree | b5224af4d98923455edb39ad8914ed9d90f20628 | |
parent | 148b3be1afb13632d13bc7054acf56eee5e19f1c (diff) | |
download | lite-xl-plugin-manager-be2e3ed7ea4d38eac3b0d4b6f83d78ff24e3b48e.tar.gz lite-xl-plugin-manager-be2e3ed7ea4d38eac3b0d4b6f83d78ff24e3b48e.zip |
Change names of types so that mac doesn't cry.
-rw-r--r-- | src/lpm.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -65,7 +65,7 @@ typedef struct { #else pthread_t thread; #endif -} thread_t; +} lpm_thread_t; typedef struct { #if _WIN32 @@ -73,10 +73,10 @@ typedef struct { #else pthread_mutex_t mutex; #endif -} mutex_t; +} lpm_mutex_t; -static mutex_t* new_mutex() { - mutex_t* mutex = malloc(sizeof(mutex_t)); +static lpm_mutex_t* new_mutex() { + lpm_mutex_t* mutex = malloc(sizeof(lpm_mutex_t)); #if _WIN32 mutex->mutex = CreateMutex(NULL, FALSE, NULL); #else @@ -85,7 +85,7 @@ static mutex_t* new_mutex() { return mutex; } -static void free_mutex(mutex_t* mutex) { +static void free_mutex(lpm_mutex_t* mutex) { #if _WIN32 CloseHandle(mutex->mutex); #else @@ -94,7 +94,7 @@ static void free_mutex(mutex_t* mutex) { free(mutex); } -static void lock_mutex(mutex_t* mutex) { +static void lock_mutex(lpm_mutex_t* mutex) { #if _WIN32 WaitForSingleObject(mutex->mutex, INFINITE); #else @@ -102,7 +102,7 @@ static void lock_mutex(mutex_t* mutex) { #endif } -static void unlock_mutex(mutex_t* mutex) { +static void unlock_mutex(lpm_mutex_t* mutex) { #if _WIN32 ReleaseMutex(mutex->mutex); #else @@ -113,14 +113,14 @@ static void unlock_mutex(mutex_t* mutex) { #if _WIN32 static DWORD windows_thread_callback(void* data) { - thread_t* thread = data; + lpm_thread_t* thread = data; thread->data = thread->func(thread->data); return 0; } #endif -static thread_t* create_thread(void* (*func)(void*), void* data) { - thread_t* thread = malloc(sizeof(thread_t)); +static lpm_thread_t* create_thread(void* (*func)(void*), void* data) { + lpm_thread_t* thread = malloc(sizeof(lpm_thread_t)); #if _WIN32 thread->func = func; thread->data = data; @@ -131,7 +131,7 @@ static thread_t* create_thread(void* (*func)(void*), void* data) { return thread; } -static void* join_thread(thread_t* thread) { +static void* join_thread(lpm_thread_t* thread) { if (!thread) return NULL; void* retval; @@ -562,7 +562,7 @@ typedef struct { int complete; int error_code; char data[512]; - thread_t* thread; + lpm_thread_t* thread; } fetch_context_t; static int lpm_fetch_callback(lua_State* L, const git_transfer_progress *stats) { |