From 25ca10819e303425c3f224b98b26fa5e572f5c51 Mon Sep 17 00:00:00 2001 From: taras Date: Mon, 7 Oct 2024 00:50:04 +0200 Subject: [PATCH] Add inline to C functions --- picows/picows_compat.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/picows/picows_compat.h b/picows/picows_compat.h index f25b23c..88e253d 100644 --- a/picows/picows_compat.h +++ b/picows/picows_compat.h @@ -62,7 +62,7 @@ #include #define PICOWS_SOCKET_ERROR SOCKET_ERROR - static int picows_convert_wsa_error_to_errno(int ec) + static inline int picows_convert_wsa_error_to_errno(int ec) { switch(ec) { @@ -93,12 +93,12 @@ } } - static int picows_get_errno(void) + static inline int picows_get_errno(void) { return picows_convert_wsa_error_to_errno(WSAGetLastError()); } - static double picows_get_monotonic_time(void) + static inline double picows_get_monotonic_time(void) { LARGE_INTEGER frequency, counter; QueryPerformanceFrequency(&frequency); @@ -114,9 +114,9 @@ #define PICOWS_EAGAIN EAGAIN #define PICOWS_EWOULDBLOCK EWOULDBLOCK - static int picows_get_errno(void) { return errno; } + static inline int picows_get_errno(void) { return errno; } - static double picows_get_monotonic_time(void) + static inline double picows_get_monotonic_time(void) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);