Commit 026ea82a authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcr80: Add type_info::name partial implementation.

parent 95b69587
......@@ -465,8 +465,8 @@
@ stub -arch=win64 ?lock@reader_writer_lock@Concurrency@@QEAAXXZ
@ stub -arch=win32 ?lock_read@reader_writer_lock@Concurrency@@QAEXXZ
@ stub -arch=win64 ?lock_read@reader_writer_lock@Concurrency@@QEAAXXZ
@ stub -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z # public: char const * __thiscall type_info::name(struct __type_info_node *)const
@ stub -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z # public: char const * __ptr64 __cdecl type_info::name(struct __type_info_node * __ptr64)const __ptr64
@ thiscall -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ cdecl -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ stub -arch=win32 ?native_handle@critical_section@Concurrency@@QAEAAV12@XZ
@ stub -arch=win64 ?native_handle@critical_section@Concurrency@@QEAAAEAV12@XZ
@ cdecl -arch=arm ?raw_name@type_info@@QBAPBDXZ(ptr) MSVCRT_type_info_raw_name
......
......@@ -755,9 +755,9 @@
@ stub -arch=arm ?lock_read@reader_writer_lock@Concurrency@@QAAXXZ
@ stub -arch=i386 ?lock_read@reader_writer_lock@Concurrency@@QAEXXZ
@ stub -arch=win64 ?lock_read@reader_writer_lock@Concurrency@@QEAAXXZ
@ stub -arch=arm ?name@type_info@@QBAPBDPAU__type_info_node@@@Z
@ stub -arch=i386 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z # public: char const * __thiscall type_info::name(struct __type_info_node *)const
@ stub -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z # public: char const * __ptr64 __cdecl type_info::name(struct __type_info_node * __ptr64)const __ptr64
@ cdecl -arch=arm ?name@type_info@@QBAPBDPAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ thiscall -arch=i386 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ cdecl -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ stub -arch=arm ?native_handle@critical_section@Concurrency@@QAAAAV12@XZ
@ stub -arch=i386 ?native_handle@critical_section@Concurrency@@QAEAAV12@XZ
@ stub -arch=win64 ?native_handle@critical_section@Concurrency@@QEAAAEAV12@XZ
......
......@@ -113,8 +113,8 @@
@ cdecl -arch=win64 ?_wsopen@@YAHPEB_WHHH@Z(wstr long long long) MSVCRT__wsopen
@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) MSVCRT_type_info_before
@ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) MSVCRT_type_info_before
@ stub -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z # public: char const * __thiscall type_info::name(struct __type_info_node *)const
@ stub -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z # public: char const * __ptr64 __cdecl type_info::name(struct __type_info_node * __ptr64)const __ptr64
@ thiscall -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ cdecl -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ cdecl -arch=arm ?raw_name@type_info@@QBAPBDXZ(ptr) MSVCRT_type_info_raw_name
@ thiscall -arch=i386 ?raw_name@type_info@@QBEPBDXZ(ptr) MSVCRT_type_info_raw_name
@ cdecl -arch=win64 ?raw_name@type_info@@QEBAPEBDXZ(ptr) MSVCRT_type_info_raw_name
......
......@@ -113,8 +113,8 @@
@ cdecl -arch=win64 ?_wsopen@@YAHPEB_WHHH@Z(wstr long long long) MSVCRT__wsopen
@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) MSVCRT_type_info_before
@ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) MSVCRT_type_info_before
@ stub -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z # public: char const * __thiscall type_info::name(struct __type_info_node *)const
@ stub -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z # public: char const * __ptr64 __cdecl type_info::name(struct __type_info_node * __ptr64)const __ptr64
@ thiscall -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ cdecl -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z(ptr ptr) type_info_name_internal_method
@ cdecl -arch=arm ?raw_name@type_info@@QBAPBDXZ(ptr) MSVCRT_type_info_raw_name
@ thiscall -arch=i386 ?raw_name@type_info@@QBEPBDXZ(ptr) MSVCRT_type_info_raw_name
@ cdecl -arch=win64 ?raw_name@type_info@@QEBAPEBDXZ(ptr) MSVCRT_type_info_raw_name
......
......@@ -1191,32 +1191,7 @@ DEFINE_THISCALL_WRAPPER(type_info_name_internal_method,8)
const char * __thiscall type_info_name_internal_method(type_info * _this, struct __type_info_node *node)
{
static int once;
if (node && !once++) FIXME("type_info_node parameter ignored\n");
if (!_this->name)
{
/* Create and set the demangled name */
/* Note: mangled name in type_info struct always starts with a '.', while
* it isn't valid for mangled name.
* Is this '.' really part of the mangled name, or has it some other meaning ?
*/
char* name = __unDName(0, _this->mangled + 1, 0, MSVCRT_malloc, MSVCRT_free, 0x2800);
if (name)
{
unsigned int len = strlen(name);
/* It seems _unDName may leave blanks at the end of the demangled name */
while (len && name[--len] == ' ')
name[len] = '\0';
if (InterlockedCompareExchangePointer((void**)&_this->name, name, NULL))
{
/* Another thread set this member since we checked above - use it */
MSVCRT_free(name);
}
}
}
TRACE("(%p) returning %s\n", _this, _this->name);
return _this->name;
return MSVCRT_type_info_name(_this);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment