transliterator.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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: Gustavo Lopes <cataphract@php.net> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifdef HAVE_CONFIG_H
  17. #include "config.h"
  18. #endif
  19. #include "transliterator_class.h"
  20. #include "transliterator.h"
  21. #include "intl_convert.h"
  22. #include <unicode/ustring.h>
  23. /* {{{ transliterator_register_constants
  24. * Register constants common for both (OO and procedural) APIs.
  25. */
  26. void transliterator_register_constants( INIT_FUNC_ARGS )
  27. {
  28. if( !Transliterator_ce_ptr )
  29. {
  30. zend_error( E_ERROR, "Transliterator class not defined" );
  31. return;
  32. }
  33. #define TRANSLITERATOR_EXPOSE_CONST( x ) REGISTER_LONG_CONSTANT( #x, x, CONST_CS )
  34. #define TRANSLITERATOR_EXPOSE_CLASS_CONST( x ) zend_declare_class_constant_long( Transliterator_ce_ptr, ZEND_STRS( #x ) - 1, TRANSLITERATOR_##x TSRMLS_CC );
  35. #define TRANSLITERATOR_EXPOSE_CUSTOM_CLASS_CONST( name, value ) zend_declare_class_constant_long( Transliterator_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );*/
  36. /* Normalization form constants */
  37. TRANSLITERATOR_EXPOSE_CLASS_CONST( FORWARD );
  38. TRANSLITERATOR_EXPOSE_CLASS_CONST( REVERSE );
  39. #undef NORMALIZER_EXPOSE_CUSTOM_CLASS_CONST
  40. #undef NORMALIZER_EXPOSE_CLASS_CONST
  41. #undef NORMALIZER_EXPOSE_CONST
  42. }
  43. /* }}} */
  44. /*
  45. * Local variables:
  46. * tab-width: 4
  47. * c-basic-offset: 4
  48. * End:
  49. * vim600: noet sw=4 ts=4 fdm=marker
  50. * vim<600: noet sw=4 ts=4
  51. */