diff --git a/ext/annotations/annotation.c b/ext/annotations/annotation.c index 90cdde909c1..07b583a5530 100644 --- a/ext/annotations/annotation.c +++ b/ext/annotations/annotation.c @@ -171,30 +171,37 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression){ PHALCON_OBS_VAR(value); phalcon_array_fetch_string(&value, expr, SL("value"), PH_NOISY); RETURN_CCTOR(value); + /* no break because the macro expands to return */ case 302: PHALCON_OBS_NVAR(value); phalcon_array_fetch_string(&value, expr, SL("value"), PH_NOISY); RETURN_CCTOR(value); + /* no break because the macro expands to return */ case 303: PHALCON_OBS_NVAR(value); phalcon_array_fetch_string(&value, expr, SL("value"), PH_NOISY); RETURN_CCTOR(value); + /* no break because the macro expands to return */ case 307: PHALCON_OBS_NVAR(value); phalcon_array_fetch_string(&value, expr, SL("value"), PH_NOISY); RETURN_CCTOR(value); + /* no break because the macro expands to return */ case 304: RETURN_MM_NULL(); + /* no break because the macro expands to return */ case 305: RETURN_MM_FALSE; + /* no break because the macro expands to return */ case 306: RETURN_MM_TRUE; + /* no break because the macro expands to return */ case 308: PHALCON_INIT_VAR(array_value); @@ -226,12 +233,14 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getExpression){ } RETURN_CTOR(array_value); + /* no break because the macro expands to return */ case 300: object_init_ex(return_value, phalcon_annotations_annotation_ce); phalcon_call_method_p1_noret(return_value, "__construct", expr); RETURN_MM(); + /* no break because the macro expands to return */ default: PHALCON_INIT_VAR(exception_message); @@ -273,16 +282,15 @@ PHP_METHOD(Phalcon_Annotations_Annotation, getArguments){ */ PHP_METHOD(Phalcon_Annotations_Annotation, numberArguments){ - zval *arguments, *number; + zval *arguments; PHALCON_MM_GROW(); PHALCON_OBS_VAR(arguments); phalcon_read_property_this(&arguments, this_ptr, SL("_arguments"), PH_NOISY_CC); - PHALCON_INIT_VAR(number); - phalcon_fast_count(number, arguments TSRMLS_CC); - RETURN_NCTOR(number); + phalcon_fast_count(return_value, arguments TSRMLS_CC); + PHALCON_MM_RESTORE(); } /**