Skip to content

Commit a437602

Browse files
committed
Reorganise headers a bit, include everything in the private header
1 parent d9d5ce8 commit a437602

8 files changed

+24
-52
lines changed

config.m4

-2
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,6 @@ if test "$PHP_MEMCACHED" != "no"; then
479479
[
480480
PHP_ADD_EXTENSION_DEP(memcached, spl, true)
481481
])
482-
483482
fi
484-
485483
fi
486484

php_libmemcached_compat.c

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
#include "php_memcached.h"
18+
#include "php_memcached_private.h"
1719
#include "php_libmemcached_compat.h"
1820

1921
memcached_st *php_memc_create_str (const char *str, size_t str_len)

php_libmemcached_compat.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
/* this is the version(s) we support */
2121
#include <libmemcached/memcached.h>
2222

23-
#ifdef HAVE_CONFIG_H
24-
#include "config.h"
25-
#endif
26-
2723
memcached_st *php_memc_create_str (const char *str, size_t str_len);
2824

2925
#ifndef HAVE_LIBMEMCACHED_SERVER_TEMPORARILY_MARKER_DISABLED

php_memcached.c

-22
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,6 @@
2222
* - ability to set binary protocol for sessions
2323
*/
2424

25-
#ifdef HAVE_CONFIG_H
26-
#include "config.h"
27-
#endif
28-
29-
#include <stdlib.h>
30-
#include <string.h>
31-
#include <php.h>
32-
#include <php_main.h>
33-
34-
#ifdef ZTS
35-
#include "TSRM.h"
36-
#endif
37-
38-
#include <php_ini.h>
39-
#include <SAPI.h>
40-
#include <ext/standard/info.h>
41-
#include <zend_extensions.h>
42-
#include <zend_exceptions.h>
43-
#include <ext/standard/php_smart_str.h>
44-
#include <ext/standard/php_var.h>
45-
#include <ext/standard/basic_functions.h>
46-
4725
#include "php_memcached.h"
4826
#include "php_memcached_private.h"
4927
#include "php_memcached_server.h"

php_memcached.h

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define PHP_MEMCACHED_H
2121

2222
#include "php.h"
23+
#include "main/php_config.h"
2324

2425
#ifdef HAVE_CONFIG_H
2526
# include "config.h"

php_memcached_private.h

+21-1
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,32 @@
1919
#ifndef PHP_MEMCACHED_PRIVATE_H
2020
#define PHP_MEMCACHED_PRIVATE_H
2121

22-
#include "php_libmemcached_compat.h"
22+
#include "main/php_config.h"
2323

2424
#ifdef HAVE_CONFIG_H
2525
# include "config.h"
2626
#endif
2727

28+
#include "php_libmemcached_compat.h"
29+
30+
#include <stdlib.h>
31+
#include <string.h>
32+
#include <php.h>
33+
#include <php_main.h>
34+
35+
#ifdef ZTS
36+
# include "TSRM.h"
37+
#endif
38+
39+
#include <php_ini.h>
40+
#include <SAPI.h>
41+
#include <ext/standard/info.h>
42+
#include <zend_extensions.h>
43+
#include <zend_exceptions.h>
44+
#include <ext/standard/php_smart_str.h>
45+
#include <ext/standard/php_var.h>
46+
#include <ext/standard/basic_functions.h>
47+
2848
#ifdef PHP_WIN32
2949
# include "win32/php_stdint.h"
3050
#else

php_memcached_server.c

-6
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17-
#ifdef HAVE_CONFIG_H
18-
#include "config.h"
19-
#endif
20-
21-
#include <php.h>
2217
#include "php_memcached.h"
2318
#include "php_memcached_private.h"
2419
#include "php_memcached_server.h"
25-
#include "php_libmemcached_compat.h"
2620

2721
#include <event2/listener.h>
2822

php_memcached_session.c

-17
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,6 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17-
#include <stdlib.h>
18-
#include <string.h>
19-
#include <php.h>
20-
#include <php_main.h>
21-
22-
#ifdef ZTS
23-
#include "TSRM.h"
24-
#endif
25-
26-
#include <php_ini.h>
27-
#include <SAPI.h>
28-
#include <ext/standard/info.h>
29-
#include <zend_extensions.h>
30-
#include <zend_exceptions.h>
31-
#include <ext/standard/php_smart_str.h>
32-
#include <ext/standard/php_var.h>
33-
3417
#include "php_memcached.h"
3518
#include "php_memcached_private.h"
3619
#include "php_memcached_session.h"

0 commit comments

Comments
 (0)