Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 8)
+++ /trunk/xcache.c	(revision 9)
@@ -1152,5 +1152,6 @@
 }
 /* }}} */
-/* {{{ proto array xcache_count(int type) */
+/* {{{ proto int xcache_count(int type)
+   Return count of cache on specified cache type */
 PHP_FUNCTION(xcache_count)
 {
@@ -1158,5 +1159,6 @@
 }
 /* }}} */
-/* {{{ proto array xcache_info(int type, int id) */
+/* {{{ proto array xcache_info(int type, int id)
+   Get cache info by id on specified cache type */
 PHP_FUNCTION(xcache_info)
 {
@@ -1164,5 +1166,6 @@
 }
 /* }}} */
-/* {{{ proto array xcache_list(int type, int id) */
+/* {{{ proto array xcache_list(int type, int id)
+   Get cache entries list by id on specified cache type */
 PHP_FUNCTION(xcache_list)
 {
@@ -1170,5 +1173,6 @@
 }
 /* }}} */
-/* {{{ proto array xcache_clear_cache(int type, int id) */
+/* {{{ proto array xcache_clear_cache(int type, int id)
+   Clear cache by id on specified cache type */
 PHP_FUNCTION(xcache_clear_cache)
 {
@@ -1212,5 +1216,6 @@
 /* }}} */
 #define TIME_MAX (sizeof(time_t) == sizeof(long) ? LONG_MAX : INT_MAX)
-/* {{{ proto mixed xcache_get(string name) */
+/* {{{ proto mixed xcache_get(string name)
+   Get cached data by specified name */
 PHP_FUNCTION(xcache_get)
 {
@@ -1242,5 +1247,6 @@
 }
 /* }}} */
-/* {{{ proto bool  xcache_set(string name, mixed value [, int ttl]) */
+/* {{{ proto bool  xcache_set(string name, mixed value [, int ttl])
+   Store data to cache by specified name */
 PHP_FUNCTION(xcache_set)
 {
@@ -1268,5 +1274,6 @@
 }
 /* }}} */
-/* {{{ proto mixed xcache_isset(string name) */
+/* {{{ proto bool  xcache_isset(string name)
+   Check if an entry exists in cache by specified name */
 PHP_FUNCTION(xcache_isset)
 {
@@ -1298,5 +1305,6 @@
 }
 /* }}} */
-/* {{{ proto bool  xcache_unset(string name) */
+/* {{{ proto bool  xcache_unset(string name)
+   Unset existing data in cache by specified name */
 PHP_FUNCTION(xcache_unset)
 {
@@ -1398,5 +1406,6 @@
 }
 /* }}} */
-/* {{{ proto int xcache_inc(string name [, int value [, int ttl]]) */
+/* {{{ proto int xcache_inc(string name [, int value [, int ttl]])
+   Increase an int counter in cache by specified name, create it if not exists */
 PHP_FUNCTION(xcache_inc)
 {
@@ -1404,5 +1413,6 @@
 }
 /* }}} */
-/* {{{ proto int xcache_dec(string name [, int value [, int ttl]]) */
+/* {{{ proto int xcache_dec(string name [, int value [, int ttl]])
+   Decrease an int counter in cache by specified name, create it if not exists */
 PHP_FUNCTION(xcache_dec)
 {
@@ -1410,5 +1420,6 @@
 }
 /* }}} */
-/* {{{ proto string xcache_asm(string filename) */
+/* {{{ proto string xcache_asm(string filename)
+ */
 #ifdef HAVE_XCACHE_ASSEMBLER
 PHP_FUNCTION(xcache_asm)
@@ -1418,5 +1429,6 @@
 /* }}} */
 #ifdef HAVE_XCACHE_DISASSEMBLER
-/* {{{ proto string xcache_dasm_file(string filename) */
+/* {{{ proto array  xcache_dasm_file(string filename)
+   Disassemble file into opcode array by filename */
 PHP_FUNCTION(xcache_dasm_file)
 {
@@ -1432,5 +1444,6 @@
 }
 /* }}} */
-/* {{{ proto string xcache_dasm_string(string code) */
+/* {{{ proto array  xcache_dasm_string(string code)
+   Disassemble php code into opcode array */
 PHP_FUNCTION(xcache_dasm_string)
 {
@@ -1444,5 +1457,6 @@
 /* }}} */
 #endif
-/* {{{ proto string xcache_encode(string filename) */
+/* {{{ proto string xcache_encode(string filename)
+   Encode php file into XCache opcode encoded format */
 #ifdef HAVE_XCACHE_ENCODER
 PHP_FUNCTION(xcache_encode)
@@ -1451,7 +1465,16 @@
 #endif
 /* }}} */
-/* {{{ proto bool xcache_decode(string filename) */
+/* {{{ proto bool xcache_decode_file(string filename)
+   Decode(load) opcode from XCache encoded format file */
 #ifdef HAVE_XCACHE_DECODER
-PHP_FUNCTION(xcache_decode)
+PHP_FUNCTION(xcache_decode_file)
+{
+}
+#endif
+/* }}} */
+/* {{{ proto bool xcache_decode_string(string data)
+   Decode(load) opcode from XCache encoded format data */
+#ifdef HAVE_XCACHE_DECODER
+PHP_FUNCTION(xcache_decode_string)
 {
 }
@@ -1560,5 +1583,10 @@
 PHP_FUNCTION(xcache_coredump)
 {
-	raise(SIGSEGV);
+	if (xc_test) {
+		raise(SIGSEGV);
+	}
+	else {
+		php_error_docref(NULL TSRMLS_CC, E_WARNING, "xcache.test must be enabled to test xcache_coredump()");
+	}
 }
 /* }}} */
@@ -1594,5 +1622,6 @@
 #endif
 #ifdef HAVE_XCACHE_DECODER
-	PHP_FE(xcache_decode,            NULL)
+	PHP_FE(xcache_decode_file,       NULL)
+	PHP_FE(xcache_decode_string,     NULL)
 #endif
 #ifdef HAVE_XCACHE_COVERAGE
@@ -1623,5 +1652,6 @@
 	if (original_sigsegv_handler == xcache_sigsegv_handler) {
 		signal(SIGSEGV, original_sigsegv_handler);
-	} else {
+	}
+	else {
 		signal(SIGSEGV, SIG_DFL);
 	}
