diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-01-14 20:05:38 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-01-14 20:05:38 +0000 |
commit | 1dbf11e1ba1ce80678bba4fc72c8b3102d2f2029 (patch) | |
tree | 478c1e309eb545746ee7e4a06f68ecfba2b24bd8 /ext/hyperwave/hw.c | |
parent | f12a4164a59ce93f34f3719a8ef117eb1a3a9fdc (diff) | |
download | php-git-1dbf11e1ba1ce80678bba4fc72c8b3102d2f2029.tar.gz |
Fixed compile warnings.
Diffstat (limited to 'ext/hyperwave/hw.c')
-rw-r--r-- | ext/hyperwave/hw.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index f05121986f..3cc3f16e7d 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -1349,7 +1349,13 @@ char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) { if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { return NULL; } - HW_FETCH_LINK(arg1); + convert_to_long_ex(arg1); + link = Z_LVAL_PP(arg1); + ptr = (hw_connection *) zend_list_find(link, &type); + if(!ptr || (type != le_socketp && type != le_psocketp)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find file identifier %d", link); + return NULL; + } set_swap(ptr->swap_on); { @@ -2746,7 +2752,7 @@ PHP_FUNCTION(hw_new_document_from_file) int use_include_path=0; hw_document *doc; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { + if (ZEND_NUM_ARGS() != 2 || (zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE)) { WRONG_PARAM_COUNT; } @@ -2872,7 +2878,7 @@ PHP_FUNCTION(hw_document_content) int id, type; hw_document *ptr; - if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, arg1) == FAILURE)) { + if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &arg1) == FAILURE)) { RETURN_FALSE; } |