diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-02-14 21:04:47 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-02-14 21:04:47 +0000 |
commit | c672d0e3ecea6fe784250b5099f8126c0ff18ad1 (patch) | |
tree | 6540b7d4175fe7f2648270329345c2f50ff91be9 /pjlib/include/pj/types.h | |
parent | cec9d0501ccdf37cb82e398df6ec4e5bd4e1ac01 (diff) |
Changed the unicode string API and ported to ARM/WinCE
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@182 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/types.h')
-rw-r--r-- | pjlib/include/pj/types.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h index 5b22f75b..69d440a9 100644 --- a/pjlib/include/pj/types.h +++ b/pjlib/include/pj/types.h @@ -68,6 +68,23 @@ typedef int pj_status_t; /** Boolean. */ typedef int pj_bool_t; +/** Native char type, which will be equal to wchar_t for Unicode + * and char for ANSI. */ +#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 + typedef wchar_t pj_char_t; +#else + typedef char pj_char_t; +#endif + +/** This macro creates Unicode or ANSI literal string depending whether + * native platform string is Unicode or ANSI. */ +#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 +# define PJ_T(literal_str) L##literal_str +#else +# define PJ_T(literal_str) literal_str +#endif + + /** Status is OK. */ #define PJ_SUCCESS 0 |