summarylogtreecommitdiffstats
path: root/arrayextern.patch
blob: 476abbeceec2c38480ea18514fdcfdeaae2df8b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
diff --git a/core-array.c b/core-array.c
index 906e6a1..ad0b844 100644
--- a/core-array.c
+++ b/core-array.c
@@ -296,35 +296,34 @@ static const int ArrayBurstSize = 256;
 
 // -------------------------------------------------------------------------
 
-extern inline void *AllocMem(size_t);
-extern inline void FreeMem(void *, size_t);
-
-#ifndef AllocMem
-
+#ifdef AllocMem
+extern
+#else
+static
+#endif
 /**
 **	better malloc
 **
 **	@param size	size of memory area to allocate
 */
-static inline void *AllocMem(size_t size)
+inline void *AllocMem(size_t size)
 {
     return malloc(size);
 }
 
+#ifdef FreeMem
+extern
+#else
+static
 #endif
-
-#ifndef FreeMem
-
 /**
 **	better free
 */
-static inline void FreeMem(void *data, __attribute__ ((unused)) size_t size)
+inline void FreeMem(void *data, __attribute__ ((unused)) size_t size)
 {
     free(data);
 }
 
-#endif
-
 // -------------------------------------------------------------------------
 // Helper functions