From 9c5074a484b7f10e65471a21a7ef50dda8391509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Mon, 25 Jun 2012 10:59:58 +0200 Subject: Fix undeclared intl_locale_get_default() This was causing segfaults at least in the resourcebundle constructor. Also moved intl_locale_get_default() to a more central location and fixed a constness warning in resourcebundle_ctor(). --- ext/intl/php_intl.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ext/intl/php_intl.c') diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 59272db712..e0d1081514 100755 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -109,6 +109,14 @@ ZEND_DECLARE_MODULE_GLOBALS( intl ) +const char *intl_locale_get_default( TSRMLS_D ) +{ + if( INTL_G(default_locale) == NULL ) { + return uloc_getDefault(); + } + return INTL_G(default_locale); +} + /* {{{ Arguments info */ ZEND_BEGIN_ARG_INFO_EX(collator_static_0_args, 0, 0, 0) ZEND_END_ARG_INFO() -- cgit v1.2.1