Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1a0f1bc6
Commit
1a0f1bc6
authored
Oct 14, 2007
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Oct 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use FIELD_OFFSET instead of pointer cast.
parent
3ab66cd0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
system.c
dlls/kernel32/system.c
+1
-1
thunk.c
dlls/kernel32/thunk.c
+4
-4
No files found.
dlls/kernel32/system.c
View file @
1a0f1bc6
...
...
@@ -174,7 +174,7 @@ static void call_timer_proc16( WORD timer )
context
.
SegGs
=
wine_get_gs
();
context
.
SegCs
=
SELECTOROF
(
proc
);
context
.
Eip
=
OFFSETOF
(
proc
);
context
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
(
WORD
)
&
((
STACK16FRAME
*
)
0
)
->
bp
;
context
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
FIELD_OFFSET
(
STACK16FRAME
,
bp
)
;
context
.
Eax
=
timer
;
WOWCallback16Ex
(
0
,
WCB16_REGS
,
0
,
NULL
,
(
DWORD
*
)
&
context
);
...
...
dlls/kernel32/thunk.c
View file @
1a0f1bc6
...
...
@@ -462,7 +462,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT86 *context )
context16
.
Eip
=
LOWORD
(
context
->
Edx
);
/* point EBP to the STACK16FRAME on the stack
* for the call_to_16 to set up the register content on calling */
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
(
WORD
)
&
((
STACK16FRAME
*
)
0
)
->
bp
;
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
FIELD_OFFSET
(
STACK16FRAME
,
bp
)
;
/*
* used to be (problematic):
...
...
@@ -594,7 +594,7 @@ void WINAPI __regs_FT_Thunk( CONTEXT86 *context )
context16
.
SegGs
=
wine_get_gs
();
context16
.
SegCs
=
HIWORD
(
callTarget
);
context16
.
Eip
=
LOWORD
(
callTarget
);
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
(
WORD
)
&
((
STACK16FRAME
*
)
0
)
->
bp
;
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
FIELD_OFFSET
(
STACK16FRAME
,
bp
)
;
argsize
=
context
->
Ebp
-
context
->
Esp
-
0x40
;
if
(
argsize
>
sizeof
(
newstack
))
argsize
=
sizeof
(
newstack
);
...
...
@@ -760,7 +760,7 @@ void WINAPI __regs_Common32ThkLS( CONTEXT86 *context )
context16
.
Edi
=
LOWORD
(
context
->
Ecx
);
context16
.
SegCs
=
HIWORD
(
context
->
Eax
);
context16
.
Eip
=
LOWORD
(
context
->
Eax
);
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
(
WORD
)
&
((
STACK16FRAME
*
)
0
)
->
bp
;
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
FIELD_OFFSET
(
STACK16FRAME
,
bp
)
;
argsize
=
HIWORD
(
context
->
Edx
)
*
4
;
...
...
@@ -820,7 +820,7 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT86 *context )
context16
.
SegGs
=
wine_get_gs
();
context16
.
SegCs
=
HIWORD
(
context
->
Edx
);
context16
.
Eip
=
LOWORD
(
context
->
Edx
);
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
(
WORD
)
&
((
STACK16FRAME
*
)
0
)
->
bp
;
context16
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
FIELD_OFFSET
(
STACK16FRAME
,
bp
)
;
argsize
=
2
*
*
(
WORD
*
)
context
->
Esp
+
2
;
...
...
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