php_intl.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | http://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Authors: Vadim Savchuk <vsavchuk@productengine.com> |
  14. | Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
  15. | Stanislav Malyshev <stas@zend.com> |
  16. | Kirti Velankar <kirtig@yahoo-inc.com> |
  17. +----------------------------------------------------------------------+
  18. */
  19. #ifndef PHP_INTL_H
  20. #define PHP_INTL_H
  21. #include <php.h>
  22. /* Even if we're included from C++, don't introduce C++ definitions
  23. * because we were included with extern "C". The effect would be that
  24. * when the headers defined any method, they would do so with C linkage */
  25. #undef U_SHOW_CPLUSPLUS_API
  26. #define U_SHOW_CPLUSPLUS_API 0
  27. #include "collator/collator_sort.h"
  28. #include <unicode/ubrk.h>
  29. #include "intl_error.h"
  30. extern zend_module_entry intl_module_entry;
  31. #define phpext_intl_ptr &intl_module_entry
  32. #ifdef PHP_WIN32
  33. #define PHP_INTL_API __declspec(dllexport)
  34. #else
  35. #define PHP_INTL_API
  36. #endif
  37. #ifdef ZTS
  38. #include "TSRM.h"
  39. #endif
  40. ZEND_BEGIN_MODULE_GLOBALS(intl)
  41. zval* current_collator;
  42. char* default_locale;
  43. collator_compare_func_t compare_func;
  44. UBreakIterator* grapheme_iterator;
  45. intl_error g_error;
  46. long error_level;
  47. zend_bool use_exceptions;
  48. ZEND_END_MODULE_GLOBALS(intl)
  49. /* Macro to access request-wide global variables. */
  50. #ifdef ZTS
  51. #define INTL_G(v) TSRMG(intl_globals_id, zend_intl_globals *, v)
  52. #else
  53. #define INTL_G(v) (intl_globals.v)
  54. #endif
  55. ZEND_EXTERN_MODULE_GLOBALS(intl)
  56. PHP_MINIT_FUNCTION(intl);
  57. PHP_MSHUTDOWN_FUNCTION(intl);
  58. PHP_RINIT_FUNCTION(intl);
  59. PHP_RSHUTDOWN_FUNCTION(intl);
  60. PHP_MINFO_FUNCTION(intl);
  61. const char *intl_locale_get_default( TSRMLS_D );
  62. #define PHP_INTL_VERSION "1.1.0"
  63. #endif /* PHP_INTL_H */
  64. /*
  65. * Local variables:
  66. * tab-width: 4
  67. * c-basic-offset: 4
  68. * End:
  69. * vim600: noet sw=4 ts=4 fdm=marker
  70. * vim<600: noet sw=4 ts=4
  71. */