xref: /PHP-8.2/ext/calendar/calendar_arginfo.h (revision b4ec3e9b)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: f45116785b01842f56ff923a54f65ab839b3dd61 */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_cal_days_in_month, 0, 3, IS_LONG, 0)
5 	ZEND_ARG_TYPE_INFO(0, calendar, IS_LONG, 0)
6 	ZEND_ARG_TYPE_INFO(0, month, IS_LONG, 0)
7 	ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0)
8 ZEND_END_ARG_INFO()
9 
10 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_cal_from_jd, 0, 2, IS_ARRAY, 0)
11 	ZEND_ARG_TYPE_INFO(0, julian_day, IS_LONG, 0)
12 	ZEND_ARG_TYPE_INFO(0, calendar, IS_LONG, 0)
13 ZEND_END_ARG_INFO()
14 
15 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_cal_info, 0, 0, IS_ARRAY, 0)
16 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, calendar, IS_LONG, 0, "-1")
17 ZEND_END_ARG_INFO()
18 
19 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_cal_to_jd, 0, 4, IS_LONG, 0)
20 	ZEND_ARG_TYPE_INFO(0, calendar, IS_LONG, 0)
21 	ZEND_ARG_TYPE_INFO(0, month, IS_LONG, 0)
22 	ZEND_ARG_TYPE_INFO(0, day, IS_LONG, 0)
23 	ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0)
24 ZEND_END_ARG_INFO()
25 
26 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_easter_date, 0, 0, IS_LONG, 0)
27 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, year, IS_LONG, 1, "null")
28 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "CAL_EASTER_DEFAULT")
29 ZEND_END_ARG_INFO()
30 
31 #define arginfo_easter_days arginfo_easter_date
32 
33 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_frenchtojd, 0, 3, IS_LONG, 0)
34 	ZEND_ARG_TYPE_INFO(0, month, IS_LONG, 0)
35 	ZEND_ARG_TYPE_INFO(0, day, IS_LONG, 0)
36 	ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0)
37 ZEND_END_ARG_INFO()
38 
39 #define arginfo_gregoriantojd arginfo_frenchtojd
40 
41 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_jddayofweek, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
42 	ZEND_ARG_TYPE_INFO(0, julian_day, IS_LONG, 0)
43 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "CAL_DOW_DAYNO")
44 ZEND_END_ARG_INFO()
45 
46 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_jdmonthname, 0, 2, IS_STRING, 0)
47 	ZEND_ARG_TYPE_INFO(0, julian_day, IS_LONG, 0)
48 	ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
49 ZEND_END_ARG_INFO()
50 
51 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_jdtofrench, 0, 1, IS_STRING, 0)
52 	ZEND_ARG_TYPE_INFO(0, julian_day, IS_LONG, 0)
53 ZEND_END_ARG_INFO()
54 
55 #define arginfo_jdtogregorian arginfo_jdtofrench
56 
57 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_jdtojewish, 0, 1, IS_STRING, 0)
58 	ZEND_ARG_TYPE_INFO(0, julian_day, IS_LONG, 0)
59 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, hebrew, _IS_BOOL, 0, "false")
60 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
61 ZEND_END_ARG_INFO()
62 
63 #define arginfo_jdtojulian arginfo_jdtofrench
64 
65 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_jdtounix, 0, 1, IS_LONG, 0)
66 	ZEND_ARG_TYPE_INFO(0, julian_day, IS_LONG, 0)
67 ZEND_END_ARG_INFO()
68 
69 #define arginfo_jewishtojd arginfo_frenchtojd
70 
71 #define arginfo_juliantojd arginfo_frenchtojd
72 
73 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_unixtojd, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
74 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timestamp, IS_LONG, 1, "null")
75 ZEND_END_ARG_INFO()
76 
77 
78 ZEND_FUNCTION(cal_days_in_month);
79 ZEND_FUNCTION(cal_from_jd);
80 ZEND_FUNCTION(cal_info);
81 ZEND_FUNCTION(cal_to_jd);
82 ZEND_FUNCTION(easter_date);
83 ZEND_FUNCTION(easter_days);
84 ZEND_FUNCTION(frenchtojd);
85 ZEND_FUNCTION(gregoriantojd);
86 ZEND_FUNCTION(jddayofweek);
87 ZEND_FUNCTION(jdmonthname);
88 ZEND_FUNCTION(jdtofrench);
89 ZEND_FUNCTION(jdtogregorian);
90 ZEND_FUNCTION(jdtojewish);
91 ZEND_FUNCTION(jdtojulian);
92 ZEND_FUNCTION(jdtounix);
93 ZEND_FUNCTION(jewishtojd);
94 ZEND_FUNCTION(juliantojd);
95 ZEND_FUNCTION(unixtojd);
96 
97 
98 static const zend_function_entry ext_functions[] = {
99 	ZEND_FE(cal_days_in_month, arginfo_cal_days_in_month)
100 	ZEND_FE(cal_from_jd, arginfo_cal_from_jd)
101 	ZEND_FE(cal_info, arginfo_cal_info)
102 	ZEND_FE(cal_to_jd, arginfo_cal_to_jd)
103 	ZEND_FE(easter_date, arginfo_easter_date)
104 	ZEND_FE(easter_days, arginfo_easter_days)
105 	ZEND_FE(frenchtojd, arginfo_frenchtojd)
106 	ZEND_FE(gregoriantojd, arginfo_gregoriantojd)
107 	ZEND_FE(jddayofweek, arginfo_jddayofweek)
108 	ZEND_FE(jdmonthname, arginfo_jdmonthname)
109 	ZEND_FE(jdtofrench, arginfo_jdtofrench)
110 	ZEND_FE(jdtogregorian, arginfo_jdtogregorian)
111 	ZEND_FE(jdtojewish, arginfo_jdtojewish)
112 	ZEND_FE(jdtojulian, arginfo_jdtojulian)
113 	ZEND_FE(jdtounix, arginfo_jdtounix)
114 	ZEND_FE(jewishtojd, arginfo_jewishtojd)
115 	ZEND_FE(juliantojd, arginfo_juliantojd)
116 	ZEND_FE(unixtojd, arginfo_unixtojd)
117 	ZEND_FE_END
118 };
119 
register_calendar_symbols(int module_number)120 static void register_calendar_symbols(int module_number)
121 {
122 	REGISTER_LONG_CONSTANT("CAL_GREGORIAN", CAL_GREGORIAN, CONST_PERSISTENT);
123 	REGISTER_LONG_CONSTANT("CAL_JULIAN", CAL_JULIAN, CONST_PERSISTENT);
124 	REGISTER_LONG_CONSTANT("CAL_JEWISH", CAL_JEWISH, CONST_PERSISTENT);
125 	REGISTER_LONG_CONSTANT("CAL_FRENCH", CAL_FRENCH, CONST_PERSISTENT);
126 	REGISTER_LONG_CONSTANT("CAL_NUM_CALS", CAL_NUM_CALS, CONST_PERSISTENT);
127 	REGISTER_LONG_CONSTANT("CAL_DOW_DAYNO", CAL_DOW_DAYNO, CONST_PERSISTENT);
128 	REGISTER_LONG_CONSTANT("CAL_DOW_SHORT", CAL_DOW_SHORT, CONST_PERSISTENT);
129 	REGISTER_LONG_CONSTANT("CAL_DOW_LONG", CAL_DOW_LONG, CONST_PERSISTENT);
130 	REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_SHORT", CAL_MONTH_GREGORIAN_SHORT, CONST_PERSISTENT);
131 	REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_LONG", CAL_MONTH_GREGORIAN_LONG, CONST_PERSISTENT);
132 	REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_SHORT", CAL_MONTH_JULIAN_SHORT, CONST_PERSISTENT);
133 	REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_LONG", CAL_MONTH_JULIAN_LONG, CONST_PERSISTENT);
134 	REGISTER_LONG_CONSTANT("CAL_MONTH_JEWISH", CAL_MONTH_JEWISH, CONST_PERSISTENT);
135 	REGISTER_LONG_CONSTANT("CAL_MONTH_FRENCH", CAL_MONTH_FRENCH, CONST_PERSISTENT);
136 	REGISTER_LONG_CONSTANT("CAL_EASTER_DEFAULT", CAL_EASTER_DEFAULT, CONST_PERSISTENT);
137 	REGISTER_LONG_CONSTANT("CAL_EASTER_ROMAN", CAL_EASTER_ROMAN, CONST_PERSISTENT);
138 	REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_GREGORIAN", CAL_EASTER_ALWAYS_GREGORIAN, CONST_PERSISTENT);
139 	REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_JULIAN", CAL_EASTER_ALWAYS_JULIAN, CONST_PERSISTENT);
140 	REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_ALAFIM_GERESH", CAL_JEWISH_ADD_ALAFIM_GERESH, CONST_PERSISTENT);
141 	REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_ALAFIM", CAL_JEWISH_ADD_ALAFIM, CONST_PERSISTENT);
142 	REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_GERESHAYIM", CAL_JEWISH_ADD_GERESHAYIM, CONST_PERSISTENT);
143 }
144