Mercurial > libpst
diff python/python-libpst.cpp @ 211:94bde95d7e18
the shared library interface should now be thread safe
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 08 Jun 2009 11:49:39 -0700 |
parents | 268458c79e9b |
children | 8b3a827b71f4 |
line wrap: on
line diff
--- a/python/python-libpst.cpp Sat Jun 06 13:53:34 2009 -0700 +++ b/python/python-libpst.cpp Mon Jun 08 11:49:39 2009 -0700 @@ -120,7 +120,12 @@ } string pst::pst_rfc2426_escape(char *str) { - return ::pst_rfc2426_escape(str); + char *result = NULL; + size_t resultlen = 0; + char *rc = ::pst_rfc2426_escape(str, &result, &resultlen); + string rrc(rc); + if (result) free(result); + return rrc; } string pst::pst_rfc2425_datetime_format(const FILETIME *ft) { @@ -136,7 +141,8 @@ } string pst::pst_default_charset(pst_item *item) { - return ::pst_default_charset(item); + char buf[30]; + return string(::pst_default_charset(item, sizeof(buf), buf)); } void pst::pst_convert_utf8_null(pst_item *item, pst_string *str) {