Skip to content

Commit 97d91e3

Browse files
committed
pecl-fix
1 parent df4f664 commit 97d91e3

File tree

9 files changed

+98
-123
lines changed

9 files changed

+98
-123
lines changed

ext-src/php_swoole.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ PHP_MINIT_FUNCTION(swoole) {
525525
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_PROTOCOL_ERROR", SW_ERROR_PROTOCOL_ERROR);
526526
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_WRONG_OPERATION", SW_ERROR_WRONG_OPERATION);
527527
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_PHP_RUNTIME_NOTICE", SW_ERROR_PHP_RUNTIME_NOTICE);
528+
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FOR_TEST", SW_ERROR_FOR_TEST);
529+
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_UNDEFINED_BEHAVIOR", SW_ERROR_UNDEFINED_BEHAVIOR);
530+
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_NOT_THREAD_SAFETY", SW_ERROR_NOT_THREAD_SAFETY);
528531
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FILE_NOT_EXIST", SW_ERROR_FILE_NOT_EXIST);
529532
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FILE_TOO_LARGE", SW_ERROR_FILE_TOO_LARGE);
530533
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_FILE_EMPTY", SW_ERROR_FILE_EMPTY);

package.xml

Lines changed: 89 additions & 117 deletions
Large diffs are not rendered by default.

src/core/error.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ const char *swoole_strerror(int code) {
5252
return "Wrong operation";
5353
case SW_ERROR_PHP_RUNTIME_NOTICE:
5454
return "PHP runtime notice";
55+
case SW_ERROR_FOR_TEST:
56+
return "For test";
57+
case SW_ERROR_UNDEFINED_BEHAVIOR:
58+
return "Undefined behavior";
59+
case SW_ERROR_NOT_THREAD_SAFETY:
60+
return "Not thread safety";
5561
case SW_ERROR_FILE_NOT_EXIST:
5662
return "File not exist";
5763
case SW_ERROR_FILE_TOO_LARGE:

tests/swoole_thread/add_update.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ Assert::eq($m2[INDEX_EXISTS], $value);
4949

5050
?>
5151
--EXPECTF--
52-

tests/swoole_thread/atomic_ctor.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ $tm->run();
4242
--EXPECTF--
4343
child thread
4444
main thread
45-

tests/swoole_thread/incr.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,3 @@ Assert::eq($l->incr(0, $add_dval), intval($add_dval));
7676

7777
?>
7878
--EXPECTF--
79-

tests/swoole_thread/info.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ $tm->childFunc = function () {
3030
$tm->run();
3131
?>
3232
--EXPECTF--
33-

tests/swoole_thread/lock.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ $tm->run();
3535
--EXPECTF--
3636
child thread
3737
main thread
38-

tests/swoole_thread/queue.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ if (empty($args)) {
6060
}
6161
?>
6262
--EXPECTF--
63-

0 commit comments

Comments
 (0)