@@ -915,9 +915,7 @@ PHP_METHOD(Phar, mungServer)
915915 */
916916PHP_METHOD (Phar , interceptFileFuncs )
917917{
918- if (zend_parse_parameters_none () == FAILURE ) {
919- RETURN_THROWS ();
920- }
918+ ZEND_PARSE_PARAMETERS_NONE ();
921919 phar_intercept_functions ();
922920}
923921/* }}} */
@@ -991,9 +989,7 @@ PHP_METHOD(Phar, loadPhar)
991989/* {{{ Returns the api version */
992990PHP_METHOD (Phar , apiVersion )
993991{
994- if (zend_parse_parameters_none () == FAILURE ) {
995- RETURN_THROWS ();
996- }
992+ ZEND_PARSE_PARAMETERS_NONE ();
997993 RETURN_STRINGL (PHP_PHAR_API_VERSION , sizeof (PHP_PHAR_API_VERSION )- 1 );
998994}
999995/* }}}*/
@@ -1022,9 +1018,7 @@ PHP_METHOD(Phar, canCompress)
10221018/* {{{ Returns whether phar extension supports writing and creating phars */
10231019PHP_METHOD (Phar , canWrite )
10241020{
1025- if (zend_parse_parameters_none () == FAILURE ) {
1026- RETURN_THROWS ();
1027- }
1021+ ZEND_PARSE_PARAMETERS_NONE ();
10281022 RETURN_BOOL (!PHAR_G (readonly ));
10291023}
10301024/* }}} */
@@ -1220,9 +1214,7 @@ PHP_METHOD(Phar, __construct)
12201214/* {{{ Return array of supported signature types */
12211215PHP_METHOD (Phar , getSupportedSignatures )
12221216{
1223- if (zend_parse_parameters_none () == FAILURE ) {
1224- RETURN_THROWS ();
1225- }
1217+ ZEND_PARSE_PARAMETERS_NONE ();
12261218
12271219 array_init (return_value );
12281220
@@ -1247,9 +1239,7 @@ PHP_METHOD(Phar, getSupportedSignatures)
12471239/* {{{ Return array of supported comparession algorithms */
12481240PHP_METHOD (Phar , getSupportedCompression )
12491241{
1250- if (zend_parse_parameters_none () == FAILURE ) {
1251- RETURN_THROWS ();
1252- }
1242+ ZEND_PARSE_PARAMETERS_NONE ();
12531243
12541244 array_init (return_value );
12551245 phar_request_initialize ();
@@ -1334,9 +1324,7 @@ PHP_METHOD(Phar, __destruct)
13341324{
13351325 phar_archive_object * phar_obj = PHAR_FETCH_INTERNAL ();
13361326
1337- if (zend_parse_parameters_none () == FAILURE ) {
1338- RETURN_THROWS ();
1339- }
1327+ ZEND_PARSE_PARAMETERS_NONE ();
13401328
13411329 if (phar_obj -> archive && phar_obj -> archive -> is_persistent ) {
13421330 zend_hash_str_del (& PHAR_G (phar_persist_map ), (const char * ) phar_obj -> archive , sizeof (phar_obj -> archive ));
@@ -2511,9 +2499,7 @@ PHP_METHOD(Phar, convertToData)
25112499 */
25122500PHP_METHOD (Phar , isCompressed )
25132501{
2514- if (zend_parse_parameters_none () == FAILURE ) {
2515- RETURN_THROWS ();
2516- }
2502+ ZEND_PARSE_PARAMETERS_NONE ();
25172503
25182504 PHAR_ARCHIVE_OBJECT ();
25192505
@@ -2534,9 +2520,7 @@ PHP_METHOD(Phar, isWritable)
25342520{
25352521 php_stream_statbuf ssb ;
25362522
2537- if (zend_parse_parameters_none () == FAILURE ) {
2538- RETURN_THROWS ();
2539- }
2523+ ZEND_PARSE_PARAMETERS_NONE ();
25402524
25412525 PHAR_ARCHIVE_OBJECT ();
25422526
@@ -2604,9 +2588,7 @@ PHP_METHOD(Phar, delete)
26042588/* {{{ Returns the alias for the Phar or NULL. */
26052589PHP_METHOD (Phar , getAlias )
26062590{
2607- if (zend_parse_parameters_none () == FAILURE ) {
2608- RETURN_THROWS ();
2609- }
2591+ ZEND_PARSE_PARAMETERS_NONE ();
26102592
26112593 PHAR_ARCHIVE_OBJECT ();
26122594
@@ -2619,9 +2601,7 @@ PHP_METHOD(Phar, getAlias)
26192601/* {{{ Returns the real path to the phar archive on disk */
26202602PHP_METHOD (Phar , getPath )
26212603{
2622- if (zend_parse_parameters_none () == FAILURE ) {
2623- RETURN_THROWS ();
2624- }
2604+ ZEND_PARSE_PARAMETERS_NONE ();
26252605
26262606 PHAR_ARCHIVE_OBJECT ();
26272607
@@ -2731,9 +2711,7 @@ PHP_METHOD(Phar, setAlias)
27312711/* {{{ Return version info of Phar archive */
27322712PHP_METHOD (Phar , getVersion )
27332713{
2734- if (zend_parse_parameters_none () == FAILURE ) {
2735- RETURN_THROWS ();
2736- }
2714+ ZEND_PARSE_PARAMETERS_NONE ();
27372715
27382716 PHAR_ARCHIVE_OBJECT ();
27392717
@@ -2744,9 +2722,7 @@ PHP_METHOD(Phar, getVersion)
27442722/* {{{ Do not flush a writeable phar (save its contents) until explicitly requested */
27452723PHP_METHOD (Phar , startBuffering )
27462724{
2747- if (zend_parse_parameters_none () == FAILURE ) {
2748- RETURN_THROWS ();
2749- }
2725+ ZEND_PARSE_PARAMETERS_NONE ();
27502726
27512727 PHAR_ARCHIVE_OBJECT ();
27522728
@@ -2757,9 +2733,7 @@ PHP_METHOD(Phar, startBuffering)
27572733/* {{{ Returns whether write operations are flushing to disk immediately. */
27582734PHP_METHOD (Phar , isBuffering )
27592735{
2760- if (zend_parse_parameters_none () == FAILURE ) {
2761- RETURN_THROWS ();
2762- }
2736+ ZEND_PARSE_PARAMETERS_NONE ();
27632737
27642738 PHAR_ARCHIVE_OBJECT ();
27652739
@@ -2772,9 +2746,7 @@ PHP_METHOD(Phar, stopBuffering)
27722746{
27732747 char * error ;
27742748
2775- if (zend_parse_parameters_none () == FAILURE ) {
2776- RETURN_THROWS ();
2777- }
2749+ ZEND_PARSE_PARAMETERS_NONE ();
27782750
27792751 PHAR_ARCHIVE_OBJECT ();
27802752
@@ -3020,9 +2992,7 @@ PHP_METHOD(Phar, setSignatureAlgorithm)
30202992/* {{{ Returns a hash signature, or FALSE if the archive is unsigned. */
30212993PHP_METHOD (Phar , getSignature )
30222994{
3023- if (zend_parse_parameters_none () == FAILURE ) {
3024- RETURN_THROWS ();
3025- }
2995+ ZEND_PARSE_PARAMETERS_NONE ();
30262996
30272997 PHAR_ARCHIVE_OBJECT ();
30282998
@@ -3067,9 +3037,7 @@ PHP_METHOD(Phar, getSignature)
30673037/* {{{ Return whether phar was modified */
30683038PHP_METHOD (Phar , getModified )
30693039{
3070- if (zend_parse_parameters_none () == FAILURE ) {
3071- RETURN_THROWS ();
3072- }
3040+ ZEND_PARSE_PARAMETERS_NONE ();
30733041
30743042 PHAR_ARCHIVE_OBJECT ();
30753043
@@ -3329,10 +3297,7 @@ PHP_METHOD(Phar, decompressFiles)
33293297{
33303298 char * error ;
33313299
3332- if (zend_parse_parameters_none () == FAILURE ) {
3333- RETURN_THROWS ();
3334-
3335- }
3300+ ZEND_PARSE_PARAMETERS_NONE ();
33363301
33373302 PHAR_ARCHIVE_OBJECT ();
33383303
@@ -3846,9 +3811,7 @@ PHP_METHOD(Phar, getStub)
38463811 php_stream_filter * filter = NULL ;
38473812 phar_entry_info * stub ;
38483813
3849- if (zend_parse_parameters_none () == FAILURE ) {
3850- RETURN_THROWS ();
3851- }
3814+ ZEND_PARSE_PARAMETERS_NONE ();
38523815
38533816 PHAR_ARCHIVE_OBJECT ();
38543817
@@ -3937,9 +3900,7 @@ PHP_METHOD(Phar, getStub)
39373900/* {{{ Returns TRUE if the phar has global metadata, FALSE otherwise. */
39383901PHP_METHOD (Phar , hasMetadata )
39393902{
3940- if (zend_parse_parameters_none () == FAILURE ) {
3941- RETURN_THROWS ();
3942- }
3903+ ZEND_PARSE_PARAMETERS_NONE ();
39433904
39443905 PHAR_ARCHIVE_OBJECT ();
39453906
@@ -4040,9 +4001,7 @@ PHP_METHOD(Phar, delMetadata)
40404001{
40414002 char * error ;
40424003
4043- if (zend_parse_parameters_none () == FAILURE ) {
4044- RETURN_THROWS ();
4045- }
4004+ ZEND_PARSE_PARAMETERS_NONE ();
40464005
40474006 PHAR_ARCHIVE_OBJECT ();
40484007
@@ -4458,9 +4417,7 @@ PHP_METHOD(PharFileInfo, __construct)
44584417/* {{{ clean up directory-based entry objects */
44594418PHP_METHOD (PharFileInfo , __destruct )
44604419{
4461- if (zend_parse_parameters_none () == FAILURE ) {
4462- RETURN_THROWS ();
4463- }
4420+ ZEND_PARSE_PARAMETERS_NONE ();
44644421
44654422 PHAR_ENTRY_OBJECT_EX (false);
44664423
@@ -4483,9 +4440,7 @@ PHP_METHOD(PharFileInfo, __destruct)
44834440/* {{{ Returns the compressed size */
44844441PHP_METHOD (PharFileInfo , getCompressedSize )
44854442{
4486- if (zend_parse_parameters_none () == FAILURE ) {
4487- RETURN_THROWS ();
4488- }
4443+ ZEND_PARSE_PARAMETERS_NONE ();
44894444
44904445 PHAR_ENTRY_OBJECT ();
44914446
@@ -4526,9 +4481,7 @@ PHP_METHOD(PharFileInfo, isCompressed)
45264481/* {{{ Returns CRC32 code or throws an exception if not CRC checked */
45274482PHP_METHOD (PharFileInfo , getCRC32 )
45284483{
4529- if (zend_parse_parameters_none () == FAILURE ) {
4530- RETURN_THROWS ();
4531- }
4484+ ZEND_PARSE_PARAMETERS_NONE ();
45324485
45334486 PHAR_ENTRY_OBJECT ();
45344487
@@ -4550,9 +4503,7 @@ PHP_METHOD(PharFileInfo, getCRC32)
45504503/* {{{ Returns whether file entry is CRC checked */
45514504PHP_METHOD (PharFileInfo , isCRCChecked )
45524505{
4553- if (zend_parse_parameters_none () == FAILURE ) {
4554- RETURN_THROWS ();
4555- }
4506+ ZEND_PARSE_PARAMETERS_NONE ();
45564507
45574508 PHAR_ENTRY_OBJECT ();
45584509
@@ -4563,9 +4514,7 @@ PHP_METHOD(PharFileInfo, isCRCChecked)
45634514/* {{{ Returns the Phar file entry flags */
45644515PHP_METHOD (PharFileInfo , getPharFlags )
45654516{
4566- if (zend_parse_parameters_none () == FAILURE ) {
4567- RETURN_THROWS ();
4568- }
4517+ ZEND_PARSE_PARAMETERS_NONE ();
45694518
45704519 PHAR_ENTRY_OBJECT ();
45714520
@@ -4638,9 +4587,7 @@ PHP_METHOD(PharFileInfo, chmod)
46384587/* {{{ Returns the metadata of the entry */
46394588PHP_METHOD (PharFileInfo , hasMetadata )
46404589{
4641- if (zend_parse_parameters_none () == FAILURE ) {
4642- RETURN_THROWS ();
4643- }
4590+ ZEND_PARSE_PARAMETERS_NONE ();
46444591
46454592 PHAR_ENTRY_OBJECT ();
46464593
@@ -4723,9 +4670,7 @@ PHP_METHOD(PharFileInfo, delMetadata)
47234670{
47244671 char * error ;
47254672
4726- if (zend_parse_parameters_none () == FAILURE ) {
4727- RETURN_THROWS ();
4728- }
4673+ ZEND_PARSE_PARAMETERS_NONE ();
47294674
47304675 PHAR_ENTRY_OBJECT ();
47314676
@@ -4780,9 +4725,7 @@ PHP_METHOD(PharFileInfo, getContent)
47804725 phar_entry_info * link ;
47814726 zend_string * str ;
47824727
4783- if (zend_parse_parameters_none () == FAILURE ) {
4784- RETURN_THROWS ();
4785- }
4728+ ZEND_PARSE_PARAMETERS_NONE ();
47864729
47874730 PHAR_ENTRY_OBJECT ();
47884731
@@ -4954,9 +4897,7 @@ PHP_METHOD(PharFileInfo, decompress)
49544897 char * error ;
49554898 char * compression_type ;
49564899
4957- if (zend_parse_parameters_none () == FAILURE ) {
4958- RETURN_THROWS ();
4959- }
4900+ ZEND_PARSE_PARAMETERS_NONE ();
49604901
49614902 PHAR_ENTRY_OBJECT ();
49624903
0 commit comments