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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
diff -ru a/memcache_pool.c b/memcache_pool.c
--- a/memcache_pool.c
+++ b/memcache_pool.c
@@ -40,7 +40,7 @@
ZEND_DECLARE_MODULE_GLOBALS(memcache)
-inline void mmc_buffer_alloc(mmc_buffer_t *buffer, unsigned int size) /*
+void mmc_buffer_alloc(mmc_buffer_t *buffer, unsigned int size) /*
ensures space for an additional size bytes {{{ */
{
register size_t newlen;
@@ -48,7 +48,7 @@
}
/* }}} */
-inline void mmc_buffer_free(mmc_buffer_t *buffer) /* {{{ */
+void mmc_buffer_free(mmc_buffer_t *buffer) /* {{{ */
{
if (buffer->value.c != NULL) {
smart_str_free(&(buffer->value));
@@ -1677,7 +1677,7 @@
}
/* }}} */
-inline int mmc_prepare_key_ex(const char *key, unsigned int key_len, char *result, unsigned int *result_len) /* {{{ */
+int mmc_prepare_key_ex(const char *key, unsigned int key_len, char *result, unsigned int *result_len) /* {{{ */
{
unsigned int i;
if (key_len == 0) {
@@ -1695,7 +1695,7 @@
}
/* }}} */
-inline int mmc_prepare_key(zval *key, char *result, unsigned int *result_len) /* {{{ */
+int mmc_prepare_key(zval *key, char *result, unsigned int *result_len) /* {{{ */
{
if (Z_TYPE_P(key) == IS_STRING) {
return mmc_prepare_key_ex(Z_STRVAL_P(key), Z_STRLEN_P(key), result, result_len);
diff -ru a/memcache_pool.h b/memcache_pool.h
--- a/memcache_pool.h
+++ b/memcache_pool.h
@@ -129,8 +129,8 @@
#define mmc_buffer_release(b) memset((b), 0, sizeof(*(b)))
#define mmc_buffer_reset(b) (b)->value.len = (b)->idx = 0
-inline void mmc_buffer_alloc(mmc_buffer_t *, unsigned int);
-inline void mmc_buffer_free(mmc_buffer_t *);
+void mmc_buffer_alloc(mmc_buffer_t *, unsigned int);
+void mmc_buffer_free(mmc_buffer_t *);
/* stream handlers */
typedef struct mmc_stream mmc_stream_t;
@@ -385,8 +385,8 @@
double timeval_to_double(struct timeval tv);
struct timeval double_to_timeval(double sec);
-inline int mmc_prepare_key_ex(const char *, unsigned int, char *, unsigned int *);
-inline int mmc_prepare_key(zval *, char *, unsigned int *);
+int mmc_prepare_key_ex(const char *, unsigned int, char *, unsigned int *);
+int mmc_prepare_key(zval *, char *, unsigned int *);
#define mmc_str_left(h, n, hlen, nlen) ((hlen) >= (nlen) ? memcmp((h), (n), (nlen)) == 0 : 0)
diff -ru a/memcache_queue.c b/memcache_queue.c
--- a/memcache_queue.c
+++ b/memcache_queue.c
@@ -26,7 +26,7 @@
#include "php.h"
#include "memcache_queue.h"
-MMC_QUEUE_INLINE void mmc_queue_push(mmc_queue_t *queue, void *ptr) {
+void mmc_queue_push(mmc_queue_t *queue, void *ptr) {
if (mmc_queue_contains(queue, ptr)) return;
if (queue->len >= queue->alloc) {
@@ -53,7 +53,7 @@
queue->len++;
}
-MMC_QUEUE_INLINE void *mmc_queue_pop(mmc_queue_t *queue) {
+void *mmc_queue_pop(mmc_queue_t *queue) {
if (queue->len) {
void *ptr;
@@ -73,7 +73,7 @@
return NULL;
}
-MMC_QUEUE_INLINE int mmc_queue_contains(mmc_queue_t *queue, void *ptr) {
+int mmc_queue_contains(mmc_queue_t *queue, void *ptr) {
if (queue != NULL) {
int i;
@@ -87,14 +87,14 @@
return 0;
}
-MMC_QUEUE_INLINE void mmc_queue_free(mmc_queue_t *queue) {
+void mmc_queue_free(mmc_queue_t *queue) {
if (queue->items != NULL) {
efree(queue->items);
}
memset(queue, 0, sizeof(*queue));
}
-MMC_QUEUE_INLINE void mmc_queue_copy(mmc_queue_t *target, mmc_queue_t *source) {
+void mmc_queue_copy(mmc_queue_t *target, mmc_queue_t *source) {
if (target->alloc != source->alloc) {
target->alloc = source->alloc;
target->items = erealloc(target->items, sizeof(*target->items) * target->alloc);
@@ -106,7 +106,7 @@
target->len = source->len;
}
-MMC_QUEUE_INLINE void mmc_queue_remove(mmc_queue_t *queue, void *ptr) {
+void mmc_queue_remove(mmc_queue_t *queue, void *ptr) {
void *item;
mmc_queue_t original = *queue;
mmc_queue_release(queue);
diff -ru a/memcache_queue.h b/memcache_queue.h
--- a/memcache_queue.h
+++ b/memcache_queue.h
@@ -43,12 +43,12 @@
#define MMC_QUEUE_INLINE inline
#endif
-MMC_QUEUE_INLINE void mmc_queue_push(mmc_queue_t *, void *);
-MMC_QUEUE_INLINE void *mmc_queue_pop(mmc_queue_t *);
-MMC_QUEUE_INLINE int mmc_queue_contains(mmc_queue_t *, void *);
-MMC_QUEUE_INLINE void mmc_queue_free(mmc_queue_t *);
-MMC_QUEUE_INLINE void mmc_queue_copy(mmc_queue_t *, mmc_queue_t *);
-MMC_QUEUE_INLINE void mmc_queue_remove(mmc_queue_t *, void *);
+extern void mmc_queue_push(mmc_queue_t *, void *);
+extern void *mmc_queue_pop(mmc_queue_t *);
+extern int mmc_queue_contains(mmc_queue_t *, void *);
+extern void mmc_queue_free(mmc_queue_t *);
+extern void mmc_queue_copy(mmc_queue_t *, mmc_queue_t *);
+extern void mmc_queue_remove(mmc_queue_t *, void *);
#endif /*MEMCACHE_QUEUE_H_*/
|