Re: [PATCH] msvcp90: Implement time_get<char> ctors and dtors
On 06/26/15 16:51, Daniel Lehman wrote:
+ days = _Locinfo__Getdays((_Locinfo *)locinfo); Could you please change _Locinfo__Getdays header and make the cast there? Thanks to it we will much _Locinfo__Getdays mangled name. Also _Locinfo__W_Getmonths, _Locinfo__Getmonths and _Locinfo__W_Getdays header needs to be fixed. This will make this cast not needed.
+ len = strlen(days)+1; + this->days = MSVCRT_operator_new(len); + if(this->days) Please handle allocation failures as it's done in other locale classes.
time_get_char* __thiscall time_get_char_ctor_locinfo(time_get_char *this, const _Locinfo *locinfo, unsigned int refs) { - FIXME("(%p %p %d) stub\n", this, locinfo, refs); + TRACE("(%p %p %d)\n", this, locinfo, refs); + locale_facet_ctor_refs(&this->facet, refs); this->facet.vtable = &MSVCP_time_get_char_vtable; + time_get_char__Init(this, locinfo); return NULL; } You forgot to return THIS here.
Thanks, Piotr
-----Original Message----- From: Piotr Caban [mailto:piotr.caban(a)gmail.com] Sent: Friday, June 26, 2015 8:44 AM To: Daniel Lehman Cc: wine-devel(a)winehq.org Subject: Re: [PATCH] msvcp90: Implement time_get<char> ctors and dtors
On 06/26/15 16:51, Daniel Lehman wrote:
+ days = _Locinfo__Getdays((_Locinfo *)locinfo); Could you please change _Locinfo__Getdays header and make the cast there? Thanks to it we will much _Locinfo__Getdays mangled name. Also _Locinfo__W_Getmonths, _Locinfo__Getmonths and _Locinfo__W_Getdays header needs to be fixed. This will make this cast not needed.
the string c/dtors need a cast to non-const. would it be ok to do the cast in the macros at the top? something like: #define locale_string_char_dtor(this) _Yarn_char_dtor((locale_string *)this) Then the casts are in one spot and don't need to be sprinkled about Thanks daniel
On 06/26/15 18:37, Daniel Lehman wrote:
the string c/dtors need a cast to non-const. would it be ok to do the cast in the macros at the top?
something like: #define locale_string_char_dtor(this) _Yarn_char_dtor((locale_string *)this)
Then the casts are in one spot and don't need to be sprinkled about It's useful to be warned about trying to modify const data. It's why I don't think it's a good idea to do the cast in the macro. Mangled names shows that the casts are also done in native dll. As far as I can see there are only 4 functions that needs the casts.
participants (2)
-
Daniel Lehman -
Piotr Caban