Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Clean old function

  • Loading branch information...
commit 424117f51d63ecac5023384b7ae826ef36c32db4 1 parent ef78ca2
@Juliens Juliens authored
Showing with 0 additions and 80 deletions.
  1. +0 −80 aop.c
View
80 aop.c
@@ -487,88 +487,8 @@ static void test_write_pointcut_and_execute(int current_pointcut_index, zval *ob
}
-static void test_write_pointcut_and_execute_old(int current_pointcut_index, zval *object, zval *member, zval *value AOP_KEY_D) {
- zval *temp;
- zend_class_entry *scope;
- TSRMLS_FETCH();
- if (current_pointcut_index==aop_g(count_write_property)) {
- scope = EG(scope);
- temp = EG(This);
- EG(scope) = Z_OBJCE_P(object);
- EG(This) = object;
- zend_std_write_property(object,member,value AOP_KEY_C TSRMLS_CC);
- EG(This) = temp;
- EG(scope) = scope;
- } else {
- pointcut *current_pc = aop_g(property_pointcuts_write)[current_pointcut_index];
- zend_class_entry *ce = NULL;
- char *current_class_name;
- AopTriggeredJoinpoint_object *obj;
- zval *aop_object;
- zval *tmp_member;
- if (Z_TYPE_P(member)!=IS_STRING ) {
- ALLOC_ZVAL(tmp_member);
- *tmp_member = *member;
- INIT_PZVAL(tmp_member);
- zval_copy_ctor(tmp_member);
- convert_to_string(tmp_member);
- member = tmp_member;
- #if ZEND_MODULE_API_NO >= 20100525
- key = NULL;
- #endif
- }
-
- if (current_pc->method[0]!='*') {
- if (!strcmp_with_joker_case(current_pc->method,Z_STRVAL_P(member), 1)) {
- test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
- return ;
- }
- }
- ce = Z_OBJCE_P(object);
- //Scope
- if (current_pc->static_state != 2 || current_pc->scope!=0) {
- if (!test_property_scope(current_pc, ce, member AOP_KEY_C)) {
- test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
- return ;
- }
- }
- else {
- }
- current_class_name = (char *)ce->name;
-
- if (!pointcut_match_zend_class_entry(current_pc, ce)) {
- test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
- return ;
- }
- aop_object = get_aopTriggeringJoinpoint();
- obj = (AopTriggeredJoinpoint_object *)zend_object_store_get_object(aop_object TSRMLS_CC);
- obj->current_pointcut = current_pc;
- obj->current_pointcut_index = current_pointcut_index;
- obj->object = object;
- obj->member = member;
- obj->value = value;
- #if ZEND_MODULE_API_NO >= 20100525
- obj->key = key;
- #endif
-
- if (current_pc->kind_of_advice & AOP_KIND_BEFORE) {
- execute_pointcut (current_pc, aop_object);
- }
- if (current_pc->kind_of_advice & AOP_KIND_AROUND) {
- execute_pointcut (current_pc, aop_object);
- } else {
- value = obj->value;
- test_write_pointcut_and_execute(current_pointcut_index+1, object, member, value AOP_KEY_C);
- }
- if (current_pc->kind_of_advice & AOP_KIND_AFTER) {
- execute_pointcut (current_pc, aop_object);
- }
- Z_DELREF_P(aop_object);
- }
-}
-
static void execute_pointcut (pointcut *pointcut_to_execute, zval *arg) {
TSRMLS_FETCH();
zval *args[1], *zret_ptr;

0 comments on commit 424117f

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