Module: wine Branch: master Commit: eab914b968e2558fc9dc61e002b124d8c614b6fe URL: http://source.winehq.org/git/wine.git/?a=commit;h=eab914b968e2558fc9dc61e002...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Feb 24 15:23:29 2013 +0400
msvcrt: Move demangler flags to a header and use them.
---
dlls/msvcrt/cpp.c | 2 +- dlls/msvcrt/msvcrt.h | 25 ++++++++++++++++++++++--- dlls/msvcrt/undname.c | 19 ------------------- 3 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index ec0fa7df..0fbdf5f 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -592,7 +592,7 @@ const char * __thiscall MSVCRT_type_info_name(type_info * _this) * 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); + MSVCRT_malloc, MSVCRT_free, UNDNAME_NO_ARGUMENTS | UNDNAME_32_BIT_DECODE); if (name) { unsigned int len = strlen(name); diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index ba67b65..bd69224 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -251,9 +251,6 @@ void __cdecl MSVCRT_operator_delete(void*); typedef void* (__cdecl *malloc_func_t)(MSVCRT_size_t); typedef void (__cdecl *free_func_t)(void*);
-extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int); -extern char* __cdecl __unDNameEx(char *,const char*,int,malloc_func_t,free_func_t,void *,unsigned short int); - /* Setup and teardown multi threaded locks */ extern void msvcrt_init_mt_locks(void) DECLSPEC_HIDDEN; extern void msvcrt_free_mt_locks(void) DECLSPEC_HIDDEN; @@ -1012,4 +1009,26 @@ typedef struct double x; } MSVCRT__CRT_DOUBLE;
+extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int); + +/* __unDName/__unDNameEx flags */ +#define UNDNAME_COMPLETE (0x0000) +#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) /* Don't show __ in calling convention */ +#define UNDNAME_NO_MS_KEYWORDS (0x0002) /* Don't show calling convention at all */ +#define UNDNAME_NO_FUNCTION_RETURNS (0x0004) /* Don't show function/method return value */ +#define UNDNAME_NO_ALLOCATION_MODEL (0x0008) +#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) +#define UNDNAME_NO_MS_THISTYPE (0x0020) +#define UNDNAME_NO_CV_THISTYPE (0x0040) +#define UNDNAME_NO_THISTYPE (0x0060) +#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) /* Don't show access specifier (public/protected/private) */ +#define UNDNAME_NO_THROW_SIGNATURES (0x0100) +#define UNDNAME_NO_MEMBER_TYPE (0x0200) /* Don't show static/virtual specifier */ +#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) +#define UNDNAME_32_BIT_DECODE (0x0800) +#define UNDNAME_NAME_ONLY (0x1000) /* Only report the variable/method name */ +#define UNDNAME_NO_ARGUMENTS (0x2000) /* Don't show method arguments */ +#define UNDNAME_NO_SPECIAL_SYMS (0x4000) +#define UNDNAME_NO_COMPLEX_TYPE (0x8000) + #endif /* __WINE_MSVCRT_H */ diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 4fe5c2c..a997351 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -36,25 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); * - back-port this new code into tools/winedump/msmangle.c */
-#define UNDNAME_COMPLETE (0x0000) -#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) /* Don't show __ in calling convention */ -#define UNDNAME_NO_MS_KEYWORDS (0x0002) /* Don't show calling convention at all */ -#define UNDNAME_NO_FUNCTION_RETURNS (0x0004) /* Don't show function/method return value */ -#define UNDNAME_NO_ALLOCATION_MODEL (0x0008) -#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) -#define UNDNAME_NO_MS_THISTYPE (0x0020) -#define UNDNAME_NO_CV_THISTYPE (0x0040) -#define UNDNAME_NO_THISTYPE (0x0060) -#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) /* Don't show access specifier (public/protected/private) */ -#define UNDNAME_NO_THROW_SIGNATURES (0x0100) -#define UNDNAME_NO_MEMBER_TYPE (0x0200) /* Don't show static/virtual specifier */ -#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) -#define UNDNAME_32_BIT_DECODE (0x0800) -#define UNDNAME_NAME_ONLY (0x1000) /* Only report the variable/method name */ -#define UNDNAME_NO_ARGUMENTS (0x2000) /* Don't show method arguments */ -#define UNDNAME_NO_SPECIAL_SYMS (0x4000) -#define UNDNAME_NO_COMPLEX_TYPE (0x8000) - /* How data types modifiers are stored: * M (in the following definitions) is defined for * 'A', 'B', 'C' and 'D' as follows