Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
efd693c5
Commit
efd693c5
authored
12 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
msvcp90: Use the correct vtable pointer for type_info objects.
parent
7016a638
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msvcp90/exception.c
+29
-0
29 additions, 0 deletions
dlls/msvcp90/exception.c
dlls/msvcp90/msvcp90.h
+3
-1
3 additions, 1 deletion
dlls/msvcp90/msvcp90.h
with
32 additions
and
1 deletion
dlls/msvcp90/exception.c
+
29
−
0
View file @
efd693c5
...
...
@@ -70,6 +70,34 @@ extern const vtable_ptr MSVCP_invalid_argument_vtable;
extern
const
vtable_ptr
MSVCP_runtime_error_vtable
;
extern
const
vtable_ptr
MSVCP_failure_vtable
;
static
void
MSVCP_type_info_dtor
(
type_info
*
_this
)
{
free
(
_this
->
name
);
}
/* Unexported */
DEFINE_THISCALL_WRAPPER
(
MSVCP_type_info_vector_dtor
,
8
)
void
*
__thiscall
MSVCP_type_info_vector_dtor
(
type_info
*
_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
--
)
MSVCP_type_info_dtor
(
_this
+
i
);
MSVCRT_operator_delete
(
ptr
);
}
else
{
MSVCP_type_info_dtor
(
_this
);
if
(
flags
&
1
)
MSVCRT_operator_delete
(
_this
);
}
return
_this
;
}
DEFINE_RTTI_DATA
(
type_info
,
0
,
0
,
NULL
,
NULL
,
NULL
,
".?AVtype_info@@"
);
DEFINE_THISCALL_WRAPPER
(
MSVCP_exception_ctor
,
8
)
exception
*
__thiscall
MSVCP_exception_ctor
(
exception
*
this
,
const
char
**
name
)
{
...
...
@@ -666,6 +694,7 @@ static const cxx_exception_type failure_cxx_type = {
#ifndef __GNUC__
void
__asm_dummy_vtables
(
void
)
{
#endif
__ASM_VTABLE
(
type_info
,
""
);
__ASM_VTABLE
(
exception
,
VTABLE_ADD_FUNC
(
MSVCP_what_exception
));
__ASM_VTABLE
(
bad_alloc
,
VTABLE_ADD_FUNC
(
MSVCP_what_exception
));
__ASM_VTABLE
(
logic_error
,
VTABLE_ADD_FUNC
(
MSVCP_logic_error_what
));
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcp90/msvcp90.h
+
3
−
1
View file @
efd693c5
...
...
@@ -83,7 +83,7 @@ extern void* (__cdecl *MSVCRT_set_new_handler)(void*);
#define DEFINE_RTTI_DATA(name, off, base_classes, cl1, cl2, cl3, mangled_name) \
static const type_info name ## _type_info = { \
&MSVCP_
## name ##
_vtable, \
&MSVCP_
type_info
_vtable, \
NULL, \
mangled_name \
}; \
...
...
@@ -177,6 +177,8 @@ typedef struct __type_info
char
mangled
[
128
];
/* Variable length, but we declare it large enough for static RTTI */
}
type_info
;
extern
const
vtable_ptr
MSVCP_type_info_vtable
;
/* offsets for computing the this pointer */
typedef
struct
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment