Mercurial > libpst
comparison 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 |
comparison
equal
deleted
inserted
replaced
210:2d1111fd70cf | 211:94bde95d7e18 |
---|---|
118 size_t pst::pst_ff_getIDblock_dec(uint64_t i_id, char **buf) { | 118 size_t pst::pst_ff_getIDblock_dec(uint64_t i_id, char **buf) { |
119 return ::pst_ff_getIDblock_dec(&pf, i_id, buf); | 119 return ::pst_ff_getIDblock_dec(&pf, i_id, buf); |
120 } | 120 } |
121 | 121 |
122 string pst::pst_rfc2426_escape(char *str) { | 122 string pst::pst_rfc2426_escape(char *str) { |
123 return ::pst_rfc2426_escape(str); | 123 char *result = NULL; |
124 size_t resultlen = 0; | |
125 char *rc = ::pst_rfc2426_escape(str, &result, &resultlen); | |
126 string rrc(rc); | |
127 if (result) free(result); | |
128 return rrc; | |
124 } | 129 } |
125 | 130 |
126 string pst::pst_rfc2425_datetime_format(const FILETIME *ft) { | 131 string pst::pst_rfc2425_datetime_format(const FILETIME *ft) { |
127 char buf[30]; | 132 char buf[30]; |
128 ::pst_rfc2425_datetime_format(ft, sizeof(buf), buf); | 133 ::pst_rfc2425_datetime_format(ft, sizeof(buf), buf); |
134 ::pst_rfc2445_datetime_format(ft, sizeof(buf), buf); | 139 ::pst_rfc2445_datetime_format(ft, sizeof(buf), buf); |
135 return string(buf); | 140 return string(buf); |
136 } | 141 } |
137 | 142 |
138 string pst::pst_default_charset(pst_item *item) { | 143 string pst::pst_default_charset(pst_item *item) { |
139 return ::pst_default_charset(item); | 144 char buf[30]; |
145 return string(::pst_default_charset(item, sizeof(buf), buf)); | |
140 } | 146 } |
141 | 147 |
142 void pst::pst_convert_utf8_null(pst_item *item, pst_string *str) { | 148 void pst::pst_convert_utf8_null(pst_item *item, pst_string *str) { |
143 ::pst_convert_utf8_null(item, str); | 149 ::pst_convert_utf8_null(item, str); |
144 } | 150 } |