Skip to content

Commit

Permalink
Fix async error (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamsxin authored May 1, 2019
1 parent be6e4b7 commit 7437ae3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions ext/async/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,18 +1159,18 @@ static ZEND_METHOD(PipeServer, accept)
RETURN_OBJ(&pipe->std);
}

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_pipe_server_bind, 0, 1, Phalcon\\Async\\Network\\PipeServer, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_pipe_server_bind, 0, 1, Phalcon\\Async\\Network\\Pipe\\Server, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, ipc, _IS_BOOL, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_pipe_server_listen, 0, 1, Phalcon\\Async\\Network\\PipeServer, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_pipe_server_listen, 0, 1, Phalcon\\Async\\Network\\Pipe\\Server, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, ipc, _IS_BOOL, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_pipe_server_import, 0, 1, Phalcon\\Async\\Network\\PipeServer, 0)
ZEND_ARG_OBJ_INFO(0, pipe, Phalcon\\Async\\Network\\PipeServer, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_pipe_server_import, 0, 1, Phalcon\\Async\\Network\\Pipe\\Server, 0)
ZEND_ARG_OBJ_INFO(0, pipe, Phalcon\\Async\\Network\\Pipe\\Server, 0)
ZEND_ARG_TYPE_INFO(0, ipc, _IS_BOOL, 1)
ZEND_END_ARG_INFO()

Expand Down
26 changes: 13 additions & 13 deletions ext/async/process/builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,47 +583,47 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_fork, 0, 1, Phalc
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_shell, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_shell, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_ARG_TYPE_INFO(0, interactive, _IS_BOOL, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_cwd, 0, 1, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_cwd, 0, 1, Phalcon\\Async\\Process\\Builder, 0)
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_env, 0, 1, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_env, 0, 1, Phalcon\\Async\\Process\\Builder, 0)
ZEND_ARG_TYPE_INFO(0, env, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, inherit, _IS_BOOL, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdin_pipe, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdin_pipe, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdin_inherited, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdin_inherited, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_ARG_TYPE_INFO(0, fd, IS_LONG, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_without_stdin, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_without_stdin, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdout_pipe, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdout_pipe, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdout_inherited, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stdout_inherited, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_ARG_TYPE_INFO(0, fd, IS_LONG, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_without_stdout, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_without_stdout, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stderr_pipe, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stderr_pipe, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stderr_inherited, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_with_stderr_inherited, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_ARG_TYPE_INFO(0, fd, IS_LONG, 1)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_without_stderr, 0, 0, Phalcon\\Async\\Process\\ProcessBuilder, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_without_stderr, 0, 0, Phalcon\\Async\\Process\\Builder, 0)
ZEND_END_ARG_INFO()


Expand All @@ -637,7 +637,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_process_builder_execute, 0, 0, I
ZEND_END_ARG_INFO()
#endif

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_start, 0, 0, Phalcon\\Async\\Process\\Process, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_process_builder_start, 0, 0, Phalcon\\Async\\Process, 0)
ZEND_ARG_VARIADIC_TYPE_INFO(0, arguments, IS_STRING, 0)
ZEND_END_ARG_INFO()

Expand Down
4 changes: 3 additions & 1 deletion ext/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,9 @@ aop.c"
async_use_asm="no"
fi

AC_MSG_CHECKING(checking php version >= 7.1)
if test "$PHP_UV" = "yes" && test "$phalcon_php_version" -ge "7001000"; then
AC_MSG_RESULT(yes)
if test "$async_use_asm" = 'yes'; then
async_source_files="async/fiber/asm.c async/thirdparty/boost/asm/make_${async_asm_file} async/thirdparty/boost/asm/jump_${async_asm_file}"
elif test "$async_use_ucontext" = 'yes'; then
Expand All @@ -1337,8 +1339,8 @@ aop.c"
async_use_ucontext="no"
fi

AC_MSG_CHECKING([checking libuv support])
if test "$async_use_ucontext" = "yes" && test "$PHP_SOCKETS" = "yes"; then
AC_MSG_CHECKING(for static libuv)
DIR="${srcdir}/async/thirdparty"
if test "$async_os" = 'LINUX' && test ! -s "${DIR}/lib/libuv.a"; then
AC_MSG_RESULT(no)
Expand Down

0 comments on commit 7437ae3

Please sign in to comment.