Skip to content

Commit 5388b8f

Browse files
committed
Reorganized include files.
1 parent 523691b commit 5388b8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+146
-141
lines changed

include/async_buffer.h renamed to async/buffer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |

include/async_event.h renamed to async/event.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |

include/async_fiber.h renamed to async/fiber.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |

include/async_helper.h renamed to async/helper.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |

include/async_pipe.h renamed to async/pipe.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
1919
#ifndef ASYNC_PIPE_H
2020
#define ASYNC_PIPE_H
2121

22-
#include "async_stream.h"
22+
#include "socket.h"
2323

2424
#define ASYNC_PIPE_FLAG_IPC 1
2525
#define ASYNC_PIPE_FLAG_LAZY (1 << 1)

include/async_process.h renamed to async/process.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |

include/async_socket.h renamed to async/socket.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -19,7 +19,7 @@
1919
#ifndef ASYNC_SOCKET_H
2020
#define ASYNC_SOCKET_H
2121

22-
#include "async_stream.h"
22+
#include "stream.h"
2323

2424
static zend_always_inline int async_socket_addr_size(const struct sockaddr *addr)
2525
{

include/async_ssl.h renamed to async/ssl.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -19,8 +19,6 @@
1919
#ifndef ASYNC_SSL_H
2020
#define ASYNC_SSL_H
2121

22-
#include "async_buffer.h"
23-
2422
#define ASYNC_SSL_MODE_SERVER 0
2523
#define ASYNC_SSL_MODE_CLIENT 1
2624

include/async_stack.h renamed to async/stack.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |

include/async_stream.h renamed to async/stream.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -19,8 +19,8 @@
1919
#ifndef ASYNC_STREAM_H
2020
#define ASYNC_STREAM_H
2121

22-
#include "async_buffer.h"
23-
#include "async_ssl.h"
22+
#include "buffer.h"
23+
#include "ssl.h"
2424

2525
#define ASYNC_STREAM_EOF 1
2626
#define ASYNC_STREAM_CLOSED (1 << 1)

include/async_xp.h renamed to async/xp.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -19,9 +19,9 @@
1919
#ifndef ASYNC_XP_H
2020
#define ASYNC_XP_H
2121

22-
#include "async_ssl.h"
23-
#include "async_stream.h"
24-
#include "async_socket.h"
22+
#include "ssl.h"
23+
#include "stream.h"
24+
#include "socket.h"
2525

2626
#define ASYNC_XP_SOCKET_REPORT_NETWORK_ERROR(code, xparam) do { \
2727
const char *message; \

config.m4

-2
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,4 @@ if test "$PHP_ASYNC" != "no"; then
332332
PHP_SUBST(ASYNC_SHARED_LIBADD)
333333
PHP_ADD_MAKEFILE_FRAGMENT
334334

335-
PHP_INSTALL_HEADERS([ext/async], [config.h thirdparty/libuv/include/*.h])
336-
337335
fi

config.w32

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ X64 = toolset_is_64();
55
if (PHP_ASYNC != 'no') {
66
AC_DEFINE('HAVE_ASYNC', 1, 'async support enabled');
77

8-
ADD_FLAG('CFLAGS', '/I ' + configure_module_dirname);
9-
ADD_FLAG('CFLAGS', '/I ' + configure_module_dirname + '\\include');
10-
8+
ADD_FLAG('CFLAGS', '/I ' + configure_module_dirname);
119
ADD_FLAG('LDFLAGS', '/NODEFAULTLIB:LIBCMT');
1210

1311
var async_source_files = [

examples/tcp/client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+----------------------------------------------------------------------+
55
| PHP Version 7 |
66
+----------------------------------------------------------------------+
7-
| Copyright (c) 1997-2018 The PHP Group |
7+
| Copyright (c) Martin Schröder 2019 |
88
+----------------------------------------------------------------------+
99
| This source file is subject to version 3.01 of the PHP license, |
1010
| that is bundled with this package in the file LICENSE, and is |

examples/tcp/pair.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+----------------------------------------------------------------------+
55
| PHP Version 7 |
66
+----------------------------------------------------------------------+
7-
| Copyright (c) 1997-2018 The PHP Group |
7+
| Copyright (c) Martin Schröder 2019 |
88
+----------------------------------------------------------------------+
99
| This source file is subject to version 3.01 of the PHP license, |
1010
| that is bundled with this package in the file LICENSE, and is |

examples/tcp/proc.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+----------------------------------------------------------------------+
55
| PHP Version 7 |
66
+----------------------------------------------------------------------+
7-
| Copyright (c) 1997-2018 The PHP Group |
7+
| Copyright (c) Martin Schröder 2019 |
88
+----------------------------------------------------------------------+
99
| This source file is subject to version 3.01 of the PHP license, |
1010
| that is bundled with this package in the file LICENSE, and is |

examples/tcp/server.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+----------------------------------------------------------------------+
55
| PHP Version 7 |
66
+----------------------------------------------------------------------+
7-
| Copyright (c) 1997-2018 The PHP Group |
7+
| Copyright (c) Martin Schröder 2019 |
88
+----------------------------------------------------------------------+
99
| This source file is subject to version 3.01 of the PHP license, |
1010
| that is bundled with this package in the file LICENSE, and is |

examples/tcp/ssl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+----------------------------------------------------------------------+
55
| PHP Version 7 |
66
+----------------------------------------------------------------------+
7-
| Copyright (c) 1997-2018 The PHP Group |
7+
| Copyright (c) Martin Schröder 2019 |
88
+----------------------------------------------------------------------+
99
| This source file is subject to version 3.01 of the PHP license, |
1010
| that is bundled with this package in the file LICENSE, and is |

examples/tcp/worker.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+----------------------------------------------------------------------+
55
| PHP Version 7 |
66
+----------------------------------------------------------------------+
7-
| Copyright (c) 1997-2018 The PHP Group |
7+
| Copyright (c) Martin Schröder 2019 |
88
+----------------------------------------------------------------------+
99
| This source file is subject to version 3.01 of the PHP license, |
1010
| that is bundled with this package in the file LICENSE, and is |

package.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function collect_files($dir, array $include, $role = null)
111111
];
112112
}
113113

114-
$files = array_merge($files, collect_files(__DIR__ . '/include', [
114+
$files = array_merge($files, collect_files(__DIR__ . '/async', [
115115
'h'
116116
]));
117117

package.xml

+14-13
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<email>[email protected]</email>
1111
<active>yes</active>
1212
</lead>
13-
<date>2019-06-29</date>
14-
<time>13:46:54</time>
13+
<date>2019-07-15</date>
14+
<time>12:33:24</time>
1515
<version>
1616
<release>0.3.0</release>
1717
<api>0.3.0</api>
@@ -31,17 +31,17 @@
3131
<file role="src" name="config.w32"/>
3232
<file role="src" name="php_async.c"/>
3333
<file role="src" name="php_async.h"/>
34-
<file role="src" name="include/async_buffer.h"/>
35-
<file role="src" name="include/async_event.h"/>
36-
<file role="src" name="include/async_fiber.h"/>
37-
<file role="src" name="include/async_helper.h"/>
38-
<file role="src" name="include/async_pipe.h"/>
39-
<file role="src" name="include/async_process.h"/>
40-
<file role="src" name="include/async_socket.h"/>
41-
<file role="src" name="include/async_ssl.h"/>
42-
<file role="src" name="include/async_stack.h"/>
43-
<file role="src" name="include/async_stream.h"/>
44-
<file role="src" name="include/async_xp.h"/>
34+
<file role="src" name="async/buffer.h"/>
35+
<file role="src" name="async/event.h"/>
36+
<file role="src" name="async/fiber.h"/>
37+
<file role="src" name="async/helper.h"/>
38+
<file role="src" name="async/pipe.h"/>
39+
<file role="src" name="async/process.h"/>
40+
<file role="src" name="async/socket.h"/>
41+
<file role="src" name="async/ssl.h"/>
42+
<file role="src" name="async/stack.h"/>
43+
<file role="src" name="async/stream.h"/>
44+
<file role="src" name="async/xp.h"/>
4545
<file role="src" name="src/channel.c"/>
4646
<file role="src" name="src/console.c"/>
4747
<file role="src" name="src/context.c"/>
@@ -158,6 +158,7 @@
158158
<file role="src" name="thirdparty/libuv/src/unix/fsevents.c"/>
159159
<file role="src" name="thirdparty/libuv/src/unix/getaddrinfo.c"/>
160160
<file role="src" name="thirdparty/libuv/src/unix/getnameinfo.c"/>
161+
<file role="src" name="thirdparty/libuv/src/unix/haiku.c"/>
161162
<file role="src" name="thirdparty/libuv/src/unix/ibmi.c"/>
162163
<file role="src" name="thirdparty/libuv/src/unix/internal.h"/>
163164
<file role="src" name="thirdparty/libuv/src/unix/kqueue.c"/>

php_async.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -17,9 +17,10 @@
1717
*/
1818

1919
#include "php_async.h"
20-
#include "async_helper.h"
21-
#include "async_fiber.h"
22-
#include "async_ssl.h"
20+
21+
#include "async/helper.h"
22+
#include "async/fiber.h"
23+
#include "async/ssl.h"
2324

2425
#include "SAPI.h"
2526
#include "php_main.h"

php_async.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -98,6 +98,7 @@ typedef size_t uv_buf_size_t;
9898
#include "zend_interfaces.h"
9999
#include "zend_exceptions.h"
100100
#include "zend_closures.h"
101+
#include "zend_inheritance.h"
101102

102103
#ifdef PHP_WIN32
103104
#include "win32/winutil.h"

src/channel.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -17,9 +17,9 @@
1717
*/
1818

1919
#include "php_async.h"
20-
#include "async_helper.h"
2120

22-
#include "zend_inheritance.h"
21+
#include "async/helper.h"
22+
2323
#include "ext/standard/php_mt_rand.h"
2424

2525
ASYNC_API zend_class_entry *async_channel_ce;

src/console.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -17,8 +17,8 @@
1717
*/
1818

1919
#include "php_async.h"
20-
#include "async_stream.h"
21-
#include "zend_inheritance.h"
20+
21+
#include "async/stream.h"
2222

2323
ASYNC_API zend_class_entry *async_readable_pipe_ce;
2424
ASYNC_API zend_class_entry *async_writable_pipe_ce;

src/context.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -17,8 +17,8 @@
1717
*/
1818

1919
#include "php_async.h"
20-
#include "async_fiber.h"
21-
#include "zend_inheritance.h"
20+
21+
#include "async/fiber.h"
2222

2323
ASYNC_API zend_class_entry *async_context_ce;
2424
ASYNC_API zend_class_entry *async_context_var_ce;

src/deferred.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| PHP Version 7 |
44
+----------------------------------------------------------------------+
5-
| Copyright (c) 1997-2018 The PHP Group |
5+
| Copyright (c) Martin Schröder 2019 |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 3.01 of the PHP license, |
88
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,8 @@
1717
*/
1818

1919
#include "php_async.h"
20-
#include "async_helper.h"
20+
21+
#include "async/helper.h"
2122

2223
ASYNC_API zend_class_entry *async_deferred_ce;
2324
ASYNC_API zend_class_entry *async_deferred_awaitable_ce;

0 commit comments

Comments
 (0)