Module: wine Branch: master Commit: a3c395b7918f3d5f6110ec40a7d9edb30d29e174 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a3c395b7918f3d5f6110ec40a7...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Nov 23 16:14:11 2011 +0100
msvcp90: Added empty locale constructor and destructor implementation.
---
dlls/msvcp90/locale.c | 17 +++++++++++++---- dlls/msvcp90/msvcp90.h | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index ad6c44b..f05cc79 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -491,8 +491,16 @@ locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized) DEFINE_THISCALL_WRAPPER(locale_ctor, 4) locale* __thiscall locale_ctor(locale *this) { - FIXME("(%p) stub\n", this); - return NULL; + TRACE("(%p)\n", this); + this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); + if(!this->ptr) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + return NULL; + } + + locale__Locimp_ctor(this->ptr); + return this; }
/* ??1locale@std@@QAE@XZ */ @@ -500,13 +508,14 @@ locale* __thiscall locale_ctor(locale *this) DEFINE_THISCALL_WRAPPER(locale_dtor, 4) void __thiscall locale_dtor(locale *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + locale__Locimp_dtor(this->ptr); }
DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor, 8) locale* __thiscall MSVCP_locale_vector_dtor(locale *this, unsigned int flags) { - TRACE("(%p %x) stub\n", this, flags); + TRACE("(%p %x)\n", this, flags); if(flags & 2) { /* we have an array, with the number of elements stored before the first object */ int i, *ptr = (int *)this-1; diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index b9000a4..cb2a9b8 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -195,7 +195,7 @@ MSVCP_size_t __stdcall MSVCP_allocator_wchar_max_size(void*); /* class locale */ typedef struct { - struct locale__Locimp *ptr; + struct _locale__Locimp *ptr; } locale;
locale* __thiscall locale_ctor(locale*);