Changeset 250 for trunk/ext

Show
Ignore:
Timestamp:
03/04/2007 09:56:39 (21 months ago)
Author:
indeyets
Message:

really removed merge-class, moved code a bit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/php/phpext.c

    r249 r250  
    2323#define PHP_SYCK_VERSION "0.2" 
    2424 
     25/** 
     26 * SyckException class 
     27**/ 
    2528#define PHP_SYCK_EXCEPTION_PARENT "UnexpectedValueException" 
    2629#define PHP_SYCK_EXCEPTION_PARENT_LC "unexpectedvalueexception" 
     
    2831 
    2932static zend_class_entry *spl_ce_RuntimeException; 
     33zend_class_entry *syck_exception_entry; 
    3034 
    3135PHP_SYCK_API zend_class_entry *php_syck_get_exception_base() 
     
    9599#endif 
    96100 
    97  
    98  
    99 /** 
    100  * "Merge" class 
    101 **/ 
    102 /*static int le_mergekeyp; 
    103 zend_class_entry *merge_key_entry; 
    104  
    105 static zend_function_entry mergekey_functions[] = { 
    106         PHP_FALIAS(mergekey, mergekey_init, NULL) 
    107         { NULL, NULL, NULL } 
    108 }; 
    109  
    110 PHP_FUNCTION(mergekey_init) 
    111 { 
    112         object_init_ex(getThis(), merge_key_entry); 
    113 } 
    114  
    115 static void destroy_MergeKey_resource(zend_rsrc_list_entry *resource TSRMLS_DC) 
    116 { 
    117 } 
    118 */ 
    119  
    120 /** 
    121  * SyckException class 
    122 **/ 
    123  
    124 zend_class_entry *syck_exception_entry; 
    125  
    126101PHP_MINIT_FUNCTION(syck) 
    127102{ 
     
    130105        INIT_CLASS_ENTRY(ce, PHP_SYCK_EXCEPTION_NAME, NULL); 
    131106        syck_exception_entry = zend_register_internal_class_ex(&ce, php_syck_get_exception_base(), PHP_SYCK_EXCEPTION_PARENT TSRMLS_CC); 
    132  
    133 /*      le_mergekeyp = zend_register_list_destructors_ex(destroy_MergeKey_resource, NULL, "MergeKey", module_number); 
    134         INIT_CLASS_ENTRY(ce, "mergekey", mergekey_functions); 
    135         merge_key_entry = zend_register_internal_class(&ce TSRMLS_CC); 
    136 */ 
    137107        return SUCCESS; 
    138108} 
    139  
    140 PHP_MSHUTDOWN_FUNCTION(syck) 
    141 { 
    142         /* uncomment this line if you have INI entries 
    143         UNREGISTER_INI_ENTRIES(); 
    144         */ 
    145         return SUCCESS; 
    146 } 
    147  
    148109 
    149110PHP_MINFO_FUNCTION(syck) 
     
    154115        php_info_print_table_end(); 
    155116} 
    156  
    157117 
    158118 
     
    195155                                ZVAL_DOUBLE(o, -inf()); 
    196156                        } else if (strcmp(n->type_id, "merge") == 0) { 
    197 /* This thing doesn't work, anyway */ 
    198 /*                              TSRMLS_FETCH(); 
     157                                /* This thing doesn't work, anyway */ 
     158                                /*  
     159                                TSRMLS_FETCH(); 
    199160                                object_init_ex(o, merge_key_entry); 
    200 */                      } else { 
     161                                */ 
     162                        } else { 
    201163                                ZVAL_STRINGL(o, n->data.str->ptr, n->data.str->len, 1); 
    202164                        } 
     
    237199        zend_throw_exception(syck_exception_entry, str, 0 TSRMLS_CC); 
    238200} 
     201 
    239202 
    240203/* {{{ proto object syck_load(string arg)