From e56ea14ab8531ee3cec375460577d1b89bf62e26 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Thu, 16 Jan 2014 05:30:46 +0000 Subject: Closed #1723: Merging pjsua2 branch into trunk git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4704 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/compat/cc_gcc.h | 2 +- pjlib/include/pj/string.h | 9 +++++++++ pjlib/include/pj/types.h | 17 ++++++++++------- 3 files changed, 20 insertions(+), 8 deletions(-) (limited to 'pjlib/include') diff --git a/pjlib/include/pj/compat/cc_gcc.h b/pjlib/include/pj/compat/cc_gcc.h index df257029..37f361b0 100644 --- a/pjlib/include/pj/compat/cc_gcc.h +++ b/pjlib/include/pj/compat/cc_gcc.h @@ -63,7 +63,7 @@ #endif #define PJ_INT64(val) val##LL -#define PJ_UINT64(val) val##LLU +#define PJ_UINT64(val) val##ULL #define PJ_INT64_FMT "L" diff --git a/pjlib/include/pj/string.h b/pjlib/include/pj/string.h index 525b4c05..57c496f3 100644 --- a/pjlib/include/pj/string.h +++ b/pjlib/include/pj/string.h @@ -574,6 +574,15 @@ PJ_DECL(unsigned long) pj_strtoul(const pj_str_t *str); PJ_DECL(unsigned long) pj_strtoul2(const pj_str_t *str, pj_str_t *endptr, unsigned base); +/** + * Convert string to float. + * + * @param str the string. + * + * @return the value. + */ +PJ_DECL(float) pj_strtof(const pj_str_t *str); + /** * Utility to convert unsigned integer to string. Note that the * string will be NULL terminated. diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h index 420ddd9b..0e0e2d9a 100644 --- a/pjlib/include/pj/types.h +++ b/pjlib/include/pj/types.h @@ -86,15 +86,18 @@ typedef int pj_bool_t; # define PJ_T(literal_str) literal_str #endif +/** Some constants */ +enum pj_constants_ +{ + /** Status is OK. */ + PJ_SUCCESS=0, -/** Status is OK. */ -#define PJ_SUCCESS 0 - -/** True value. */ -#define PJ_TRUE 1 + /** True value. */ + PJ_TRUE=1, -/** False value. */ -#define PJ_FALSE 0 + /** False value. */ + PJ_FALSE=0 +}; /** * File offset type. -- cgit v1.2.3