pajoye          Mon Jan 26 22:30:58 2009 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/intl/idn       idn.c idn.h 

  Modified files:              
    /php-src/ext/intl   config.m4 php_intl.c 
  Log:
  - [DOC] add IDN support, idn_to_ascii and idn_to_utf8
    tests and MFB will follow Wednesday
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/config.m4?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
Index: php-src/ext/intl/config.m4
diff -u php-src/ext/intl/config.m4:1.1.2.3 php-src/ext/intl/config.m4:1.1.2.4
--- php-src/ext/intl/config.m4:1.1.2.3  Wed Jul 16 12:37:00 2008
+++ php-src/ext/intl/config.m4  Mon Jan 26 22:30:56 2009
@@ -51,7 +51,8 @@
     msgformat/msgformat_helpers.cpp \
     msgformat/msgformat_parse.c \
     grapheme/grapheme_string.c \
-    grapheme/grapheme_util.c,$ext_shared,,$ICU_INCS)
+    grapheme/grapheme_util.c \
+    idn/idn.c, $ext_shared,,$ICU_INCS)
 
   PHP_ADD_BUILD_DIR($ext_builddir/collator)
   PHP_ADD_BUILD_DIR($ext_builddir/common)
@@ -61,4 +62,5 @@
   PHP_ADD_BUILD_DIR($ext_builddir/locale)
   PHP_ADD_BUILD_DIR($ext_builddir/msgformat)
   PHP_ADD_BUILD_DIR($ext_builddir/grapheme)
+  PHP_ADD_BUILD_DIR($ext_builddir/idn)
 fi
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/php_intl.c?r1=1.1.2.8&r2=1.1.2.9&diff_format=u
Index: php-src/ext/intl/php_intl.c
diff -u php-src/ext/intl/php_intl.c:1.1.2.8 php-src/ext/intl/php_intl.c:1.1.2.9
--- php-src/ext/intl/php_intl.c:1.1.2.8 Mon Nov 17 11:27:55 2008
+++ php-src/ext/intl/php_intl.c Mon Jan 26 22:30:56 2009
@@ -62,6 +62,8 @@
 #include "dateformat/dateformat_parse.h"
 #include "dateformat/dateformat_data.h"
 
+#include "idn/idn.h"
+
 #include "msgformat/msgformat.h"
 #include "common/common_error.h"
 
@@ -316,6 +318,18 @@
        ZEND_ARG_INFO(0, calendar)
        ZEND_ARG_INFO(0, pattern)
 ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_idn_to_ascii, 0, 0, 1)
+       ZEND_ARG_INFO(0, domain)
+       ZEND_ARG_INFO(0, option)
+       ZEND_ARG_INFO(0, status)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_idn_to_utf8, 0, 0, 1)
+       ZEND_ARG_INFO(0, domain)
+       ZEND_ARG_INFO(0, option)
+       ZEND_ARG_INFO(0, status)
+ZEND_END_ARG_INFO()
 /* }}} */
 
 /* {{{ intl_functions
@@ -422,6 +436,10 @@
        PHP_FE( grapheme_stristr, grapheme_strstr_args )
        PHP_FE( grapheme_extract, grapheme_extract_args )
 
+       /* IDN functions */
+       PHP_FE(idn_to_ascii, arginfo_idn_to_ascii)
+       PHP_FE(idn_to_utf8, arginfo_idn_to_ascii)
+
        /* common functions */
        PHP_FE( intl_get_error_code, intl_0_args )
        PHP_FE( intl_get_error_message, intl_0_args )
@@ -521,12 +539,15 @@
        /* Expose ICU error codes to PHP scripts. */
        intl_expose_icu_error_codes( INIT_FUNC_ARGS_PASSTHRU );
 
+       /* Expose IDN constants to PHP scripts. */
+       idn_register_constants(INIT_FUNC_ARGS_PASSTHRU);
+
        /* Global error handling. */
        intl_error_init( NULL TSRMLS_CC );
 
        /* Set the default_locale value */
-       if( INTL_G(default_locale) == NULL ) {
-               INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
+       if( INTL_G(default_locale) == NULL ) {
+               INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
        }
 
        return SUCCESS;

http://cvs.php.net/viewvc.cgi/php-src/ext/intl/idn/idn.c?view=markup&rev=1.1
Index: php-src/ext/intl/idn/idn.c
+++ php-src/ext/intl/idn/idn.c

http://cvs.php.net/viewvc.cgi/php-src/ext/intl/idn/idn.h?view=markup&rev=1.1
Index: php-src/ext/intl/idn/idn.h
+++ php-src/ext/intl/idn/idn.h



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to