felipe                                   Sat, 18 Jun 2011 22:48:31 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=312266

Log:
- Added missing void param checks, and fix arginfo

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/phar/phar_object.c
    U   php/php-src/branches/PHP_5_4/ext/phar/phar_object.c
    U   php/php-src/trunk/ext/phar/phar_object.c

Modified: php/php-src/branches/PHP_5_3/ext/phar/phar_object.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/phar/phar_object.c	2011-06-18 21:13:05 UTC (rev 312265)
+++ php/php-src/branches/PHP_5_3/ext/phar/phar_object.c	2011-06-18 22:48:31 UTC (rev 312266)
@@ -1073,6 +1073,9 @@
  */
 PHP_METHOD(Phar, interceptFileFuncs)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	phar_intercept_functions(TSRMLS_C);
 }
 /* }}} */
@@ -1150,6 +1153,9 @@
  * Returns the api version */
 PHP_METHOD(Phar, apiVersion)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	RETURN_STRINGL(PHP_PHAR_API_VERSION, sizeof(PHP_PHAR_API_VERSION)-1, 1);
 }
 /* }}}*/
@@ -1192,6 +1198,9 @@
  * Returns whether phar extension supports writing and creating phars */
 PHP_METHOD(Phar, canWrite)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	RETURN_BOOL(!PHAR_G(readonly));
 }
 /* }}} */
@@ -1399,6 +1408,10 @@
  */
 PHP_METHOD(Phar, getSupportedSignatures)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
+
 	array_init(return_value);

 	add_next_index_stringl(return_value, "MD5", 3, 1);
@@ -1422,6 +1435,10 @@
  */
 PHP_METHOD(Phar, getSupportedCompression)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
+
 	array_init(return_value);
 	phar_request_initialize(TSRMLS_C);

@@ -2085,6 +2102,10 @@
 PHP_METHOD(Phar, count)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(zend_hash_num_elements(&phar_obj->arc.archive->manifest));
 }
@@ -2707,6 +2728,10 @@
 PHP_METHOD(Phar, isCompressed)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSED_GZ) {
 		RETURN_LONG(PHAR_ENT_COMPRESSED_GZ);
@@ -2727,6 +2752,10 @@
 {
 	php_stream_statbuf ssb;
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (!phar_obj->arc.archive->is_writeable) {
 		RETURN_FALSE;
@@ -2801,6 +2830,10 @@
 PHP_METHOD(Phar, getAlias)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->alias && phar_obj->arc.archive->alias != phar_obj->arc.archive->fname) {
 		RETURN_STRINGL(phar_obj->arc.archive->alias, phar_obj->arc.archive->alias_len, 1);
@@ -2814,6 +2847,10 @@
 PHP_METHOD(Phar, getPath)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_STRINGL(phar_obj->arc.archive->fname, phar_obj->arc.archive->fname_len, 1);
 }
@@ -2926,6 +2963,10 @@
 PHP_METHOD(Phar, getVersion)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_STRING(phar_obj->arc.archive->version, 1);
 }
@@ -2937,6 +2978,10 @@
 PHP_METHOD(Phar, startBuffering)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	phar_obj->arc.archive->donotflush = 1;
 }
@@ -2948,6 +2993,10 @@
 PHP_METHOD(Phar, isBuffering)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(phar_obj->arc.archive->donotflush);
 }
@@ -2961,6 +3010,10 @@
 	char *error;

 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
 		zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC,
@@ -3192,6 +3245,10 @@
 PHP_METHOD(Phar, getSignature)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->signature) {
 		char *unknown;
@@ -3232,6 +3289,10 @@
 PHP_METHOD(Phar, getModified)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(phar_obj->arc.archive->is_modified);
 }
@@ -3490,6 +3551,10 @@
 {
 	char *error;
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC,
@@ -4007,6 +4072,10 @@
 	phar_entry_info *stub;

 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip) {

@@ -4103,6 +4172,10 @@
 PHP_METHOD(Phar, getMetadata)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->metadata) {
 		if (phar_obj->arc.archive->is_persistent) {
@@ -4594,6 +4667,10 @@
 PHP_METHOD(PharFileInfo, getCompressedSize)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(entry_obj->ent.entry->compressed_filesize);
 }
@@ -4632,6 +4709,10 @@
 PHP_METHOD(PharFileInfo, getCRC32)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \
@@ -4654,6 +4735,10 @@
 PHP_METHOD(PharFileInfo, isCRCChecked)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(entry_obj->ent.entry->is_crc_checked);
 }
@@ -4665,6 +4750,10 @@
 PHP_METHOD(PharFileInfo, getPharFlags)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(entry_obj->ent.entry->flags & ~(PHAR_ENT_PERM_MASK|PHAR_ENT_COMPRESSION_MASK));
 }
@@ -4739,6 +4828,10 @@
 PHP_METHOD(PharFileInfo, hasMetadata)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(entry_obj->ent.entry->metadata != NULL);
 }
@@ -4750,6 +4843,10 @@
 PHP_METHOD(PharFileInfo, getMetadata)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->metadata) {
 		if (entry_obj->ent.entry->is_persistent) {
@@ -4827,6 +4924,10 @@
 	char *error;

 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly");
@@ -4881,6 +4982,10 @@
 	phar_entry_info *link;

 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC,
@@ -5055,6 +5160,10 @@
 {
 	char *error;
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \
@@ -5140,6 +5249,17 @@
 ZEND_END_ARG_INFO()

 PHAR_ARG_INFO
+ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_cancompress, 0, 0, 0)
+	ZEND_ARG_INFO(0, method)
+ZEND_END_ARG_INFO()
+
+PHAR_ARG_INFO
+ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_isvalidpharfilename, 0, 0, 1)
+	ZEND_ARG_INFO(0, filename)
+	ZEND_ARG_INFO(0, executable)
+ZEND_END_ARG_INFO()
+
+PHAR_ARG_INFO
 ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_loadPhar, 0, 0, 1)
 	ZEND_ARG_INFO(0, filename)
 	ZEND_ARG_INFO(0, alias)
@@ -5350,13 +5470,13 @@
 #endif
 	/* static member functions */
 	PHP_ME(Phar, apiVersion,            arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
-	PHP_ME(Phar, canCompress,           arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
+	PHP_ME(Phar, canCompress,           arginfo_phar_cancompress,  ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, canWrite,              arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, createDefaultStub,     arginfo_phar_createDS,     ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, getSupportedCompression,arginfo_phar__void,       ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, getSupportedSignatures,arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, interceptFileFuncs,    arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
-	PHP_ME(Phar, isValidPharFilename,   arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
+	PHP_ME(Phar, isValidPharFilename,   arginfo_phar_isvalidpharfilename, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, loadPhar,              arginfo_phar_loadPhar,     ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, mapPhar,               arginfo_phar_mapPhar,      ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, running,               arginfo_phar_running,      ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)

Modified: php/php-src/branches/PHP_5_4/ext/phar/phar_object.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/phar/phar_object.c	2011-06-18 21:13:05 UTC (rev 312265)
+++ php/php-src/branches/PHP_5_4/ext/phar/phar_object.c	2011-06-18 22:48:31 UTC (rev 312266)
@@ -1075,6 +1075,9 @@
  */
 PHP_METHOD(Phar, interceptFileFuncs)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	phar_intercept_functions(TSRMLS_C);
 }
 /* }}} */
@@ -1152,6 +1155,9 @@
  * Returns the api version */
 PHP_METHOD(Phar, apiVersion)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	RETURN_STRINGL(PHP_PHAR_API_VERSION, sizeof(PHP_PHAR_API_VERSION)-1, 1);
 }
 /* }}}*/
@@ -1194,6 +1200,9 @@
  * Returns whether phar extension supports writing and creating phars */
 PHP_METHOD(Phar, canWrite)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	RETURN_BOOL(!PHAR_G(readonly));
 }
 /* }}} */
@@ -1401,6 +1410,10 @@
  */
 PHP_METHOD(Phar, getSupportedSignatures)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
+
 	array_init(return_value);

 	add_next_index_stringl(return_value, "MD5", 3, 1);
@@ -1424,6 +1437,10 @@
  */
 PHP_METHOD(Phar, getSupportedCompression)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
+
 	array_init(return_value);
 	phar_request_initialize(TSRMLS_C);

@@ -2087,6 +2104,10 @@
 PHP_METHOD(Phar, count)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(zend_hash_num_elements(&phar_obj->arc.archive->manifest));
 }
@@ -2710,6 +2731,10 @@
 PHP_METHOD(Phar, isCompressed)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSED_GZ) {
 		RETURN_LONG(PHAR_ENT_COMPRESSED_GZ);
@@ -2730,6 +2755,10 @@
 {
 	php_stream_statbuf ssb;
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (!phar_obj->arc.archive->is_writeable) {
 		RETURN_FALSE;
@@ -2804,6 +2833,10 @@
 PHP_METHOD(Phar, getAlias)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->alias && phar_obj->arc.archive->alias != phar_obj->arc.archive->fname) {
 		RETURN_STRINGL(phar_obj->arc.archive->alias, phar_obj->arc.archive->alias_len, 1);
@@ -2817,6 +2850,10 @@
 PHP_METHOD(Phar, getPath)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_STRINGL(phar_obj->arc.archive->fname, phar_obj->arc.archive->fname_len, 1);
 }
@@ -2929,6 +2966,10 @@
 PHP_METHOD(Phar, getVersion)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_STRING(phar_obj->arc.archive->version, 1);
 }
@@ -2940,6 +2981,10 @@
 PHP_METHOD(Phar, startBuffering)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	phar_obj->arc.archive->donotflush = 1;
 }
@@ -2951,6 +2996,10 @@
 PHP_METHOD(Phar, isBuffering)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(phar_obj->arc.archive->donotflush);
 }
@@ -2964,6 +3013,10 @@
 	char *error;

 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
 		zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC,
@@ -3195,6 +3248,10 @@
 PHP_METHOD(Phar, getSignature)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->signature) {
 		char *unknown;
@@ -3235,6 +3292,10 @@
 PHP_METHOD(Phar, getModified)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(phar_obj->arc.archive->is_modified);
 }
@@ -3493,6 +3554,10 @@
 {
 	char *error;
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC,
@@ -4010,6 +4075,10 @@
 	phar_entry_info *stub;

 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip) {

@@ -4106,6 +4175,10 @@
 PHP_METHOD(Phar, getMetadata)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->metadata) {
 		if (phar_obj->arc.archive->is_persistent) {
@@ -4598,6 +4671,10 @@
 PHP_METHOD(PharFileInfo, getCompressedSize)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(entry_obj->ent.entry->compressed_filesize);
 }
@@ -4636,6 +4713,10 @@
 PHP_METHOD(PharFileInfo, getCRC32)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \
@@ -4658,6 +4739,10 @@
 PHP_METHOD(PharFileInfo, isCRCChecked)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(entry_obj->ent.entry->is_crc_checked);
 }
@@ -4669,6 +4754,10 @@
 PHP_METHOD(PharFileInfo, getPharFlags)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(entry_obj->ent.entry->flags & ~(PHAR_ENT_PERM_MASK|PHAR_ENT_COMPRESSION_MASK));
 }
@@ -4743,6 +4832,10 @@
 PHP_METHOD(PharFileInfo, hasMetadata)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(entry_obj->ent.entry->metadata != NULL);
 }
@@ -4754,6 +4847,10 @@
 PHP_METHOD(PharFileInfo, getMetadata)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->metadata) {
 		if (entry_obj->ent.entry->is_persistent) {
@@ -4831,6 +4928,10 @@
 	char *error;

 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly");
@@ -4885,6 +4986,10 @@
 	phar_entry_info *link;

 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC,
@@ -5059,6 +5164,10 @@
 {
 	char *error;
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \
@@ -5144,6 +5253,17 @@
 ZEND_END_ARG_INFO()

 PHAR_ARG_INFO
+ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_cancompress, 0, 0, 0)
+	ZEND_ARG_INFO(0, method)
+ZEND_END_ARG_INFO()
+
+PHAR_ARG_INFO
+ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_isvalidpharfilename, 0, 0, 1)
+	ZEND_ARG_INFO(0, filename)
+	ZEND_ARG_INFO(0, executable)
+ZEND_END_ARG_INFO()
+
+PHAR_ARG_INFO
 ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_loadPhar, 0, 0, 1)
 	ZEND_ARG_INFO(0, filename)
 	ZEND_ARG_INFO(0, alias)
@@ -5354,13 +5474,13 @@
 #endif
 	/* static member functions */
 	PHP_ME(Phar, apiVersion,            arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
-	PHP_ME(Phar, canCompress,           arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
+	PHP_ME(Phar, canCompress,           arginfo_phar_cancompress,  ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, canWrite,              arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, createDefaultStub,     arginfo_phar_createDS,     ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, getSupportedCompression,arginfo_phar__void,       ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, getSupportedSignatures,arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, interceptFileFuncs,    arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
-	PHP_ME(Phar, isValidPharFilename,   arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
+	PHP_ME(Phar, isValidPharFilename,   arginfo_phar_isvalidpharfilename, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, loadPhar,              arginfo_phar_loadPhar,     ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, mapPhar,               arginfo_phar_mapPhar,      ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, running,               arginfo_phar_running,      ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)

Modified: php/php-src/trunk/ext/phar/phar_object.c
===================================================================
--- php/php-src/trunk/ext/phar/phar_object.c	2011-06-18 21:13:05 UTC (rev 312265)
+++ php/php-src/trunk/ext/phar/phar_object.c	2011-06-18 22:48:31 UTC (rev 312266)
@@ -1075,6 +1075,9 @@
  */
 PHP_METHOD(Phar, interceptFileFuncs)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	phar_intercept_functions(TSRMLS_C);
 }
 /* }}} */
@@ -1152,6 +1155,9 @@
  * Returns the api version */
 PHP_METHOD(Phar, apiVersion)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	RETURN_STRINGL(PHP_PHAR_API_VERSION, sizeof(PHP_PHAR_API_VERSION)-1, 1);
 }
 /* }}}*/
@@ -1194,6 +1200,9 @@
  * Returns whether phar extension supports writing and creating phars */
 PHP_METHOD(Phar, canWrite)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
 	RETURN_BOOL(!PHAR_G(readonly));
 }
 /* }}} */
@@ -1401,6 +1410,10 @@
  */
 PHP_METHOD(Phar, getSupportedSignatures)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
+
 	array_init(return_value);

 	add_next_index_stringl(return_value, "MD5", 3, 1);
@@ -1424,6 +1437,10 @@
  */
 PHP_METHOD(Phar, getSupportedCompression)
 {
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
+
 	array_init(return_value);
 	phar_request_initialize(TSRMLS_C);

@@ -2087,6 +2104,10 @@
 PHP_METHOD(Phar, count)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(zend_hash_num_elements(&phar_obj->arc.archive->manifest));
 }
@@ -2710,6 +2731,10 @@
 PHP_METHOD(Phar, isCompressed)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSED_GZ) {
 		RETURN_LONG(PHAR_ENT_COMPRESSED_GZ);
@@ -2730,6 +2755,10 @@
 {
 	php_stream_statbuf ssb;
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (!phar_obj->arc.archive->is_writeable) {
 		RETURN_FALSE;
@@ -2804,6 +2833,10 @@
 PHP_METHOD(Phar, getAlias)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->alias && phar_obj->arc.archive->alias != phar_obj->arc.archive->fname) {
 		RETURN_STRINGL(phar_obj->arc.archive->alias, phar_obj->arc.archive->alias_len, 1);
@@ -2817,6 +2850,10 @@
 PHP_METHOD(Phar, getPath)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_STRINGL(phar_obj->arc.archive->fname, phar_obj->arc.archive->fname_len, 1);
 }
@@ -2929,6 +2966,10 @@
 PHP_METHOD(Phar, getVersion)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_STRING(phar_obj->arc.archive->version, 1);
 }
@@ -2940,6 +2981,10 @@
 PHP_METHOD(Phar, startBuffering)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	phar_obj->arc.archive->donotflush = 1;
 }
@@ -2951,6 +2996,10 @@
 PHP_METHOD(Phar, isBuffering)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(phar_obj->arc.archive->donotflush);
 }
@@ -2964,6 +3013,10 @@
 	char *error;

 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
 		zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC,
@@ -3195,6 +3248,10 @@
 PHP_METHOD(Phar, getSignature)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->signature) {
 		char *unknown;
@@ -3235,6 +3292,10 @@
 PHP_METHOD(Phar, getModified)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(phar_obj->arc.archive->is_modified);
 }
@@ -3493,6 +3554,10 @@
 {
 	char *error;
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC,
@@ -4010,6 +4075,10 @@
 	phar_entry_info *stub;

 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip) {

@@ -4106,6 +4175,10 @@
 PHP_METHOD(Phar, getMetadata)
 {
 	PHAR_ARCHIVE_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (phar_obj->arc.archive->metadata) {
 		if (phar_obj->arc.archive->is_persistent) {
@@ -4598,6 +4671,10 @@
 PHP_METHOD(PharFileInfo, getCompressedSize)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(entry_obj->ent.entry->compressed_filesize);
 }
@@ -4636,6 +4713,10 @@
 PHP_METHOD(PharFileInfo, getCRC32)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \
@@ -4658,6 +4739,10 @@
 PHP_METHOD(PharFileInfo, isCRCChecked)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(entry_obj->ent.entry->is_crc_checked);
 }
@@ -4669,6 +4754,10 @@
 PHP_METHOD(PharFileInfo, getPharFlags)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_LONG(entry_obj->ent.entry->flags & ~(PHAR_ENT_PERM_MASK|PHAR_ENT_COMPRESSION_MASK));
 }
@@ -4743,6 +4832,10 @@
 PHP_METHOD(PharFileInfo, hasMetadata)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	RETURN_BOOL(entry_obj->ent.entry->metadata != NULL);
 }
@@ -4754,6 +4847,10 @@
 PHP_METHOD(PharFileInfo, getMetadata)
 {
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->metadata) {
 		if (entry_obj->ent.entry->is_persistent) {
@@ -4831,6 +4928,10 @@
 	char *error;

 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly");
@@ -4885,6 +4986,10 @@
 	phar_entry_info *link;

 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC,
@@ -5059,6 +5164,10 @@
 {
 	char *error;
 	PHAR_ENTRY_OBJECT();
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}

 	if (entry_obj->ent.entry->is_dir) {
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, \
@@ -5144,6 +5253,17 @@
 ZEND_END_ARG_INFO()

 PHAR_ARG_INFO
+ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_cancompress, 0, 0, 0)
+	ZEND_ARG_INFO(0, method)
+ZEND_END_ARG_INFO()
+
+PHAR_ARG_INFO
+ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_isvalidpharfilename, 0, 0, 1)
+	ZEND_ARG_INFO(0, filename)
+	ZEND_ARG_INFO(0, executable)
+ZEND_END_ARG_INFO()
+
+PHAR_ARG_INFO
 ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_loadPhar, 0, 0, 1)
 	ZEND_ARG_INFO(0, filename)
 	ZEND_ARG_INFO(0, alias)
@@ -5354,13 +5474,13 @@
 #endif
 	/* static member functions */
 	PHP_ME(Phar, apiVersion,            arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
-	PHP_ME(Phar, canCompress,           arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
+	PHP_ME(Phar, canCompress,           arginfo_phar_cancompress,  ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, canWrite,              arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, createDefaultStub,     arginfo_phar_createDS,     ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, getSupportedCompression,arginfo_phar__void,       ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, getSupportedSignatures,arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, interceptFileFuncs,    arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
-	PHP_ME(Phar, isValidPharFilename,   arginfo_phar__void,        ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
+	PHP_ME(Phar, isValidPharFilename,   arginfo_phar_isvalidpharfilename, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, loadPhar,              arginfo_phar_loadPhar,     ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, mapPhar,               arginfo_phar_mapPhar,      ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
 	PHP_ME(Phar, running,               arginfo_phar_running,      ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to