msvcp90: Added locale::id class implementation.

This commit is contained in:
Piotr Caban 2011-08-24 14:38:35 +02:00 committed by Alexandre Julliard
parent 553a093fbf
commit 48ce9f9e28
3 changed files with 29 additions and 13 deletions

View File

@ -91,8 +91,10 @@ static const vtable_ptr MSVCP_locale_facet_vtable[];
DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8)
locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
{
FIXME("(%p %lu) stub\n", this, id);
return NULL;
TRACE("(%p %lu)\n", this, id);
this->id = id;
return this;
}
/* ??_Fid@locale@std@@QAEXXZ */
@ -100,8 +102,10 @@ locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4)
locale_id* __thiscall locale_id_ctor(locale_id *this)
{
FIXME("(%p) stub\n", this);
return NULL;
TRACE("(%p)\n", this);
this->id = 0;
return this;
}
/* ??Bid@locale@std@@QAEIXZ */
@ -109,16 +113,25 @@ locale_id* __thiscall locale_id_ctor(locale_id *this)
DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4)
MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this)
{
FIXME("(%p) stub\n", this);
return 0;
_Lockit lock;
TRACE("(%p)\n", this);
if(!this->id) {
_Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
this->id = ++locale_id__Id_cnt;
_Lockit_dtor(&lock);
}
return this->id;
}
/* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
/* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
int* __cdecl locale_id__Id_cnt_func(void)
{
FIXME("stub\n");
return NULL;
TRACE("\n");
return &locale_id__Id_cnt;
}
/* ??_Ffacet@locale@std@@QAEXXZ */

View File

@ -87,11 +87,6 @@ void CDECL mutex_mutex_dtor(mutex *m)
mutex_dtor(m);
}
#define _LOCK_LOCALE 0
#define _LOCK_MALLOC 1
#define _LOCK_STREAM 2
#define _LOCK_DEBUG 3
#define _MAX_LOCK 4
static CRITICAL_SECTION lockit_cs[_MAX_LOCK];
/* ?_Lockit_ctor@_Lockit@std@@SAXH@Z */

View File

@ -200,8 +200,16 @@ typedef struct {
int locktype;
} _Lockit;
#define _LOCK_LOCALE 0
#define _LOCK_MALLOC 1
#define _LOCK_STREAM 2
#define _LOCK_DEBUG 3
#define _MAX_LOCK 4
void init_lockit(void);
void free_lockit(void);
_Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
void __thiscall _Lockit_dtor(_Lockit*);
/* class mutex */
typedef struct {