diff options
author | Anatol Belski <ab@php.net> | 2018-03-31 18:51:03 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-03-31 18:51:56 +0200 |
commit | 8d35a423838eb462cd39ee535c5d003073cc5f22 (patch) | |
tree | baf326dd800f1521f62bcbc5b1b1106cc0c9e76b /ext/intl/calendar | |
parent | cad2a0f9c3f07b79269c49db491d7855ac13b4d2 (diff) | |
download | php-git-8d35a423838eb462cd39ee535c5d003073cc5f22.tar.gz |
Utilize the recommended way to handle the icu namespace
Diffstat (limited to 'ext/intl/calendar')
-rw-r--r-- | ext/intl/calendar/calendar_class.cpp | 3 | ||||
-rw-r--r-- | ext/intl/calendar/calendar_class.h | 2 | ||||
-rw-r--r-- | ext/intl/calendar/calendar_methods.cpp | 2 | ||||
-rw-r--r-- | ext/intl/calendar/gregoriancalendar_methods.cpp | 7 |
4 files changed, 14 insertions, 0 deletions
diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp index 5c67051d84..4a641d967c 100644 --- a/ext/intl/calendar/calendar_class.cpp +++ b/ext/intl/calendar/calendar_class.cpp @@ -34,6 +34,9 @@ extern "C" { #include <assert.h> } +using U_ICU_NAMESPACE::GregorianCalendar; +using U_ICU_NAMESPACE::Locale; + /* {{{ Global variables */ zend_class_entry *Calendar_ce_ptr; zend_class_entry *GregorianCalendar_ce_ptr; diff --git a/ext/intl/calendar/calendar_class.h b/ext/intl/calendar/calendar_class.h index a884580a9a..3202f672a5 100644 --- a/ext/intl/calendar/calendar_class.h +++ b/ext/intl/calendar/calendar_class.h @@ -26,6 +26,8 @@ #ifndef USE_CALENDAR_POINTER typedef void Calendar; +#else +using U_ICU_NAMESPACE::Calendar; #endif typedef struct { diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index 8183ab175c..0f450c737d 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -43,6 +43,8 @@ extern "C" { } #include "../common/common_enum.h" +using U_ICU_NAMESPACE::Locale; + U_CFUNC PHP_METHOD(IntlCalendar, __construct) { zend_throw_exception( NULL, diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp index ab8ab76796..33f0cb0c8e 100644 --- a/ext/intl/calendar/gregoriancalendar_methods.cpp +++ b/ext/intl/calendar/gregoriancalendar_methods.cpp @@ -23,6 +23,8 @@ #include <unicode/locid.h> #include <unicode/calendar.h> #include <unicode/gregocal.h> +#include <unicode/ustring.h> + extern "C" { #include "../php_intl.h" #include "../intl_common.h" @@ -34,6 +36,11 @@ extern "C" { #include "zend_exceptions.h" } +using U_ICU_NAMESPACE::GregorianCalendar; +using U_ICU_NAMESPACE::Locale; +using U_ICU_NAMESPACE::UnicodeString; +using U_ICU_NAMESPACE::StringPiece; + static inline GregorianCalendar *fetch_greg(Calendar_object *co) { return (GregorianCalendar*)co->ucal; } |