jscript: Added jsstr_flatten helper and use it to access string buffer in date.c.

This commit is contained in:
Jacek Caban 2013-03-26 10:36:58 +01:00 committed by Alexandre Julliard
parent 16668e82fe
commit e3d940334f
2 changed files with 9 additions and 1 deletions

View file

@ -2054,7 +2054,9 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
DWORD lcid_en;
input_len = jsstr_length(input_str);
input = input_str->str;
input = jsstr_flatten(input_str);
if(!input)
return E_OUTOFMEMORY;
for(i=0; i<input_len; i++) {
if(input[i] == '(') nest_level++;

View file

@ -53,6 +53,12 @@ static inline jsstr_t *jsstr_addref(jsstr_t *str)
return str;
}
/* This will be failable in the future. */
static inline const WCHAR *jsstr_flatten(jsstr_t *str)
{
return str->str;
}
static inline BOOL jsstr_eq(jsstr_t *str1, jsstr_t *str2)
{
unsigned len = jsstr_length(str1);