43
43
44
44
zend_class_entry * sxe_class_entry = NULL ;
45
45
46
- ZEND_API zend_class_entry * sxe_get_element_class_entry (TSRMLS_D )
46
+ ZEND_API zend_class_entry * sxe_get_element_class_entry (TSRMLS_D ) /* {{{ */
47
47
{
48
48
return sxe_class_entry ;
49
49
}
50
+ /* }}} */
50
51
51
52
#define SXE_ME (func , arg_info , flags ) PHP_ME(simplexml_element, func, arg_info, flags)
52
53
#define SXE_MALIAS (func , alias , arg_info , flags ) PHP_MALIAS(simplexml_element, func, alias, arg_info, flags)
@@ -59,6 +60,13 @@ static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data TSRML
59
60
static xmlNodePtr php_sxe_iterator_fetch (php_sxe_object * sxe , xmlNodePtr node , int use_data TSRMLS_DC );
60
61
static zval * sxe_get_value (zval * z TSRMLS_DC );
61
62
63
+ static void php_sxe_iterator_dtor (zend_object_iterator * iter TSRMLS_DC );
64
+ static int php_sxe_iterator_valid (zend_object_iterator * iter TSRMLS_DC );
65
+ static void php_sxe_iterator_current_data (zend_object_iterator * iter , zval * * * data TSRMLS_DC );
66
+ static int php_sxe_iterator_current_key (zend_object_iterator * iter , zstr * str_key , uint * str_key_len , ulong * int_key TSRMLS_DC );
67
+ static void php_sxe_iterator_move_forward (zend_object_iterator * iter TSRMLS_DC );
68
+ static void php_sxe_iterator_rewind (zend_object_iterator * iter TSRMLS_DC );
69
+
62
70
/* {{{ _node_as_zval()
63
71
*/
64
72
static void _node_as_zval (php_sxe_object * sxe , xmlNodePtr node , zval * value , SXE_ITER itertype , char * name , xmlChar * nsprefix , int isprefix TSRMLS_DC )
@@ -104,7 +112,8 @@ static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE
104
112
} \
105
113
}
106
114
107
- static xmlNodePtr php_sxe_get_first_node (php_sxe_object * sxe , xmlNodePtr node TSRMLS_DC ) {
115
+ static xmlNodePtr php_sxe_get_first_node (php_sxe_object * sxe , xmlNodePtr node TSRMLS_DC ) /* {{{ */
116
+ {
108
117
php_sxe_object * intern ;
109
118
xmlNodePtr retnode = NULL ;
110
119
@@ -119,6 +128,7 @@ static xmlNodePtr php_sxe_get_first_node(php_sxe_object *sxe, xmlNodePtr node TS
119
128
return node ;
120
129
}
121
130
}
131
+ /* }}} */
122
132
123
133
static inline int match_ns (php_sxe_object * sxe , xmlNodePtr node , xmlChar * name , int prefix ) /* {{{ */
124
134
{
@@ -1014,7 +1024,7 @@ static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval
1014
1024
}
1015
1025
/* }}} */
1016
1026
1017
- static void sxe_properties_add (HashTable * rv , char * name , int namelen , zval * value TSRMLS_DC )
1027
+ static void sxe_properties_add (HashTable * rv , char * name , int namelen , zval * value TSRMLS_DC ) /* {{{ */
1018
1028
{
1019
1029
zval * * data_ptr ;
1020
1030
zval * newptr ;
@@ -1037,6 +1047,7 @@ static void sxe_properties_add(HashTable *rv, char *name, int namelen, zval *val
1037
1047
zend_hash_quick_update (rv , name , namelen , h , & value , sizeof (zval * ), NULL );
1038
1048
}
1039
1049
}
1050
+ /* }}} */
1040
1051
1041
1052
static HashTable * sxe_get_prop_hash (zval * object , int is_debug TSRMLS_DC ) /* {{{ */
1042
1053
{
@@ -1399,7 +1410,7 @@ SXE_METHOD(asXML)
1399
1410
1400
1411
#define SXE_NS_PREFIX (ns ) (ns->prefix ? (char*)ns->prefix : "")
1401
1412
1402
- static inline void sxe_add_namespace_name (zval * return_value , xmlNsPtr ns TSRMLS_DC )
1413
+ static inline void sxe_add_namespace_name (zval * return_value , xmlNsPtr ns TSRMLS_DC ) /* {{{ */
1403
1414
{
1404
1415
uint prefix_len ;
1405
1416
char * prefix = SXE_NS_PREFIX (ns );
@@ -1422,6 +1433,7 @@ static inline void sxe_add_namespace_name(zval *return_value, xmlNsPtr ns TSRMLS
1422
1433
}
1423
1434
}
1424
1435
}
1436
+ /* }}} */
1425
1437
1426
1438
static void sxe_add_namespaces (php_sxe_object * sxe , xmlNodePtr node , zend_bool recursive , zval * return_value TSRMLS_DC ) /* {{{ */
1427
1439
{
@@ -1857,7 +1869,7 @@ static int sxe_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
1857
1869
}
1858
1870
/* }}} */
1859
1871
1860
- static zval * sxe_get_value (zval * z TSRMLS_DC )
1872
+ static zval * sxe_get_value (zval * z TSRMLS_DC ) /* {{{ */
1861
1873
{
1862
1874
zval * retval ;
1863
1875
@@ -1871,9 +1883,9 @@ static zval *sxe_get_value(zval *z TSRMLS_DC)
1871
1883
Z_SET_REFCOUNT_P (retval , 0 );
1872
1884
return retval ;
1873
1885
}
1886
+ /* }}} */
1874
1887
1875
-
1876
- static zend_object_handlers sxe_object_handlers = {
1888
+ static zend_object_handlers sxe_object_handlers = { /* {{{ */
1877
1889
ZEND_OBJECTS_STORE_HANDLERS ,
1878
1890
sxe_property_read ,
1879
1891
sxe_property_write ,
@@ -1897,6 +1909,7 @@ static zend_object_handlers sxe_object_handlers = {
1897
1909
sxe_count_elements ,
1898
1910
sxe_get_debug_info
1899
1911
};
1912
+ /* }}} */
1900
1913
1901
1914
/* {{{ sxe_object_clone()
1902
1915
*/
@@ -2128,7 +2141,6 @@ PHP_FUNCTION(simplexml_load_string)
2128
2141
}
2129
2142
/* }}} */
2130
2143
2131
-
2132
2144
/* {{{ proto SimpleXMLElement::__construct(string data [, int options [, bool data_is_url [, string ns [, bool is_prefix]]]]) U
2133
2145
SimpleXMLElement constructor */
2134
2146
SXE_METHOD (__construct )
@@ -2180,24 +2192,17 @@ SXE_METHOD(__construct)
2180
2192
}
2181
2193
/* }}} */
2182
2194
2183
-
2184
- static void php_sxe_iterator_dtor (zend_object_iterator * iter TSRMLS_DC );
2185
- static int php_sxe_iterator_valid (zend_object_iterator * iter TSRMLS_DC );
2186
- static void php_sxe_iterator_current_data (zend_object_iterator * iter , zval * * * data TSRMLS_DC );
2187
- static int php_sxe_iterator_current_key (zend_object_iterator * iter , zstr * str_key , uint * str_key_len , ulong * int_key TSRMLS_DC );
2188
- static void php_sxe_iterator_move_forward (zend_object_iterator * iter TSRMLS_DC );
2189
- static void php_sxe_iterator_rewind (zend_object_iterator * iter TSRMLS_DC );
2190
-
2191
- zend_object_iterator_funcs php_sxe_iterator_funcs = {
2195
+ zend_object_iterator_funcs php_sxe_iterator_funcs = { /* {{{ */
2192
2196
php_sxe_iterator_dtor ,
2193
2197
php_sxe_iterator_valid ,
2194
2198
php_sxe_iterator_current_data ,
2195
2199
php_sxe_iterator_current_key ,
2196
2200
php_sxe_iterator_move_forward ,
2197
2201
php_sxe_iterator_rewind ,
2198
2202
};
2203
+ /* }}} */
2199
2204
2200
- static xmlNodePtr php_sxe_iterator_fetch (php_sxe_object * sxe , xmlNodePtr node , int use_data TSRMLS_DC )
2205
+ static xmlNodePtr php_sxe_iterator_fetch (php_sxe_object * sxe , xmlNodePtr node , int use_data TSRMLS_DC ) /* {{{ */
2201
2206
{
2202
2207
xmlChar * prefix = sxe -> iter .nsprefix ;
2203
2208
int isprefix = sxe -> iter .isprefix ;
@@ -2226,8 +2231,9 @@ static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, i
2226
2231
2227
2232
return node ;
2228
2233
}
2234
+ /* }}} */
2229
2235
2230
- static xmlNodePtr php_sxe_reset_iterator (php_sxe_object * sxe , int use_data TSRMLS_DC )
2236
+ static xmlNodePtr php_sxe_reset_iterator (php_sxe_object * sxe , int use_data TSRMLS_DC ) /* {{{ */
2231
2237
{
2232
2238
xmlNodePtr node ;
2233
2239
@@ -2252,8 +2258,9 @@ static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data TSRML
2252
2258
}
2253
2259
return NULL ;
2254
2260
}
2261
+ /* }}} */
2255
2262
2256
- zend_object_iterator * php_sxe_get_iterator (zend_class_entry * ce , zval * object , int by_ref TSRMLS_DC )
2263
+ zend_object_iterator * php_sxe_get_iterator (zend_class_entry * ce , zval * object , int by_ref TSRMLS_DC ) /* {{{ */
2257
2264
{
2258
2265
php_sxe_iterator * iterator ;
2259
2266
@@ -2269,8 +2276,9 @@ zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object, i
2269
2276
2270
2277
return (zend_object_iterator * )iterator ;
2271
2278
}
2279
+ /* }}} */
2272
2280
2273
- static void php_sxe_iterator_dtor (zend_object_iterator * iter TSRMLS_DC )
2281
+ static void php_sxe_iterator_dtor (zend_object_iterator * iter TSRMLS_DC ) /* {{{ */
2274
2282
{
2275
2283
php_sxe_iterator * iterator = (php_sxe_iterator * )iter ;
2276
2284
@@ -2281,22 +2289,25 @@ static void php_sxe_iterator_dtor(zend_object_iterator *iter TSRMLS_DC)
2281
2289
2282
2290
efree (iterator );
2283
2291
}
2292
+ /* }}} */
2284
2293
2285
- static int php_sxe_iterator_valid (zend_object_iterator * iter TSRMLS_DC )
2294
+ static int php_sxe_iterator_valid (zend_object_iterator * iter TSRMLS_DC ) /* {{{ */
2286
2295
{
2287
2296
php_sxe_iterator * iterator = (php_sxe_iterator * )iter ;
2288
2297
2289
2298
return iterator -> sxe -> iter .data ? SUCCESS : FAILURE ;
2290
2299
}
2300
+ /* }}} */
2291
2301
2292
- static void php_sxe_iterator_current_data (zend_object_iterator * iter , zval * * * data TSRMLS_DC )
2302
+ static void php_sxe_iterator_current_data (zend_object_iterator * iter , zval * * * data TSRMLS_DC ) /* {{{ */
2293
2303
{
2294
2304
php_sxe_iterator * iterator = (php_sxe_iterator * )iter ;
2295
2305
2296
2306
* data = & iterator -> sxe -> iter .data ;
2297
2307
}
2308
+ /* }}} */
2298
2309
2299
- static int php_sxe_iterator_current_key (zend_object_iterator * iter , zstr * str_key , uint * str_key_len , ulong * int_key TSRMLS_DC )
2310
+ static int php_sxe_iterator_current_key (zend_object_iterator * iter , zstr * str_key , uint * str_key_len , ulong * int_key TSRMLS_DC ) /* {{{ */
2300
2311
{
2301
2312
zval * curobj ;
2302
2313
xmlNodePtr curnode = NULL ;
@@ -2329,8 +2340,9 @@ static int php_sxe_iterator_current_key(zend_object_iterator *iter, zstr *str_ke
2329
2340
return HASH_KEY_IS_STRING ;
2330
2341
}
2331
2342
}
2343
+ /* }}} */
2332
2344
2333
- ZEND_API void php_sxe_move_forward_iterator (php_sxe_object * sxe TSRMLS_DC )
2345
+ ZEND_API void php_sxe_move_forward_iterator (php_sxe_object * sxe TSRMLS_DC ) /* {{{ */
2334
2346
{
2335
2347
xmlNodePtr node = NULL ;
2336
2348
php_sxe_object * intern ;
@@ -2346,14 +2358,16 @@ ZEND_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC)
2346
2358
php_sxe_iterator_fetch (sxe , node -> next , 1 TSRMLS_CC );
2347
2359
}
2348
2360
}
2361
+ /* }}} */
2349
2362
2350
- static void php_sxe_iterator_move_forward (zend_object_iterator * iter TSRMLS_DC )
2363
+ static void php_sxe_iterator_move_forward (zend_object_iterator * iter TSRMLS_DC ) /* {{{ */
2351
2364
{
2352
2365
php_sxe_iterator * iterator = (php_sxe_iterator * )iter ;
2353
2366
php_sxe_move_forward_iterator (iterator -> sxe TSRMLS_CC );
2354
2367
}
2368
+ /* }}} */
2355
2369
2356
- static void php_sxe_iterator_rewind (zend_object_iterator * iter TSRMLS_DC )
2370
+ static void php_sxe_iterator_rewind (zend_object_iterator * iter TSRMLS_DC ) /* {{{ */
2357
2371
{
2358
2372
php_sxe_object * sxe ;
2359
2373
@@ -2362,8 +2376,9 @@ static void php_sxe_iterator_rewind(zend_object_iterator *iter TSRMLS_DC)
2362
2376
2363
2377
php_sxe_reset_iterator (sxe , 1 TSRMLS_CC );
2364
2378
}
2379
+ /* }}} */
2365
2380
2366
- void * simplexml_export_node (zval * object TSRMLS_DC )
2381
+ void * simplexml_export_node (zval * object TSRMLS_DC ) /* {{{ */
2367
2382
{
2368
2383
php_sxe_object * sxe ;
2369
2384
xmlNodePtr node ;
@@ -2372,6 +2387,7 @@ void *simplexml_export_node(zval *object TSRMLS_DC)
2372
2387
GET_NODE (sxe , node );
2373
2388
return php_sxe_get_first_node (sxe , node TSRMLS_CC );
2374
2389
}
2390
+ /* }}} */
2375
2391
2376
2392
/* {{{ proto simplemxml_element simplexml_import_dom(domNode node [, string class_name]) U
2377
2393
Get a simplexml_element object from dom to allow for processing */
@@ -2419,19 +2435,21 @@ PHP_FUNCTION(simplexml_import_dom)
2419
2435
}
2420
2436
/* }}} */
2421
2437
2422
- const zend_function_entry simplexml_functions [] = {
2438
+ const zend_function_entry simplexml_functions [] = { /* {{{ */
2423
2439
PHP_FE (simplexml_load_file , NULL )
2424
2440
PHP_FE (simplexml_load_string , NULL )
2425
2441
PHP_FE (simplexml_import_dom , NULL )
2426
2442
{NULL , NULL , NULL }
2427
2443
};
2444
+ /* }}} */
2428
2445
2429
- static const zend_module_dep simplexml_deps [] = {
2446
+ static const zend_module_dep simplexml_deps [] = { /* {{{ */
2430
2447
ZEND_MOD_REQUIRED ("libxml" )
2431
2448
{NULL , NULL , NULL }
2432
2449
};
2450
+ /* }}} */
2433
2451
2434
- zend_module_entry simplexml_module_entry = {
2452
+ zend_module_entry simplexml_module_entry = { /* {{{ */
2435
2453
STANDARD_MODULE_HEADER_EX , NULL ,
2436
2454
simplexml_deps ,
2437
2455
"SimpleXML" ,
@@ -2444,14 +2462,15 @@ zend_module_entry simplexml_module_entry = {
2444
2462
"0.1" ,
2445
2463
STANDARD_MODULE_PROPERTIES
2446
2464
};
2465
+ /* }}} */
2447
2466
2448
2467
#ifdef COMPILE_DL_SIMPLEXML
2449
2468
ZEND_GET_MODULE (simplexml )
2450
2469
#endif
2451
2470
2452
2471
/* the method table */
2453
2472
/* each method can have its own parameters and visibility */
2454
- static const zend_function_entry sxe_functions [] = {
2473
+ static const zend_function_entry sxe_functions [] = { /* {{{ */
2455
2474
SXE_ME (__construct , NULL , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL ) /* must be called */
2456
2475
SXE_ME (asXML , NULL , ZEND_ACC_PUBLIC )
2457
2476
SXE_MALIAS (saveXML , asXML , NULL , ZEND_ACC_PUBLIC )
@@ -2466,6 +2485,7 @@ static const zend_function_entry sxe_functions[] = {
2466
2485
SXE_ME (addAttribute , NULL , ZEND_ACC_PUBLIC )
2467
2486
{NULL , NULL , NULL }
2468
2487
};
2488
+ /* }}} */
2469
2489
2470
2490
/* {{{ PHP_MINIT_FUNCTION(simplexml)
2471
2491
*/
@@ -2504,6 +2524,7 @@ PHP_MSHUTDOWN_FUNCTION(simplexml)
2504
2524
return SUCCESS ;
2505
2525
}
2506
2526
/* }}} */
2527
+
2507
2528
/* {{{ PHP_MINFO_FUNCTION(simplexml)
2508
2529
*/
2509
2530
PHP_MINFO_FUNCTION (simplexml )
0 commit comments