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
772e56a2
Commit
772e56a2
authored
Jan 21, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Get rid of ICOM_VFIELD_MULTI_NAME and ICOM_VFIELD_OFFSET.
parent
9a0c885e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
ddcomimpl.h
dlls/ddraw/ddcomimpl.h
+2
-10
No files found.
dlls/ddraw/ddcomimpl.h
View file @
772e56a2
...
@@ -22,23 +22,15 @@
...
@@ -22,23 +22,15 @@
#include <stddef.h>
#include <stddef.h>
/* Generates the name for a vtable pointer for a given interface. */
/* The canonical name for a single interface is "lpVtbl". */
#define ICOM_VFIELD_MULTI_NAME(iface) iface##_vtbl
/* Returns the offset of a vtable pointer within an implementation object. */
#define ICOM_VFIELD_OFFSET(impltype, iface) \
offsetof(impltype, ICOM_VFIELD_MULTI_NAME(iface))
/* Given an interface pointer, returns the implementation pointer. */
/* Given an interface pointer, returns the implementation pointer. */
#define ICOM_OBJECT(impltype, ifacename, ifaceptr) \
#define ICOM_OBJECT(impltype, ifacename, ifaceptr) \
(impltype*)((ifaceptr) == NULL ? NULL \
(impltype*)((ifaceptr) == NULL ? NULL \
: (char*)(ifaceptr) -
ICOM_VFIELD_OFFSET(impltype,ifacename
))
: (char*)(ifaceptr) -
offsetof(impltype, ifacename##_vtbl
))
#define ICOM_THIS_FROM(impltype, ifacename, ifaceptr) \
#define ICOM_THIS_FROM(impltype, ifacename, ifaceptr) \
impltype* This = ICOM_OBJECT(impltype, ifacename, ifaceptr)
impltype* This = ICOM_OBJECT(impltype, ifacename, ifaceptr)
#define COM_INTERFACE_CAST(impltype, ifnamefrom, ifnameto, ifaceptr) \
#define COM_INTERFACE_CAST(impltype, ifnamefrom, ifnameto, ifaceptr) \
((ifaceptr) ? (ifnameto *)&(((impltype *)((char *)(ifaceptr) \
((ifaceptr) ? (ifnameto *)&(((impltype *)((char *)(ifaceptr) \
-
ICOM_VFIELD_OFFSET(impltype, ifnamefrom)))->ICOM_VFIELD_MULTI_NAME(ifnameto)
) : NULL)
-
offsetof(impltype, ifnamefrom##_vtbl)))->ifnameto##_vtbl
) : NULL)
#endif
/* _DDCOMIMPL_H_ */
#endif
/* _DDCOMIMPL_H_ */
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