Now that name undecoration works, fix the type info.
This commit is contained in:
parent
98f94544ac
commit
a2d24c8a4a
@ -565,16 +565,19 @@ const char * __stdcall MSVCRT_type_info_name(type_info * _this)
|
|||||||
if (!_this->name)
|
if (!_this->name)
|
||||||
{
|
{
|
||||||
/* Create and set the demangled name */
|
/* Create and set the demangled name */
|
||||||
char* name = __unDName(0, _this->mangled, 0,
|
/* Nota: mangled name in type_info struct always start with a '.', while
|
||||||
(malloc_func_t)MSVCRT_malloc,
|
* it isn't valid for mangled name.
|
||||||
(free_func_t)MSVCRT_free, 0x2800);
|
* 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)
|
if (name)
|
||||||
{
|
{
|
||||||
unsigned int len = strlen(name);
|
unsigned int len = strlen(name);
|
||||||
|
|
||||||
/* It seems _unDName may leave blanks at the end of the demangled name */
|
/* It seems _unDName may leave blanks at the end of the demangled name */
|
||||||
if (name[len] == ' ')
|
while (len && name[--len] == ' ')
|
||||||
name[len] = '\0';
|
name[len] = '\0';
|
||||||
|
|
||||||
_mlock(_EXIT_LOCK2);
|
_mlock(_EXIT_LOCK2);
|
||||||
|
@ -748,11 +748,7 @@ static void test_type_info(void)
|
|||||||
name = call_func1(ptype_info_name, &t1);
|
name = call_func1(ptype_info_name, &t1);
|
||||||
ok(name && t1.name && !strcmp(name, t1.name), "bad name '%s' for t1\n", name);
|
ok(name && t1.name && !strcmp(name, t1.name), "bad name '%s' for t1\n", name);
|
||||||
|
|
||||||
todo_wine
|
|
||||||
{
|
|
||||||
/* Demangling doesn't work yet, since __unDName() is a stub */
|
|
||||||
ok(t1.name && !strcmp(t1.name, "class test1"), "demangled to '%s' for t1\n", t1.name);
|
ok(t1.name && !strcmp(t1.name, "class test1"), "demangled to '%s' for t1\n", t1.name);
|
||||||
}
|
|
||||||
call_func1(ptype_info_dtor, &t1);
|
call_func1(ptype_info_dtor, &t1);
|
||||||
|
|
||||||
/* before */
|
/* before */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user