Skip to content

Commit

Permalink
Updated annotation.c
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Oct 5, 2013
1 parent 42cdf58 commit 3b4925e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions ext/annotations/annotation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 3b4925e

Please sign in to comment.