com php-src: Don't explicitly set return value on ZPP failure in ext/calendar: ext/calendar/calendar.c
| From: | Christoph Michael Becker | Date: | Sat, 17 Aug 2019 12:23:11 +0000 |
| Subject: | com php-src: Don't explicitly set return value on ZPP failure in ext/calendar: ext/calendar/calendar.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-107955@lists.php.net to get a copy of this message | ||
Commit: f50c4607231860384223f8ddb59b07deeab200f7
Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 17 Aug 2019 14:21:26 +0200
Parents: 7602169d7c0ec17390f399c96edb4a4155379913
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f50c4607231860384223f8ddb59b07deeab200f7
Log:
Don't explicitly set return value on ZPP failure in ext/calendar
Failing ZPP throws as of PHP 8.0.0, so explicitly setting a return
value is useless, and also slightly confusing.
Changed paths:
M ext/calendar/calendar.c
Diff:
diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c
index 3c7236d...3c84bc4 100644
--- a/ext/calendar/calendar.c
+++ b/ext/calendar/calendar.c
@@ -295,7 +295,7 @@ PHP_FUNCTION(cal_info)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &cal) == FAILURE) {
- RETURN_FALSE;
+ return;
}
if (cal == -1) {
@@ -331,7 +331,7 @@ PHP_FUNCTION(cal_days_in_month)
zend_long sdn_start, sdn_next;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &cal, &month, &year) ==
FAILURE) {
- RETURN_FALSE;
+ return;
}
if (cal < 0 || cal >= CAL_NUM_CALS) {
@@ -377,7 +377,7 @@ PHP_FUNCTION(cal_to_jd)
zend_long cal, month, day, year;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "llll", &cal, &month, &day,
&year) != SUCCESS) {
- RETURN_FALSE;
+ return;
}
if (cal < 0 || cal >= CAL_NUM_CALS) {
@@ -398,7 +398,7 @@ PHP_FUNCTION(cal_from_jd)
const struct cal_entry_t *calendar;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &jd, &cal) == FAILURE) {
- RETURN_FALSE;
+ return;
}
if (cal < 0 || cal >= CAL_NUM_CALS) {
@@ -449,7 +449,7 @@ PHP_FUNCTION(jdtogregorian)
int year, month, day;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &julday) == FAILURE) {
- RETURN_FALSE;
+ return;
}
SdnToGregorian(julday, &year, &month, &day);
@@ -465,7 +465,7 @@ PHP_FUNCTION(gregoriantojd)
zend_long year, month, day;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) ==
FAILURE) {
- RETURN_FALSE;
+ return;
}
RETURN_LONG(GregorianToSdn(year, month, day));
@@ -480,7 +480,7 @@ PHP_FUNCTION(jdtojulian)
int year, month, day;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &julday) == FAILURE) {
- RETURN_FALSE;
+ return;
}
SdnToJulian(julday, &year, &month, &day);
@@ -496,7 +496,7 @@ PHP_FUNCTION(juliantojd)
zend_long year, month, day;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) ==
FAILURE) {
- RETURN_FALSE;
+ return;
}
RETURN_LONG(JulianToSdn(year, month, day));
@@ -609,7 +609,7 @@ PHP_FUNCTION(jdtojewish)
char *dayp, *yearp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|bl", &julday, &heb, &fl) ==
FAILURE) {
- RETURN_FALSE;
+ return;
}
SdnToJewish(julday, &year, &month, &day);
@@ -640,7 +640,7 @@ PHP_FUNCTION(jewishtojd)
zend_long year, month, day;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) ==
FAILURE) {
- RETURN_FALSE;
+ return;
}
RETURN_LONG(JewishToSdn(year, month, day));
@@ -655,7 +655,7 @@ PHP_FUNCTION(jdtofrench)
int year, month, day;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &julday) == FAILURE) {
- RETURN_FALSE;
+ return;
}
SdnToFrench(julday, &year, &month, &day);
@@ -671,7 +671,7 @@ PHP_FUNCTION(frenchtojd)
zend_long year, month, day;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) ==
FAILURE) {
- RETURN_FALSE;
+ return;
}
RETURN_LONG(FrenchToSdn(year, month, day));
@@ -687,7 +687,7 @@ PHP_FUNCTION(jddayofweek)
const char *daynamel, *daynames;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &julday, &mode) == FAILURE) {
- RETURN_FALSE;
+ return;
}
day = DayOfWeek(julday);
@@ -718,7 +718,7 @@ PHP_FUNCTION(jdmonthname)
int month, day, year;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &julday, &mode) == FAILURE) {
- RETURN_FALSE;
+ return;
}
switch (mode) {