Changeset 131 in svn for trunk/utils.c


Ignore:
Timestamp:
2006-09-03T09:37:05+02:00 (9 years ago)
Author:
Xuefer
Message:

move open_files out of sandbox, it's not needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r121 r131  
    371371
    372372    memcpy(&OG(included_files), &EG(included_files), sizeof(EG(included_files)));
    373     memcpy(&OG(open_files), &CG(open_files), sizeof(CG(open_files)));
    374373
    375374#ifdef HAVE_XCACHE_CONSTANT
     
    388387
    389388    TG(included_files) = &EG(included_files);
    390     TG(open_files)     = &CG(open_files);
    391 
    392     zend_llist_init(TG(open_files), sizeof(zend_file_handle), (void (*)(void *)) zend_file_handle_dtor, 0);
     389
    393390    zend_hash_init_ex(TG(included_files), 5, NULL, NULL, 0, 1);
    394391#ifdef HAVE_XCACHE_CONSTANT
     
    440437    i = 1;
    441438    zend_hash_add(&OG(included_files), sandbox->filename, strlen(sandbox->filename) + 1, (void *)&i, sizeof(int), NULL);
    442     for (handle = zend_llist_get_first_ex(TG(open_files), &lpos);
    443             handle;
    444             handle = zend_llist_get_next_ex(TG(open_files), &lpos)) {
    445         zend_llist_add_element(&OG(open_files), handle);
    446     }
    447439}
    448440/* }}} */
     
    466458        TG(function_table).pDestructor = NULL;
    467459        TG(class_table).pDestructor = NULL;
    468         TG(open_files)->dtor = NULL;
    469460    }
    470461
     
    476467    zend_hash_destroy(&TG(class_table));
    477468    zend_hash_destroy(TG(included_files));
    478     zend_llist_destroy(TG(open_files));
    479469
    480470    /* restore orig here, as EG/CG holded tmp before */
    481471    memcpy(&EG(included_files), &OG(included_files), sizeof(EG(included_files)));
    482     memcpy(&CG(open_files),     &OG(open_files),     sizeof(CG(open_files)));
    483472
    484473    if (sandbox->alloc) {
Note: See TracChangeset for help on using the changeset viewer.