mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
server: Use an explicit union instead of a typedef for message data.
This commit is contained in:
parent
446f3b207f
commit
ce946e57db
5 changed files with 8 additions and 8 deletions
|
@ -2729,7 +2729,7 @@ int peek_message( MSG *msg, const struct peek_message_filter *filter )
|
|||
{
|
||||
NTSTATUS res;
|
||||
size_t size = 0;
|
||||
const message_data_t *msg_data = buffer;
|
||||
const union message_data *msg_data = buffer;
|
||||
UINT wake_mask, signal_bits, wake_bits, changed_bits, clear_bits = 0;
|
||||
|
||||
/* use the same logic as in server/queue.c get_message */
|
||||
|
@ -3320,7 +3320,7 @@ BOOL WINAPI NtUserGetMessage( MSG *msg, HWND hwnd, UINT first, UINT last )
|
|||
static BOOL put_message_in_queue( const struct send_message_info *info, size_t *reply_size )
|
||||
{
|
||||
struct packed_message data;
|
||||
message_data_t msg_data;
|
||||
union message_data msg_data;
|
||||
unsigned int res;
|
||||
int i;
|
||||
timeout_t timeout = TIMEOUT_INFINITE;
|
||||
|
|
4
include/wine/server_protocol.h
generated
4
include/wine/server_protocol.h
generated
|
@ -344,13 +344,13 @@ typedef union
|
|||
} hw;
|
||||
} hw_input_t;
|
||||
|
||||
typedef union
|
||||
union message_data
|
||||
{
|
||||
unsigned char bytes[1];
|
||||
struct hardware_msg_data hardware;
|
||||
struct callback_msg_data callback;
|
||||
struct winevent_msg_data winevent;
|
||||
} message_data_t;
|
||||
};
|
||||
|
||||
|
||||
struct filesystem_event
|
||||
|
|
|
@ -360,13 +360,13 @@ typedef union
|
|||
} hw;
|
||||
} hw_input_t;
|
||||
|
||||
typedef union
|
||||
union message_data
|
||||
{
|
||||
unsigned char bytes[1]; /* raw data for sent messages */
|
||||
struct hardware_msg_data hardware;
|
||||
struct callback_msg_data callback;
|
||||
struct winevent_msg_data winevent;
|
||||
} message_data_t;
|
||||
};
|
||||
|
||||
/* structure returned in filesystem events */
|
||||
struct filesystem_event
|
||||
|
|
2
server/request_handlers.h
generated
2
server/request_handlers.h
generated
|
@ -613,7 +613,6 @@ C_ASSERT( sizeof(ioctl_code_t) == 4 );
|
|||
C_ASSERT( sizeof(irp_params_t) == 32 );
|
||||
C_ASSERT( sizeof(lparam_t) == 8 );
|
||||
C_ASSERT( sizeof(mem_size_t) == 8 );
|
||||
C_ASSERT( sizeof(message_data_t) == 48 );
|
||||
C_ASSERT( sizeof(mod_handle_t) == 8 );
|
||||
C_ASSERT( sizeof(obj_handle_t) == 4 );
|
||||
C_ASSERT( sizeof(obj_locator_t) == 16 );
|
||||
|
@ -642,6 +641,7 @@ C_ASSERT( sizeof(timeout_t) == 8 );
|
|||
C_ASSERT( sizeof(udp_endpoint) == 32 );
|
||||
C_ASSERT( sizeof(union apc_call) == 64 );
|
||||
C_ASSERT( sizeof(union apc_result) == 40 );
|
||||
C_ASSERT( sizeof(union message_data) == 48 );
|
||||
C_ASSERT( sizeof(unsigned __int64) == 8 );
|
||||
C_ASSERT( sizeof(unsigned char) == 1 );
|
||||
C_ASSERT( sizeof(unsigned int) == 4 );
|
||||
|
|
|
@ -47,7 +47,6 @@ my %formats =
|
|||
"context_t" => [ 1728, 8 ],
|
||||
"cursor_pos_t" => [ 24, 8 ],
|
||||
"debug_event_t" => [ 160, 8 ],
|
||||
"message_data_t" => [ 48, 8 ],
|
||||
"pe_image_info_t" => [ 88, 8 ],
|
||||
"property_data_t" => [ 16, 8 ],
|
||||
"select_op_t" => [ 264, 8 ],
|
||||
|
@ -61,6 +60,7 @@ my %formats =
|
|||
"struct handle_info" => [ 20, 4 ],
|
||||
"struct luid" => [ 8, 4 ],
|
||||
"struct luid_attr" => [ 12, 4 ],
|
||||
"union message_data" => [ 48, 8 ],
|
||||
"struct object_attributes" => [ 16, 4 ],
|
||||
"struct object_type_info" => [ 44, 4 ],
|
||||
"struct process_info" => [ 40, 8 ],
|
||||
|
|
Loading…
Reference in a new issue