crypt32: Get rid of no longer needed BASE_CONTEXT.
This commit is contained in:
parent
83026a7143
commit
619bbe5d29
|
@ -25,14 +25,11 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(context);
|
WINE_DEFAULT_DEBUG_CHANNEL(context);
|
||||||
|
|
||||||
#define CONTEXT_FROM_BASE_CONTEXT(p) (void*)(p+1)
|
|
||||||
#define BASE_CONTEXT_FROM_CONTEXT(p) ((BASE_CONTEXT*)(p)-1)
|
|
||||||
|
|
||||||
void *Context_CreateDataContext(size_t contextSize, const context_vtbl_t *vtbl)
|
void *Context_CreateDataContext(size_t contextSize, const context_vtbl_t *vtbl)
|
||||||
{
|
{
|
||||||
BASE_CONTEXT *context;
|
context_t *context;
|
||||||
|
|
||||||
context = CryptMemAlloc(contextSize + sizeof(BASE_CONTEXT));
|
context = CryptMemAlloc(sizeof(context_t) + contextSize);
|
||||||
if (!context)
|
if (!context)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -47,7 +44,7 @@ void *Context_CreateDataContext(size_t contextSize, const context_vtbl_t *vtbl)
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("returning %p\n", context);
|
TRACE("returning %p\n", context);
|
||||||
return CONTEXT_FROM_BASE_CONTEXT(context);
|
return context_ptr(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
context_t *Context_CreateLinkContext(unsigned int contextSize, context_t *linked)
|
context_t *Context_CreateLinkContext(unsigned int contextSize, context_t *linked)
|
||||||
|
|
|
@ -171,7 +171,7 @@ typedef struct {
|
||||||
struct _context_t *(*clone)(context_t*,struct WINE_CRYPTCERTSTORE*,BOOL);
|
struct _context_t *(*clone)(context_t*,struct WINE_CRYPTCERTSTORE*,BOOL);
|
||||||
} context_vtbl_t;
|
} context_vtbl_t;
|
||||||
|
|
||||||
typedef struct _context_t {
|
struct _context_t {
|
||||||
const context_vtbl_t *vtbl;
|
const context_vtbl_t *vtbl;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
struct _context_t *linked;
|
struct _context_t *linked;
|
||||||
|
@ -180,7 +180,7 @@ typedef struct _context_t {
|
||||||
struct list entry;
|
struct list entry;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
} u;
|
} u;
|
||||||
} BASE_CONTEXT;
|
};
|
||||||
|
|
||||||
static inline context_t *context_from_ptr(const void *ptr)
|
static inline context_t *context_from_ptr(const void *ptr)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue