diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-06-12 17:37:14 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-06-12 17:37:14 +0300 |
commit | 2abfb2ccca43a2db29de5c76b4338eb929bd284b (patch) | |
tree | a93600b317586e820a9b09db48e031d399677173 | |
parent | 16c9a00cb7dc06ee4ef988f443da7c1ad780b3f6 (diff) | |
download | libmicrohttpd-2abfb2ccca43a2db29de5c76b4338eb929bd284b.tar.gz libmicrohttpd-2abfb2ccca43a2db29de5c76b4338eb929bd284b.zip |
memorypool: refactored includes, moved out unrelated function
-rw-r--r-- | src/microhttpd/daemon.c | 15 | ||||
-rw-r--r-- | src/microhttpd/memorypool.c | 16 | ||||
-rw-r--r-- | src/microhttpd/memorypool.h | 3 |
3 files changed, 18 insertions, 16 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 8ec310cc..2729bb21 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -235,6 +235,21 @@ MHD_default_logger_ (void *cls, | |||
235 | 235 | ||
236 | 236 | ||
237 | /** | 237 | /** |
238 | * Free the memory given by @a ptr. Calls "free(ptr)". This function | ||
239 | * should be used to free the username returned by | ||
240 | * #MHD_digest_auth_get_username(). | ||
241 | * @note Since v0.9.56 | ||
242 | * | ||
243 | * @param ptr pointer to free. | ||
244 | */ | ||
245 | _MHD_EXTERN void | ||
246 | MHD_free (void *ptr) | ||
247 | { | ||
248 | free (ptr); | ||
249 | } | ||
250 | |||
251 | |||
252 | /** | ||
238 | * Trace up to and return master daemon. If the supplied daemon | 253 | * Trace up to and return master daemon. If the supplied daemon |
239 | * is a master, then return the daemon itself. | 254 | * is a master, then return the daemon itself. |
240 | * | 255 | * |
diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c index 9639d552..415b8aa5 100644 --- a/src/microhttpd/memorypool.c +++ b/src/microhttpd/memorypool.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * @author Karlson2k (Evgeny Grin) | 25 | * @author Karlson2k (Evgeny Grin) |
26 | */ | 26 | */ |
27 | #include "memorypool.h" | 27 | #include "memorypool.h" |
28 | #include "internal.h" | ||
28 | #include "mhd_assert.h" | 29 | #include "mhd_assert.h" |
29 | 30 | ||
30 | /* define MAP_ANONYMOUS for Mac OS X */ | 31 | /* define MAP_ANONYMOUS for Mac OS X */ |
@@ -81,21 +82,6 @@ struct MemoryPool | |||
81 | 82 | ||
82 | 83 | ||
83 | /** | 84 | /** |
84 | * Free the memory given by @a ptr. Calls "free(ptr)". This function | ||
85 | * should be used to free the username returned by | ||
86 | * #MHD_digest_auth_get_username(). | ||
87 | * @note Since v0.9.56 | ||
88 | * | ||
89 | * @param ptr pointer to free. | ||
90 | */ | ||
91 | _MHD_EXTERN void | ||
92 | MHD_free (void *ptr) | ||
93 | { | ||
94 | free (ptr); | ||
95 | } | ||
96 | |||
97 | |||
98 | /** | ||
99 | * Create a memory pool. | 85 | * Create a memory pool. |
100 | * | 86 | * |
101 | * @param max maximum size of the pool | 87 | * @param max maximum size of the pool |
diff --git a/src/microhttpd/memorypool.h b/src/microhttpd/memorypool.h index 69b7e851..2863b2f3 100644 --- a/src/microhttpd/memorypool.h +++ b/src/microhttpd/memorypool.h | |||
@@ -30,7 +30,8 @@ | |||
30 | #ifndef MEMORYPOOL_H | 30 | #ifndef MEMORYPOOL_H |
31 | #define MEMORYPOOL_H | 31 | #define MEMORYPOOL_H |
32 | 32 | ||
33 | #include "internal.h" | 33 | #include "mhd_options.h" |
34 | #include <stddef.h> | ||
34 | 35 | ||
35 | /** | 36 | /** |
36 | * Opaque handle for a memory pool. | 37 | * Opaque handle for a memory pool. |