diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-09-10 02:51:23 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-09-10 02:51:23 +0300 |
commit | c174e4cd73cd16ce0b52ab66a90e97c476a444fe (patch) | |
tree | e844a3d8bbc5c58960e5859eaf2d5495fc991983 /sapi/phpdbg/phpdbg_wait.c | |
parent | 2ea18cd43165f791a5b0170795a790d2c0198ec8 (diff) | |
download | php-git-c174e4cd73cd16ce0b52ab66a90e97c476a444fe.tar.gz |
Change array sorting implementation to avoid two level callbacks system.
Simplify zval comparion API.
Diffstat (limited to 'sapi/phpdbg/phpdbg_wait.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_wait.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c index 856f6e2b3e..cee926f579 100644 --- a/sapi/phpdbg/phpdbg_wait.c +++ b/sapi/phpdbg/phpdbg_wait.c @@ -50,7 +50,7 @@ typedef struct { static int phpdbg_array_data_compare(const void *a, const void *b) { Bucket *f, *s; - zval result; + int result; zval *first, *second; f = *((Bucket **) a); @@ -59,13 +59,11 @@ static int phpdbg_array_data_compare(const void *a, const void *b) { first = &f->val; second = &s->val; - if (string_compare_function(&result, first, second) == FAILURE) { - return 0; - } + result = string_compare_function(first, second); - if (Z_LVAL(result) < 0) { + if (result < 0) { return -1; - } else if (Z_LVAL(result) > 0) { + } else if (result > 0) { return 1; } |