Changeset 321e7f6 in git
- Timestamp:
- 2006-05-20T01:53:24Z (14 years ago)
- Branches:
- 1.0, 1.1, 1.2, 1.3, 3.0, 3.1, 3.2, master, trunk
- Children:
- aab6656
- Parents:
- 93e9226
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
xcache.c
r93e9226 r321e7f6 1152 1152 } 1153 1153 /* }}} */ 1154 /* {{{ proto array xcache_count(int type) */ 1154 /* {{{ proto int xcache_count(int type) 1155 Return count of cache on specified cache type */ 1155 1156 PHP_FUNCTION(xcache_count) 1156 1157 { … … 1158 1159 } 1159 1160 /* }}} */ 1160 /* {{{ proto array xcache_info(int type, int id) */ 1161 /* {{{ proto array xcache_info(int type, int id) 1162 Get cache info by id on specified cache type */ 1161 1163 PHP_FUNCTION(xcache_info) 1162 1164 { … … 1164 1166 } 1165 1167 /* }}} */ 1166 /* {{{ proto array xcache_list(int type, int id) */ 1168 /* {{{ proto array xcache_list(int type, int id) 1169 Get cache entries list by id on specified cache type */ 1167 1170 PHP_FUNCTION(xcache_list) 1168 1171 { … … 1170 1173 } 1171 1174 /* }}} */ 1172 /* {{{ proto array xcache_clear_cache(int type, int id) */ 1175 /* {{{ proto array xcache_clear_cache(int type, int id) 1176 Clear cache by id on specified cache type */ 1173 1177 PHP_FUNCTION(xcache_clear_cache) 1174 1178 { … … 1212 1216 /* }}} */ 1213 1217 #define TIME_MAX (sizeof(time_t) == sizeof(long) ? LONG_MAX : INT_MAX) 1214 /* {{{ proto mixed xcache_get(string name) */ 1218 /* {{{ proto mixed xcache_get(string name) 1219 Get cached data by specified name */ 1215 1220 PHP_FUNCTION(xcache_get) 1216 1221 { … … 1242 1247 } 1243 1248 /* }}} */ 1244 /* {{{ proto bool xcache_set(string name, mixed value [, int ttl]) */ 1249 /* {{{ proto bool xcache_set(string name, mixed value [, int ttl]) 1250 Store data to cache by specified name */ 1245 1251 PHP_FUNCTION(xcache_set) 1246 1252 { … … 1268 1274 } 1269 1275 /* }}} */ 1270 /* {{{ proto mixed xcache_isset(string name) */ 1276 /* {{{ proto bool xcache_isset(string name) 1277 Check if an entry exists in cache by specified name */ 1271 1278 PHP_FUNCTION(xcache_isset) 1272 1279 { … … 1298 1305 } 1299 1306 /* }}} */ 1300 /* {{{ proto bool xcache_unset(string name) */ 1307 /* {{{ proto bool xcache_unset(string name) 1308 Unset existing data in cache by specified name */ 1301 1309 PHP_FUNCTION(xcache_unset) 1302 1310 { … … 1398 1406 } 1399 1407 /* }}} */ 1400 /* {{{ proto int xcache_inc(string name [, int value [, int ttl]]) */ 1408 /* {{{ proto int xcache_inc(string name [, int value [, int ttl]]) 1409 Increase an int counter in cache by specified name, create it if not exists */ 1401 1410 PHP_FUNCTION(xcache_inc) 1402 1411 { … … 1404 1413 } 1405 1414 /* }}} */ 1406 /* {{{ proto int xcache_dec(string name [, int value [, int ttl]]) */ 1415 /* {{{ proto int xcache_dec(string name [, int value [, int ttl]]) 1416 Decrease an int counter in cache by specified name, create it if not exists */ 1407 1417 PHP_FUNCTION(xcache_dec) 1408 1418 { … … 1410 1420 } 1411 1421 /* }}} */ 1412 /* {{{ proto string xcache_asm(string filename) */ 1422 /* {{{ proto string xcache_asm(string filename) 1423 */ 1413 1424 #ifdef HAVE_XCACHE_ASSEMBLER 1414 1425 PHP_FUNCTION(xcache_asm) … … 1418 1429 /* }}} */ 1419 1430 #ifdef HAVE_XCACHE_DISASSEMBLER 1420 /* {{{ proto string xcache_dasm_file(string filename) */ 1431 /* {{{ proto array xcache_dasm_file(string filename) 1432 Disassemble file into opcode array by filename */ 1421 1433 PHP_FUNCTION(xcache_dasm_file) 1422 1434 { … … 1432 1444 } 1433 1445 /* }}} */ 1434 /* {{{ proto string xcache_dasm_string(string code) */ 1446 /* {{{ proto array xcache_dasm_string(string code) 1447 Disassemble php code into opcode array */ 1435 1448 PHP_FUNCTION(xcache_dasm_string) 1436 1449 { … … 1444 1457 /* }}} */ 1445 1458 #endif 1446 /* {{{ proto string xcache_encode(string filename) */ 1459 /* {{{ proto string xcache_encode(string filename) 1460 Encode php file into XCache opcode encoded format */ 1447 1461 #ifdef HAVE_XCACHE_ENCODER 1448 1462 PHP_FUNCTION(xcache_encode) … … 1451 1465 #endif 1452 1466 /* }}} */ 1453 /* {{{ proto bool xcache_decode(string filename) */ 1467 /* {{{ proto bool xcache_decode_file(string filename) 1468 Decode(load) opcode from XCache encoded format file */ 1454 1469 #ifdef HAVE_XCACHE_DECODER 1455 PHP_FUNCTION(xcache_decode) 1470 PHP_FUNCTION(xcache_decode_file) 1471 { 1472 } 1473 #endif 1474 /* }}} */ 1475 /* {{{ proto bool xcache_decode_string(string data) 1476 Decode(load) opcode from XCache encoded format data */ 1477 #ifdef HAVE_XCACHE_DECODER 1478 PHP_FUNCTION(xcache_decode_string) 1456 1479 { 1457 1480 } … … 1560 1583 PHP_FUNCTION(xcache_coredump) 1561 1584 { 1562 raise(SIGSEGV); 1585 if (xc_test) { 1586 raise(SIGSEGV); 1587 } 1588 else { 1589 php_error_docref(NULL TSRMLS_CC, E_WARNING, "xcache.test must be enabled to test xcache_coredump()"); 1590 } 1563 1591 } 1564 1592 /* }}} */ … … 1594 1622 #endif 1595 1623 #ifdef HAVE_XCACHE_DECODER 1596 PHP_FE(xcache_decode, NULL) 1624 PHP_FE(xcache_decode_file, NULL) 1625 PHP_FE(xcache_decode_string, NULL) 1597 1626 #endif 1598 1627 #ifdef HAVE_XCACHE_COVERAGE … … 1623 1652 if (original_sigsegv_handler == xcache_sigsegv_handler) { 1624 1653 signal(SIGSEGV, original_sigsegv_handler); 1625 } else { 1654 } 1655 else { 1626 1656 signal(SIGSEGV, SIG_DFL); 1627 1657 }
Note: See TracChangeset
for help on using the changeset viewer.