Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5e3f959a
Commit
5e3f959a
authored
Aug 20, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Simplify throw_exception helper.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c9a30f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
13 deletions
+6
-13
cpp.c
dlls/msvcrt/cpp.c
+4
-8
heap.c
dlls/msvcrt/heap.c
+1
-1
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-4
No files found.
dlls/msvcrt/cpp.c
View file @
5e3f959a
...
...
@@ -616,15 +616,11 @@ void msvcrt_init_exception(void *base)
}
#if _MSVCR_VER >= 80
void
throw_
exception
(
exception_type
et
,
HRESULT
hr
,
const
char
*
str
)
void
throw_
bad_alloc
(
void
)
{
switch
(
et
)
{
case
EXCEPTION_BAD_ALLOC
:
{
bad_alloc
e
;
__exception_ctor
(
&
e
,
str
,
&
bad_alloc_vtable
);
_CxxThrowException
(
&
e
,
&
bad_alloc_exception_type
);
}
}
bad_alloc
e
;
__exception_ctor
(
&
e
,
"bad allocation"
,
&
bad_alloc_vtable
);
_CxxThrowException
(
&
e
,
&
bad_alloc_exception_type
);
}
#endif
...
...
dlls/msvcrt/heap.c
View file @
5e3f959a
...
...
@@ -156,7 +156,7 @@ void* CDECL DECLSPEC_HOTPATCH operator_new(size_t size)
TRACE
(
"(%Iu) out of memory
\n
"
,
size
);
#if _MSVCR_VER >= 80
throw_
exception
(
EXCEPTION_BAD_ALLOC
,
0
,
"bad allocation"
);
throw_
bad_alloc
(
);
#endif
return
NULL
;
}
...
...
dlls/msvcrt/msvcrt.h
View file @
5e3f959a
...
...
@@ -187,10 +187,7 @@ extern WORD *MSVCRT__pwctype;
void
msvcrt_set_errno
(
int
)
DECLSPEC_HIDDEN
;
#if _MSVCR_VER >= 80
typedef
enum
{
EXCEPTION_BAD_ALLOC
,
}
exception_type
;
void
throw_exception
(
exception_type
,
HRESULT
,
const
char
*
)
DECLSPEC_HIDDEN
;
void
throw_bad_alloc
(
void
)
DECLSPEC_HIDDEN
;
#endif
void
__cdecl
_purecall
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment