summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-24 11:34:01 +0000
committerMarcus Boerger <helly@php.net>2003-08-24 11:34:01 +0000
commit96d4ac7a3fc9ea44342af24724a34ca76679e0b0 (patch)
tree4b26c2ef0a2200a9bac3070ea2c2c4cca2ca6801 /Zend
parent418a7f980c93aed7622d59b7309b5c35fc4206a6 (diff)
downloadphp-git-96d4ac7a3fc9ea44342af24724a34ca76679e0b0.tar.gz
zend_parse_parameters 'O' works the way we need here
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_reflection_api.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index 7074c76cf4..5f4683d5dd 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -490,18 +490,10 @@ ZEND_METHOD(reflection, export)
int result;
zend_bool return_output = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|b", &object, &return_output) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &object, reflector_ptr, &return_output) == FAILURE) {
return;
}
- /* Verify we are being passed a correct object. This is effectively
- * the C counterpart of type hinting. We cannot use "O" to zend_parse_parameters
- * as "O" only checks for inheritance, not for interfaces. */
- if (!instanceof_function(Z_OBJCE_P(object), reflector_ptr TSRMLS_CC)) {
- _DO_THROW("Argument must implement interface reflector");
- /* Returns from this function */
- }
-
/* Invoke the toString() method */
MAKE_STD_ZVAL(fname);
ZVAL_STRINGL(fname, "tostring", sizeof("tostring") - 1, 1);
@@ -1710,15 +1702,10 @@ ZEND_METHOD(reflection_class, issubclassof)
METHOD_NOTSTATIC;
GET_REFLECTION_OBJECT_PTR(ce);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &object) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", reflection_class_ptr, &object) == FAILURE) {
return;
}
- if (!instanceof_function(Z_OBJCE_P(object), reflection_class_ptr TSRMLS_CC)) {
- _DO_THROW("Argument must be an instance of Reflection_Class");
- /* Returns from this function */
- }
-
argument = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC);
if (argument == NULL || argument->ptr == NULL) {
zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object");