Skip to content

ext/intl: GregorianCalendar using C++ upcasting operator. #19216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/intl/calendar/calendar_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ U_CFUNC void calendar_object_construct(zval *object,

CALENDAR_METHOD_FETCH_OBJECT_NO_CHECK; //populate to from object
assert(co->ucal == NULL);
co->ucal = (Calendar*)calendar;
co->ucal = calendar;
}

/* {{{ clone handler for Calendar */
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/calendar/gregoriancalendar_methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ using icu::StringPiece;
}

static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
return (GregorianCalendar*)co->ucal;
return static_cast<GregorianCalendar *>(co->ucal);
}

static bool set_gregorian_calendar_time_zone(GregorianCalendar *gcal, UErrorCode status)
Expand Down