Andrew Talbot : msvcp90: Avoid a forward declaration.
Module: wine Branch: master Commit: c8cb13f949d42dd49dc4d5cf9f389592e966f190 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8cb13f949d42dd49dc4d5cf9f... Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Aug 31 22:04:17 2011 +0100 msvcp90: Avoid a forward declaration. --- dlls/msvcp90/locale.c | 64 +++++++++++++++++++++++------------------------- 1 files changed, 31 insertions(+), 33 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index c838744..6ebfb51 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -84,7 +84,37 @@ int locale_id__Id_cnt = 0; /* ?_Clocptr(a)_Locimp@locale(a)std@@0PEAV123(a)EA */ locale__Locimp *locale__Locimp__Clocptr = NULL; -static const vtable_ptr MSVCP_locale_facet_vtable[]; +/* ??1facet(a)locale@std@@UAE(a)XZ */ +/* ??1facet(a)locale@std@@UEAA(a)XZ */ +DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4) +void __thiscall locale_facet_dtor(locale_facet *this) +{ + TRACE("(%p)\n", this); +} + +DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8) +locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int 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; + + for(i=*ptr-1; i>=0; i--) + locale_facet_dtor(this+i); + MSVCRT_operator_delete(ptr); + } else { + locale_facet_dtor(this); + if(flags & 1) + MSVCRT_operator_delete(this); + } + + return this; +} + +static const vtable_ptr MSVCP_locale_facet_vtable[] = { + (vtable_ptr)THISCALL_NAME(MSVCP_locale_facet_vector_dtor) +}; /* ??0id(a)locale@std@@QAE(a)I@Z */ /* ??0id(a)locale@std@@QEAA(a)_K@Z */ @@ -156,34 +186,6 @@ locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t return this; } -/* ??1facet(a)locale@std@@UAE(a)XZ */ -/* ??1facet(a)locale@std@@UEAA(a)XZ */ -DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4) -void __thiscall locale_facet_dtor(locale_facet *this) -{ - TRACE("(%p)\n", this); -} - -DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8) -locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int 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; - - for(i=*ptr-1; i>=0; i--) - locale_facet_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - locale_facet_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - /* ?_Incref(a)facet@locale(a)std@@QAEXXZ */ /* ?_Incref(a)facet@locale(a)std@@QEAAXXZ */ DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4) @@ -226,10 +228,6 @@ MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const loca return -1; } -static const vtable_ptr MSVCP_locale_facet_vtable[] = { - (vtable_ptr)THISCALL_NAME(MSVCP_locale_facet_vector_dtor) -}; - /* ??_F_Locimp(a)locale@std@@QAEXXZ */ /* ??_F_Locimp(a)locale@std@@QEAAXXZ */ DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4)
participants (1)
-
Alexandre Julliard