Skip to content

Commit

Permalink
pecl-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jun 6, 2024
1 parent df4f664 commit 97d91e3
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 123 deletions.
3 changes: 3 additions & 0 deletions ext-src/php_swoole.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,9 @@ PHP_MINIT_FUNCTION(swoole) {
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_PROTOCOL_ERROR", SW_ERROR_PROTOCOL_ERROR);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_WRONG_OPERATION", SW_ERROR_WRONG_OPERATION);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_PHP_RUNTIME_NOTICE", SW_ERROR_PHP_RUNTIME_NOTICE);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FOR_TEST", SW_ERROR_FOR_TEST);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_UNDEFINED_BEHAVIOR", SW_ERROR_UNDEFINED_BEHAVIOR);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_NOT_THREAD_SAFETY", SW_ERROR_NOT_THREAD_SAFETY);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FILE_NOT_EXIST", SW_ERROR_FILE_NOT_EXIST);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FILE_TOO_LARGE", SW_ERROR_FILE_TOO_LARGE);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FILE_EMPTY", SW_ERROR_FILE_EMPTY);
Expand Down
206 changes: 89 additions & 117 deletions package.xml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/core/error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ const char *swoole_strerror(int code) {
return "Wrong operation";
case SW_ERROR_PHP_RUNTIME_NOTICE:
return "PHP runtime notice";
case SW_ERROR_FOR_TEST:
return "For test";
case SW_ERROR_UNDEFINED_BEHAVIOR:
return "Undefined behavior";
case SW_ERROR_NOT_THREAD_SAFETY:
return "Not thread safety";
case SW_ERROR_FILE_NOT_EXIST:
return "File not exist";
case SW_ERROR_FILE_TOO_LARGE:
Expand Down
1 change: 0 additions & 1 deletion tests/swoole_thread/add_update.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ Assert::eq($m2[INDEX_EXISTS], $value);

?>
--EXPECTF--

1 change: 0 additions & 1 deletion tests/swoole_thread/atomic_ctor.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ $tm->run();
--EXPECTF--
child thread
main thread

1 change: 0 additions & 1 deletion tests/swoole_thread/incr.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@ Assert::eq($l->incr(0, $add_dval), intval($add_dval));

?>
--EXPECTF--

1 change: 0 additions & 1 deletion tests/swoole_thread/info.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ $tm->childFunc = function () {
$tm->run();
?>
--EXPECTF--

1 change: 0 additions & 1 deletion tests/swoole_thread/lock.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ $tm->run();
--EXPECTF--
child thread
main thread

1 change: 0 additions & 1 deletion tests/swoole_thread/queue.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ if (empty($args)) {
}
?>
--EXPECTF--

0 comments on commit 97d91e3

Please sign in to comment.