1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

rpcrt4: Rename "ref_counted_vtbl" to "struct delegating_vtbl".

Get rid of the typedef, and give it a slightly more salient name (and one that
matches more of the surrounding code).
This commit is contained in:
Zebediah Figura 2022-12-12 13:54:58 -06:00 committed by Alexandre Julliard
parent 4ad5de2841
commit e85afda3b5

View file

@ -110,15 +110,15 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
};
static CRITICAL_SECTION delegating_vtbl_section = { &critsect_debug, -1, 0, 0, 0, 0 };
typedef struct
struct delegating_vtbl
{
DWORD ref;
DWORD size;
IUnknownVtbl vtbl;
/* remaining entries in vtbl */
} ref_counted_vtbl;
};
static ref_counted_vtbl *current_vtbl;
static struct delegating_vtbl *current_vtbl;
static HRESULT WINAPI delegating_QueryInterface(IUnknown *pUnk, REFIID iid, void **ppv)
@ -306,7 +306,7 @@ IUnknownVtbl *get_delegating_vtbl(DWORD num_methods)
if(!current_vtbl || num_methods > current_vtbl->size)
{
ref_counted_vtbl *table = malloc(FIELD_OFFSET(ref_counted_vtbl, vtbl) + num_methods * sizeof(void *));
struct delegating_vtbl *table = malloc(FIELD_OFFSET(struct delegating_vtbl, vtbl) + num_methods * sizeof(void *));
if (!table)
{
LeaveCriticalSection(&delegating_vtbl_section);
@ -333,7 +333,7 @@ IUnknownVtbl *get_delegating_vtbl(DWORD num_methods)
void release_delegating_vtbl(IUnknownVtbl *vtbl)
{
ref_counted_vtbl *table = (ref_counted_vtbl*)((DWORD *)vtbl - 1);
struct delegating_vtbl *table = (struct delegating_vtbl *)((DWORD *)vtbl - 1);
EnterCriticalSection(&delegating_vtbl_section);
table->ref--;