Changeset 1477 in svn
- Timestamp:
- 2013-11-23T01:46:42Z (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r1476 r1477 10 10 * (WIP) defragment 11 11 * (WIP) cache to disk 12 * misc: 13 * Reflection info added for APIs 12 14 13 15 3.1.1 2013-??-?? -
trunk/mod_cacher/xc_cacher.c
r1470 r1477 3133 3133 /* {{{ proto int xcache_count(int type) 3134 3134 Return count of cache on specified cache type */ 3135 #ifdef ZEND_BEGIN_ARG_INFO_EX 3136 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_count, 0, 0, 1) 3137 ZEND_ARG_INFO(0, type) 3138 ZEND_END_ARG_INFO() 3139 #else 3140 static unsigned char arginfo_xcache_count[] = { 1, BYREF_NONE }; 3141 #endif 3142 3135 3143 PHP_FUNCTION(xcache_count) 3136 3144 { … … 3140 3148 /* {{{ proto array xcache_info(int type, int id) 3141 3149 Get cache info by id on specified cache type */ 3150 #ifdef ZEND_BEGIN_ARG_INFO_EX 3151 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_info, 0, 0, 2) 3152 ZEND_ARG_INFO(0, type) 3153 ZEND_ARG_INFO(0, id) 3154 ZEND_END_ARG_INFO() 3155 #else 3156 static unsigned char arginfo_xcache_info[] = { 2, BYREF_NONE, BYREF_NONE }; 3157 #endif 3158 3142 3159 PHP_FUNCTION(xcache_info) 3143 3160 { … … 3147 3164 /* {{{ proto array xcache_list(int type, int id) 3148 3165 Get cache entries list by id on specified cache type */ 3166 #ifdef ZEND_BEGIN_ARG_INFO_EX 3167 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_list, 0, 0, 2) 3168 ZEND_ARG_INFO(0, type) 3169 ZEND_ARG_INFO(0, id) 3170 ZEND_END_ARG_INFO() 3171 #else 3172 static unsigned char arginfo_xcache_list[] = { 2, BYREF_NONE, BYREF_NONE }; 3173 #endif 3174 3149 3175 PHP_FUNCTION(xcache_list) 3150 3176 { … … 3154 3180 /* {{{ proto array xcache_clear_cache(int type, [ int id = -1 ]) 3155 3181 Clear cache by id on specified cache type */ 3182 #ifdef ZEND_BEGIN_ARG_INFO_EX 3183 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_clear_cache, 0, 0, 1) 3184 ZEND_ARG_INFO(0, type) 3185 ZEND_ARG_INFO(0, id) 3186 ZEND_END_ARG_INFO() 3187 #else 3188 static unsigned char arginfo_xcache_clear_cache[] = { 2, BYREF_NONE, BYREF_NONE }; 3189 #endif 3190 3156 3191 PHP_FUNCTION(xcache_clear_cache) 3157 3192 { … … 3161 3196 /* {{{ proto array xcache_enable_cache(int type, [ int id = -1, [ bool enable = true ] ]) 3162 3197 Enable or disable cache by id on specified cache type */ 3198 #ifdef ZEND_BEGIN_ARG_INFO_EX 3199 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_enable_cache, 0, 0, 1) 3200 ZEND_ARG_INFO(0, type) 3201 ZEND_ARG_INFO(0, id) 3202 ZEND_ARG_INFO(0, enable) 3203 ZEND_END_ARG_INFO() 3204 #else 3205 static unsigned char arginfo_xcache_enable_cache[] = { 1, BYREF_NONE }; 3206 #endif 3207 3163 3208 PHP_FUNCTION(xcache_enable_cache) 3164 3209 { … … 3168 3213 /* {{{ proto mixed xcache_admin_namespace() 3169 3214 Break out of namespace limitation */ 3215 #ifdef ZEND_BEGIN_ARG_INFO_EX 3216 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_admin_namespace, 0, 0, 0) 3217 ZEND_END_ARG_INFO() 3218 #else 3219 static unsigned char arginfo_xcache_admin_namespace[] = { 0 }; 3220 #endif 3221 3170 3222 PHP_FUNCTION(xcache_admin_namespace) 3171 3223 { … … 3199 3251 /* {{{ proto mixed xcache_set_namespace(string namespace) 3200 3252 Switch to user defined namespace */ 3253 #ifdef ZEND_BEGIN_ARG_INFO_EX 3254 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_set_namespace, 0, 0, 1) 3255 ZEND_ARG_INFO(0, namespace) 3256 ZEND_END_ARG_INFO() 3257 #else 3258 static unsigned char arginfo_xcache_set_namespace[] = { 1, BYREF_NONE }; 3259 #endif 3260 3201 3261 PHP_FUNCTION(xcache_set_namespace) 3202 3262 { … … 3224 3284 /* {{{ proto mixed xcache_get(string name) 3225 3285 Get cached data by specified name */ 3286 #ifdef ZEND_BEGIN_ARG_INFO_EX 3287 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get, 0, 0, 1) 3288 ZEND_ARG_INFO(0, name) 3289 ZEND_END_ARG_INFO() 3290 #else 3291 static unsigned char arginfo_xcache_get[] = { 1, BYREF_NONE }; 3292 #endif 3293 3226 3294 PHP_FUNCTION(xcache_get) 3227 3295 { … … 3265 3333 /* {{{ proto bool xcache_set(string name, mixed value [, int ttl]) 3266 3334 Store data to cache by specified name */ 3335 #ifdef ZEND_BEGIN_ARG_INFO_EX 3336 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_set, 0, 0, 2) 3337 ZEND_ARG_INFO(0, name) 3338 ZEND_ARG_INFO(0, value) 3339 ZEND_ARG_INFO(0, ttl) 3340 ZEND_END_ARG_INFO() 3341 #else 3342 static unsigned char arginfo_xcache_set[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_NONE }; 3343 #endif 3344 3267 3345 PHP_FUNCTION(xcache_set) 3268 3346 { … … 3316 3394 /* {{{ proto bool xcache_isset(string name) 3317 3395 Check if an entry exists in cache by specified name */ 3396 #ifdef ZEND_BEGIN_ARG_INFO_EX 3397 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_isset, 0, 0, 1) 3398 ZEND_ARG_INFO(0, name) 3399 ZEND_END_ARG_INFO() 3400 #else 3401 static unsigned char arginfo_xcache_isset[] = { 1, BYREF_NONE }; 3402 #endif 3403 3318 3404 PHP_FUNCTION(xcache_isset) 3319 3405 { … … 3358 3444 /* {{{ proto bool xcache_unset(string name) 3359 3445 Unset existing data in cache by specified name */ 3446 #ifdef ZEND_BEGIN_ARG_INFO_EX 3447 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_unset, 0, 0, 1) 3448 ZEND_ARG_INFO(0, name) 3449 ZEND_END_ARG_INFO() 3450 #else 3451 static unsigned char arginfo_xcache_unset[] = { 1, BYREF_NONE }; 3452 #endif 3453 3360 3454 PHP_FUNCTION(xcache_unset) 3361 3455 { … … 3398 3492 /* {{{ proto bool xcache_unset_by_prefix(string prefix) 3399 3493 Unset existing data in cache by specified prefix */ 3494 #ifdef ZEND_BEGIN_ARG_INFO_EX 3495 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_unset_by_prefix, 0, 0, 1) 3496 ZEND_ARG_INFO(0, prefix) 3497 ZEND_END_ARG_INFO() 3498 #else 3499 static unsigned char arginfo_xcache_unset_by_prefix[] = { 1, BYREF_NONE }; 3500 #endif 3501 3400 3502 PHP_FUNCTION(xcache_unset_by_prefix) 3401 3503 { … … 3518 3620 /* {{{ proto int xcache_inc(string name [, int value [, int ttl]]) 3519 3621 Increase an int counter in cache by specified name, create it if not exists */ 3622 #ifdef ZEND_BEGIN_ARG_INFO_EX 3623 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_inc, 0, 0, 1) 3624 ZEND_ARG_INFO(0, prefix) 3625 ZEND_ARG_INFO(0, value) 3626 ZEND_ARG_INFO(0, ttl) 3627 ZEND_END_ARG_INFO() 3628 #else 3629 static unsigned char arginfo_xcache_inc[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_NONE }; 3630 #endif 3631 3520 3632 PHP_FUNCTION(xcache_inc) 3521 3633 { … … 3525 3637 /* {{{ proto int xcache_dec(string name [, int value [, int ttl]]) 3526 3638 Decrease an int counter in cache by specified name, create it if not exists */ 3639 #ifdef ZEND_BEGIN_ARG_INFO_EX 3640 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_dec, 0, 0, 1) 3641 ZEND_ARG_INFO(0, prefix) 3642 ZEND_ARG_INFO(0, value) 3643 ZEND_ARG_INFO(0, ttl) 3644 ZEND_END_ARG_INFO() 3645 #else 3646 static unsigned char arginfo_xcache_dec[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_NONE }; 3647 #endif 3648 3527 3649 PHP_FUNCTION(xcache_dec) 3528 3650 { … … 3532 3654 static zend_function_entry xcache_cacher_functions[] = /* {{{ */ 3533 3655 { 3534 PHP_FE(xcache_count, NULL)3535 PHP_FE(xcache_info, NULL)3536 PHP_FE(xcache_list, NULL)3537 PHP_FE(xcache_clear_cache, NULL)3538 PHP_FE(xcache_enable_cache, NULL)3539 PHP_FE(xcache_admin_namespace, NULL)3540 PHP_FE(xcache_set_namespace, NULL)3541 PHP_FE(xcache_get, NULL)3542 PHP_FE(xcache_set, NULL)3543 PHP_FE(xcache_isset, NULL)3544 PHP_FE(xcache_unset, NULL)3545 PHP_FE(xcache_unset_by_prefix, NULL)3546 PHP_FE(xcache_inc, NULL)3547 PHP_FE(xcache_dec, NULL)3656 PHP_FE(xcache_count, arginfo_xcache_count) 3657 PHP_FE(xcache_info, arginfo_xcache_info) 3658 PHP_FE(xcache_list, arginfo_xcache_list) 3659 PHP_FE(xcache_clear_cache, arginfo_xcache_clear_cache) 3660 PHP_FE(xcache_enable_cache, arginfo_xcache_enable_cache) 3661 PHP_FE(xcache_admin_namespace, arginfo_xcache_admin_namespace) 3662 PHP_FE(xcache_set_namespace, arginfo_xcache_set_namespace) 3663 PHP_FE(xcache_get, arginfo_xcache_get) 3664 PHP_FE(xcache_set, arginfo_xcache_set) 3665 PHP_FE(xcache_isset, arginfo_xcache_isset) 3666 PHP_FE(xcache_unset, arginfo_xcache_unset) 3667 PHP_FE(xcache_unset_by_prefix, arginfo_xcache_unset_by_prefix) 3668 PHP_FE(xcache_inc, arginfo_xcache_inc) 3669 PHP_FE(xcache_dec, arginfo_xcache_dec) 3548 3670 PHP_FE_END 3549 3671 }; -
trunk/mod_coverager/xc_coverager.c
r1321 r1477 485 485 * decode specified data which is saved by auto dumper to array 486 486 */ 487 #ifdef ZEND_BEGIN_ARG_INFO_EX 488 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_coverager_decode, 0, 0, 1) 489 ZEND_ARG_INFO(0, data) 490 ZEND_END_ARG_INFO() 491 #else 492 static unsigned char arginfo_xcache_coverager_decode[] = { 1, BYREF_NONE }; 493 #endif 494 487 495 PHP_FUNCTION(xcache_coverager_decode) 488 496 { … … 515 523 * starts coverager data collecting 516 524 */ 525 #ifdef ZEND_BEGIN_ARG_INFO_EX 526 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_coverager_start, 0, 0, 0) 527 ZEND_ARG_INFO(0, clean) 528 ZEND_END_ARG_INFO() 529 #else 530 static unsigned char arginfo_xcache_coverager_start[] = { 1, BYREF_NONE }; 531 #endif 532 517 533 PHP_FUNCTION(xcache_coverager_start) 518 534 { … … 538 554 * stop coverager data collecting 539 555 */ 556 #ifdef ZEND_BEGIN_ARG_INFO_EX 557 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_coverager_stop, 0, 0, 0) 558 ZEND_ARG_INFO(0, clean) 559 ZEND_END_ARG_INFO() 560 #else 561 static unsigned char arginfo_xcache_coverager_stop[] = { 1, BYREF_NONE }; 562 #endif 563 540 564 PHP_FUNCTION(xcache_coverager_stop) 541 565 { … … 555 579 * get coverager data collected 556 580 */ 581 #ifdef ZEND_BEGIN_ARG_INFO_EX 582 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_coverager_get, 0, 0, 0) 583 ZEND_ARG_INFO(0, clean) 584 ZEND_END_ARG_INFO() 585 #else 586 static unsigned char arginfo_xcache_coverager_get[] = { 1, BYREF_NONE }; 587 #endif 557 588 PHP_FUNCTION(xcache_coverager_get) 558 589 { … … 570 601 static zend_function_entry xcache_coverager_functions[] = /* {{{ */ 571 602 { 572 PHP_FE(xcache_coverager_decode, NULL)573 PHP_FE(xcache_coverager_start, NULL)574 PHP_FE(xcache_coverager_stop, NULL)575 PHP_FE(xcache_coverager_get, NULL)603 PHP_FE(xcache_coverager_decode, arginfo_xcache_coverager_decode) 604 PHP_FE(xcache_coverager_start, arginfo_xcache_coverager_start) 605 PHP_FE(xcache_coverager_stop, arginfo_xcache_coverager_stop) 606 PHP_FE(xcache_coverager_get, arginfo_xcache_coverager_get) 576 607 PHP_FE_END 577 608 }; -
trunk/mod_disassembler/xc_disassembler.c
r1321 r1477 195 195 /* {{{ proto array xcache_dasm_file(string filename) 196 196 Disassemble file into opcode array by filename */ 197 #ifdef ZEND_BEGIN_ARG_INFO_EX 198 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_dasm_file, 0, 0, 1) 199 ZEND_ARG_INFO(0, filename) 200 ZEND_END_ARG_INFO() 201 #else 202 static unsigned char arginfo_xcache_dasm_file[] = { 1, BYREF_NONE }; 203 #endif 204 197 205 PHP_FUNCTION(xcache_dasm_file) 198 206 { … … 210 218 /* {{{ proto array xcache_dasm_string(string code) 211 219 Disassemble php code into opcode array */ 220 #ifdef ZEND_BEGIN_ARG_INFO_EX 221 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_dasm_string, 0, 0, 1) 222 ZEND_ARG_INFO(0, code) 223 ZEND_END_ARG_INFO() 224 #else 225 static unsigned char arginfo_xcache_dasm_string[] = { 1, BYREF_NONE }; 226 #endif 227 212 228 PHP_FUNCTION(xcache_dasm_string) 213 229 { … … 233 249 static zend_function_entry xcache_disassembler_functions[] = /* {{{ */ 234 250 { 235 PHP_FE(xcache_dasm_file, NULL)236 PHP_FE(xcache_dasm_string, NULL)251 PHP_FE(xcache_dasm_file, arginfo_xcache_dasm_file) 252 PHP_FE(xcache_dasm_string, arginfo_xcache_dasm_string) 237 253 PHP_FE_END 238 254 }; -
trunk/xcache.c
r1476 r1477 177 177 /* }}} */ 178 178 179 /* {{{ proto int xcache_get_refcount(mixed &variable)180 XCache internal uses only: Get reference count of referenced variable */181 #ifdef ZEND_BEGIN_ARG_INFO_EX182 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_refcount, 0, 0, 1)183 ZEND_ARG_INFO(1, variable)184 ZEND_END_ARG_INFO()185 #else186 static unsigned char arginfo_xcache_get_refcount[] = { 1, BYREF_FORCE };187 #endif188 189 PHP_FUNCTION(xcache_get_refcount)190 {191 zval *variable;192 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {193 RETURN_NULL();194 }195 196 RETURN_LONG(Z_REFCOUNT(*variable) - 1);197 }198 /* }}} */199 /* {{{ proto int xcache_get_cowcount(mixed value)200 XCache internal uses only: Get reference count of copy-on-write variable or data */201 #ifdef ZEND_BEGIN_ARG_INFO_EX202 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_cowcount, 0, 0, 1)203 ZEND_ARG_INFO(0, variable)204 ZEND_END_ARG_INFO()205 #else206 static unsigned char arginfo_xcache_get_cowcount[] = { 1, BYREF_NONE };207 #endif208 209 PHP_FUNCTION(xcache_get_cowcount)210 {211 zval *variable;212 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {213 RETURN_NULL();214 }215 216 RETURN_LONG(Z_REFCOUNT(*variable) - 1);217 }218 /* }}} */219 /* {{{ proto bool xcache_get_isref(mixed variable)220 XCache internal uses only: Check if variable data is marked referenced */221 #ifdef ZEND_BEGIN_ARG_INFO_EX222 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_isref, 0, 0, 1)223 ZEND_ARG_INFO(1, variable)224 ZEND_END_ARG_INFO()225 #else226 static unsigned char arginfo_xcache_get_isref[] = { 1, BYREF_FORCE };227 #endif228 229 PHP_FUNCTION(xcache_get_isref)230 {231 zval *variable;232 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {233 RETURN_NULL();234 }235 236 RETURN_BOOL(Z_ISREF(*variable) && Z_REFCOUNT(*variable) >= 3);237 }238 /* }}} */239 179 #ifdef HAVE_XCACHE_DPRINT 240 180 /* {{{ proto bool xcache_dprint(mixed value) 241 Prints variable (or value) internal struct(debug only) */181 Prints internal struct of an zval (debug only) */ 242 182 #include "xc_processor.h" 183 184 #ifdef ZEND_BEGIN_ARG_INFO_EX 185 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_dprint, 0, 0, 1) 186 ZEND_ARG_INFO(0, value) 187 ZEND_END_ARG_INFO() 188 #else 189 static unsigned char arginfo_xcache_dprint[] = { 1, BYREF_NONE }; 190 #endif 191 243 192 PHP_FUNCTION(xcache_dprint) 244 193 { … … 252 201 /* }}} */ 253 202 #endif 203 #ifdef HAVE_XCACHE_ASSEMBLER 254 204 /* {{{ proto string xcache_asm(string filename) 255 205 */ 256 #ifdef HAVE_XCACHE_ASSEMBLER257 206 PHP_FUNCTION(xcache_asm) 258 207 { 259 208 } 260 #endif 261 /* }}} */ 209 /* }}} */ 210 #endif 211 #ifdef HAVE_XCACHE_ENCODER 262 212 /* {{{ proto string xcache_encode(string filename) 263 213 Encode php file into XCache opcode encoded format */ 264 #ifdef HAVE_XCACHE_ENCODER265 214 PHP_FUNCTION(xcache_encode) 266 215 { 267 216 } 268 #endif 269 /* }}} */ 217 /* }}} */ 218 #endif 219 #ifdef HAVE_XCACHE_DECODER 270 220 /* {{{ proto bool xcache_decode_file(string filename) 271 221 Decode(load) opcode from XCache encoded format file */ 272 #ifdef HAVE_XCACHE_DECODER273 222 PHP_FUNCTION(xcache_decode_file) 274 223 { 275 224 } 276 #endif277 225 /* }}} */ 278 226 /* {{{ proto bool xcache_decode_string(string data) 279 227 Decode(load) opcode from XCache encoded format data */ 280 #ifdef HAVE_XCACHE_DECODER281 228 PHP_FUNCTION(xcache_decode_string) 282 229 { 283 230 } 284 #endif 285 /* }}} */ 231 /* }}} */ 232 #endif 286 233 /* {{{ xc_call_getter */ 287 234 typedef const char *(xc_name_getter_t)(zend_uchar type); … … 309 256 /* }}} */ 310 257 /* {{{ proto string xcache_get_op_type(int op_type) */ 258 #ifdef ZEND_BEGIN_ARG_INFO_EX 259 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_op_type, 0, 0, 1) 260 ZEND_ARG_INFO(0, op_type) 261 ZEND_END_ARG_INFO() 262 #else 263 static unsigned char arginfo_xcache_get_op_type[] = { 1, BYREF_NONE }; 264 #endif 265 311 266 PHP_FUNCTION(xcache_get_op_type) 312 267 { … … 315 270 /* }}} */ 316 271 /* {{{ proto string xcache_get_data_type(int type) */ 272 #ifdef ZEND_BEGIN_ARG_INFO_EX 273 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_data_type, 0, 0, 1) 274 ZEND_ARG_INFO(0, type) 275 ZEND_END_ARG_INFO() 276 #else 277 static unsigned char arginfo_xcache_get_data_type[] = { 1, BYREF_NONE }; 278 #endif 279 317 280 PHP_FUNCTION(xcache_get_data_type) 318 281 { … … 321 284 /* }}} */ 322 285 /* {{{ proto string xcache_get_opcode(int opcode) */ 286 #ifdef ZEND_BEGIN_ARG_INFO_EX 287 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_opcode, 0, 0, 1) 288 ZEND_ARG_INFO(0, opcode) 289 ZEND_END_ARG_INFO() 290 #else 291 static unsigned char arginfo_xcache_get_opcode[] = { 1, BYREF_NONE }; 292 #endif 293 323 294 PHP_FUNCTION(xcache_get_opcode) 324 295 { … … 327 298 /* }}} */ 328 299 /* {{{ proto string xcache_get_op_spec(int op_type) */ 300 #ifdef ZEND_BEGIN_ARG_INFO_EX 301 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_op_spec, 0, 0, 1) 302 ZEND_ARG_INFO(0, op_type) 303 ZEND_END_ARG_INFO() 304 #else 305 static unsigned char arginfo_xcache_get_op_spec[] = { 1, BYREF_NONE }; 306 #endif 307 329 308 PHP_FUNCTION(xcache_get_op_spec) 330 309 { … … 333 312 /* }}} */ 334 313 /* {{{ proto string xcache_get_opcode_spec(int opcode) */ 314 #ifdef ZEND_BEGIN_ARG_INFO_EX 315 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_opcode_spec, 0, 0, 1) 316 ZEND_ARG_INFO(0, opcode) 317 ZEND_END_ARG_INFO() 318 #else 319 static unsigned char arginfo_xcache_get_opcode_spec[] = { 1, BYREF_NONE }; 320 #endif 321 335 322 PHP_FUNCTION(xcache_get_opcode_spec) 336 323 { … … 357 344 /* {{{ proto mixed xcache_get_special_value(zval value) 358 345 XCache internal use only: For decompiler to get static value with type fixed */ 346 #ifdef ZEND_BEGIN_ARG_INFO_EX 347 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_special_value, 0, 0, 1) 348 ZEND_ARG_INFO(0, value) 349 ZEND_END_ARG_INFO() 350 #else 351 static unsigned char arginfo_xcache_get_special_value[] = { 1, BYREF_NONE }; 352 #endif 353 359 354 PHP_FUNCTION(xcache_get_special_value) 360 355 { … … 392 387 /* {{{ proto int xcache_get_type(zval value) 393 388 XCache internal use only for disassembler to get variable type in engine level */ 389 #ifdef ZEND_BEGIN_ARG_INFO_EX 390 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_type, 0, 0, 1) 391 ZEND_ARG_INFO(0, value) 392 ZEND_END_ARG_INFO() 393 #else 394 static unsigned char arginfo_xcache_get_type[] = { 1, BYREF_NONE }; 395 #endif 396 394 397 PHP_FUNCTION(xcache_get_type) 395 398 { … … 403 406 } 404 407 /* }}} */ 405 /* {{{ proto string xcache_coredump(int op_type) */ 408 /* {{{ proto string xcache_coredump() */ 409 #ifdef ZEND_BEGIN_ARG_INFO_EX 410 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_coredump, 0, 0, 0) 411 ZEND_END_ARG_INFO() 412 #else 413 static unsigned char arginfo_xcache_coredump[] = { 1, BYREF_NONE }; 414 #endif 415 406 416 PHP_FUNCTION(xcache_coredump) 407 417 { … … 417 427 /* }}} */ 418 428 /* {{{ proto string xcache_is_autoglobal(string name) */ 429 #ifdef ZEND_BEGIN_ARG_INFO_EX 430 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_is_autoglobal, 0, 0, 1) 431 ZEND_ARG_INFO(0, name) 432 ZEND_END_ARG_INFO() 433 #else 434 static unsigned char arginfo_xcache_is_autoglobal[] = { 1, BYREF_NONE }; 435 #endif 436 419 437 PHP_FUNCTION(xcache_is_autoglobal) 420 438 { … … 434 452 } 435 453 /* }}} */ 454 /* {{{ proto int xcache_get_refcount(mixed &variable) 455 XCache internal uses only: Get reference count of referenced variable */ 456 #ifdef ZEND_BEGIN_ARG_INFO_EX 457 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_refcount, 0, 0, 1) 458 ZEND_ARG_INFO(1, variable) 459 ZEND_END_ARG_INFO() 460 #else 461 static unsigned char arginfo_xcache_get_refcount[] = { 1, BYREF_FORCE }; 462 #endif 463 464 PHP_FUNCTION(xcache_get_refcount) 465 { 466 zval *variable; 467 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) { 468 RETURN_NULL(); 469 } 470 471 RETURN_LONG(Z_REFCOUNT(*variable) - 1); 472 } 473 /* }}} */ 474 /* {{{ proto int xcache_get_cowcount(mixed value) 475 XCache internal uses only: Get reference count of copy-on-write variable or data */ 476 #ifdef ZEND_BEGIN_ARG_INFO_EX 477 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_cowcount, 0, 0, 1) 478 ZEND_ARG_INFO(0, variable) 479 ZEND_END_ARG_INFO() 480 #else 481 static unsigned char arginfo_xcache_get_cowcount[] = { 1, BYREF_NONE }; 482 #endif 483 484 PHP_FUNCTION(xcache_get_cowcount) 485 { 486 zval *variable; 487 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) { 488 RETURN_NULL(); 489 } 490 491 RETURN_LONG(Z_REFCOUNT(*variable) - 1); 492 } 493 /* }}} */ 494 /* {{{ proto bool xcache_get_isref(mixed variable) 495 XCache internal uses only: Check if variable data is marked referenced */ 496 #ifdef ZEND_BEGIN_ARG_INFO_EX 497 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_isref, 0, 0, 1) 498 ZEND_ARG_INFO(1, variable) 499 ZEND_END_ARG_INFO() 500 #else 501 static unsigned char arginfo_xcache_get_isref[] = { 1, BYREF_FORCE }; 502 #endif 503 504 PHP_FUNCTION(xcache_get_isref) 505 { 506 zval *variable; 507 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) { 508 RETURN_NULL(); 509 } 510 511 RETURN_BOOL(Z_ISREF(*variable) && Z_REFCOUNT(*variable) >= 3); 512 } 513 /* }}} */ 436 514 static zend_function_entry xcache_functions[] = /* {{{ */ 437 515 { 438 PHP_FE(xcache_coredump, NULL) 516 #ifdef HAVE_XCACHE_DPRINT 517 PHP_FE(xcache_dprint, arginfo_xcache_dprint) 518 #endif 439 519 #ifdef HAVE_XCACHE_ASSEMBLER 440 520 PHP_FE(xcache_asm, NULL) … … 447 527 PHP_FE(xcache_decode_string, NULL) 448 528 #endif 449 PHP_FE(xcache_get_special_value, NULL) 450 PHP_FE(xcache_get_type, NULL) 451 PHP_FE(xcache_get_op_type, NULL) 452 PHP_FE(xcache_get_data_type, NULL) 453 PHP_FE(xcache_get_opcode, NULL) 454 PHP_FE(xcache_get_opcode_spec, NULL) 455 PHP_FE(xcache_is_autoglobal, NULL) 529 PHP_FE(xcache_get_special_value, arginfo_xcache_get_special_value) 530 PHP_FE(xcache_get_type, arginfo_xcache_get_type) 531 PHP_FE(xcache_get_op_type, arginfo_xcache_get_op_type) 532 PHP_FE(xcache_get_data_type, arginfo_xcache_get_data_type) 533 PHP_FE(xcache_get_opcode, arginfo_xcache_get_opcode) 534 PHP_FE(xcache_get_opcode_spec, arginfo_xcache_get_opcode_spec) 535 PHP_FE(xcache_coredump, arginfo_xcache_coredump) 536 PHP_FE(xcache_is_autoglobal, arginfo_xcache_is_autoglobal) 456 537 PHP_FE(xcache_get_refcount, arginfo_xcache_get_refcount) 457 538 PHP_FE(xcache_get_cowcount, arginfo_xcache_get_cowcount) 458 539 PHP_FE(xcache_get_isref, arginfo_xcache_get_isref) 459 #ifdef HAVE_XCACHE_DPRINT460 PHP_FE(xcache_dprint, NULL)461 #endif462 540 PHP_FE_END 463 541 };
Note: See TracChangeset
for help on using the changeset viewer.