Lines Matching refs:retval
255 zval *object, zval *method_name, zval *retval, uint32_t param_count, zval *params) in call_method_if_exists() argument
258 Z_OBJ_P(object), Z_STR_P(method_name), retval, param_count, params); in call_method_if_exists()
566 zval retval; in php_userstreamop_write() local
578 call_result = call_method_if_exists(&us->object, &func_name, &retval, 1, args); in php_userstreamop_write()
586 if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF) { in php_userstreamop_write()
587 if (Z_TYPE(retval) == IS_FALSE) { in php_userstreamop_write()
590 convert_to_long(&retval); in php_userstreamop_write()
591 didwrite = Z_LVAL(retval); in php_userstreamop_write()
607 zval_ptr_dtor(&retval); in php_userstreamop_write()
615 zval retval; in php_userstreamop_read() local
627 call_result = call_method_if_exists(&us->object, &func_name, &retval, 1, args); in php_userstreamop_read()
642 if (Z_TYPE(retval) == IS_FALSE) { in php_userstreamop_read()
646 if (!try_convert_to_string(&retval)) { in php_userstreamop_read()
647 zval_ptr_dtor(&retval); in php_userstreamop_read()
651 didread = Z_STRLEN(retval); in php_userstreamop_read()
658 memcpy(buf, Z_STRVAL(retval), didread); in php_userstreamop_read()
661 zval_ptr_dtor(&retval); in php_userstreamop_read()
662 ZVAL_UNDEF(&retval); in php_userstreamop_read()
667 call_result = call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_read()
675 if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF && zval_is_true(&retval)) { in php_userstreamop_read()
685 zval_ptr_dtor(&retval); in php_userstreamop_read()
693 zval retval; in php_userstreamop_close() local
700 call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_close()
702 zval_ptr_dtor(&retval); in php_userstreamop_close()
716 zval retval; in php_userstreamop_flush() local
724 call_result = call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_flush()
726 if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF && zval_is_true(&retval)) in php_userstreamop_flush()
731 zval_ptr_dtor(&retval); in php_userstreamop_flush()
740 zval retval; in php_userstreamop_seek() local
752 call_result = call_method_if_exists(&us->object, &func_name, &retval, 2, args); in php_userstreamop_seek()
763 zval_ptr_dtor(&retval); in php_userstreamop_seek()
766 } else if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF && zval_is_true(&retval)) { in php_userstreamop_seek()
772 zval_ptr_dtor(&retval); in php_userstreamop_seek()
773 ZVAL_UNDEF(&retval); in php_userstreamop_seek()
782 call_result = call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_seek()
784 if (call_result == SUCCESS && Z_TYPE(retval) == IS_LONG) { in php_userstreamop_seek()
785 *newoffs = Z_LVAL(retval); in php_userstreamop_seek()
794 zval_ptr_dtor(&retval); in php_userstreamop_seek()
840 zval retval; in php_userstreamop_stat() local
847 call_result = call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_stat()
849 if (call_result == SUCCESS && Z_TYPE(retval) == IS_ARRAY) { in php_userstreamop_stat()
850 statbuf_from_array(&retval, ssb); in php_userstreamop_stat()
859 zval_ptr_dtor(&retval); in php_userstreamop_stat()
868 zval retval; in php_userstreamop_set_option() local
877 call_result = call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_set_option()
878 if (call_result == SUCCESS && (Z_TYPE(retval) == IS_FALSE || Z_TYPE(retval) == IS_TRUE)) { in php_userstreamop_set_option()
879 ret = zval_is_true(&retval) ? PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK; in php_userstreamop_set_option()
886 zval_ptr_dtor(&retval); in php_userstreamop_set_option()
911 call_result = call_method_if_exists(&us->object, &func_name, &retval, 1, args); in php_userstreamop_set_option()
913 if (call_result == SUCCESS && (Z_TYPE(retval) == IS_FALSE || Z_TYPE(retval) == IS_TRUE)) { in php_userstreamop_set_option()
914 ret = (Z_TYPE(retval) == IS_FALSE); in php_userstreamop_set_option()
926 zval_ptr_dtor(&retval); in php_userstreamop_set_option()
946 call_result = call_method_if_exists(&us->object, &func_name, &retval, 1, args); in php_userstreamop_set_option()
947 if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF) { in php_userstreamop_set_option()
948 if (Z_TYPE(retval) == IS_FALSE || Z_TYPE(retval) == IS_TRUE) { in php_userstreamop_set_option()
949 ret = (Z_TYPE(retval) == IS_TRUE) ? PHP_STREAM_OPTION_RETURN_OK : in php_userstreamop_set_option()
961 zval_ptr_dtor(&retval); in php_userstreamop_set_option()
1006 call_result = call_method_if_exists(&us->object, &func_name, &retval, 3, args); in php_userstreamop_set_option()
1012 } else if (zend_is_true(&retval)) { in php_userstreamop_set_option()
1018 zval_ptr_dtor(&retval); in php_userstreamop_set_option()
1313 zval retval; in php_userstreamop_readdir() local
1325 call_result = call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_readdir()
1327 if (call_result == SUCCESS && Z_TYPE(retval) != IS_FALSE && Z_TYPE(retval) != IS_TRUE) { in php_userstreamop_readdir()
1328 convert_to_string(&retval); in php_userstreamop_readdir()
1329 PHP_STRLCPY(ent->d_name, Z_STRVAL(retval), sizeof(ent->d_name), Z_STRLEN(retval)); in php_userstreamop_readdir()
1338 zval_ptr_dtor(&retval); in php_userstreamop_readdir()
1347 zval retval; in php_userstreamop_closedir() local
1354 call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_closedir()
1356 zval_ptr_dtor(&retval); in php_userstreamop_closedir()
1369 zval retval; in php_userstreamop_rewinddir() local
1374 call_method_if_exists(&us->object, &func_name, &retval, 0, NULL); in php_userstreamop_rewinddir()
1376 zval_ptr_dtor(&retval); in php_userstreamop_rewinddir()
1387 zval retval; in php_userstreamop_cast() local
1406 call_result = call_method_if_exists(&us->object, &func_name, &retval, 1, args); in php_userstreamop_cast()
1416 if (!zend_is_true(&retval)) { in php_userstreamop_cast()
1419 php_stream_from_zval_no_verify(intstream, &retval); in php_userstreamop_cast()
1438 zval_ptr_dtor(&retval); in php_userstreamop_cast()