Skip to content
This repository
Browse code

Clean old function

  • Loading branch information...
commit 424117f51d63ecac5023384b7ae826ef36c32db4 1 parent ef78ca2
SALLEYRON Julien Juliens authored

Showing 1 changed file with 0 additions and 80 deletions. Show diff stats Hide diff stats

  1. +0 80 aop.c
80 aop.c
@@ -487,88 +487,8 @@ static void test_write_pointcut_and_execute(int current_pointcut_index, zval *ob
487 487
488 488 }
489 489
490   -static void test_write_pointcut_and_execute_old(int current_pointcut_index, zval *object, zval *member, zval *value AOP_KEY_D) {
491   - zval *temp;
492   - zend_class_entry *scope;
493   - TSRMLS_FETCH();
494   - if (current_pointcut_index==aop_g(count_write_property)) {
495   - scope = EG(scope);
496   - temp = EG(This);
497   - EG(scope) = Z_OBJCE_P(object);
498   - EG(This) = object;
499   - zend_std_write_property(object,member,value AOP_KEY_C TSRMLS_CC);
500   - EG(This) = temp;
501   - EG(scope) = scope;
502   - } else {
503   - pointcut *current_pc = aop_g(property_pointcuts_write)[current_pointcut_index];
504   - zend_class_entry *ce = NULL;
505   - char *current_class_name;
506   - AopTriggeredJoinpoint_object *obj;
507   - zval *aop_object;
508   - zval *tmp_member;
509   - if (Z_TYPE_P(member)!=IS_STRING ) {
510   - ALLOC_ZVAL(tmp_member);
511   - *tmp_member = *member;
512   - INIT_PZVAL(tmp_member);
513   - zval_copy_ctor(tmp_member);
514   - convert_to_string(tmp_member);
515   - member = tmp_member;
516   - #if ZEND_MODULE_API_NO >= 20100525
517   - key = NULL;
518   - #endif
519   - }
520   -
521   - if (current_pc->method[0]!='*') {
522   - if (!strcmp_with_joker_case(current_pc->method,Z_STRVAL_P(member), 1)) {
523   - test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
524   - return ;
525   - }
526   - }
527   - ce = Z_OBJCE_P(object);
528   - //Scope
529   - if (current_pc->static_state != 2 || current_pc->scope!=0) {
530   - if (!test_property_scope(current_pc, ce, member AOP_KEY_C)) {
531   - test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
532   - return ;
533   - }
534   - }
535   - else {
536   - }
537 490
538 491
539   - current_class_name = (char *)ce->name;
540   -
541   - if (!pointcut_match_zend_class_entry(current_pc, ce)) {
542   - test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
543   - return ;
544   - }
545   - aop_object = get_aopTriggeringJoinpoint();
546   - obj = (AopTriggeredJoinpoint_object *)zend_object_store_get_object(aop_object TSRMLS_CC);
547   - obj->current_pointcut = current_pc;
548   - obj->current_pointcut_index = current_pointcut_index;
549   - obj->object = object;
550   - obj->member = member;
551   - obj->value = value;
552   - #if ZEND_MODULE_API_NO >= 20100525
553   - obj->key = key;
554   - #endif
555   -
556   - if (current_pc->kind_of_advice & AOP_KIND_BEFORE) {
557   - execute_pointcut (current_pc, aop_object);
558   - }
559   - if (current_pc->kind_of_advice & AOP_KIND_AROUND) {
560   - execute_pointcut (current_pc, aop_object);
561   - } else {
562   - value = obj->value;
563   - test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
564   - }
565   - if (current_pc->kind_of_advice & AOP_KIND_AFTER) {
566   - execute_pointcut (current_pc, aop_object);
567   - }
568   - Z_DELREF_P(aop_object);
569   - }
570   -}
571   -
572 492 static void execute_pointcut (pointcut *pointcut_to_execute, zval *arg) {
573 493 TSRMLS_FETCH();
574 494 zval *args[1], *zret_ptr;

0 comments on commit 424117f

Please sign in to comment.
Something went wrong with that request. Please try again.