Commit 619bbe5d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

crypt32: Get rid of no longer needed BASE_CONTEXT.

parent 83026a71
......@@ -25,14 +25,11 @@
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)
{
BASE_CONTEXT *context;
context_t *context;
context = CryptMemAlloc(contextSize + sizeof(BASE_CONTEXT));
context = CryptMemAlloc(sizeof(context_t) + contextSize);
if (!context)
return NULL;
......@@ -47,7 +44,7 @@ void *Context_CreateDataContext(size_t contextSize, const context_vtbl_t *vtbl)
}
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)
......
......@@ -171,7 +171,7 @@ typedef struct {
struct _context_t *(*clone)(context_t*,struct WINE_CRYPTCERTSTORE*,BOOL);
} context_vtbl_t;
typedef struct _context_t {
struct _context_t {
const context_vtbl_t *vtbl;
LONG ref;
struct _context_t *linked;
......@@ -180,7 +180,7 @@ typedef struct _context_t {
struct list entry;
void *ptr;
} u;
} BASE_CONTEXT;
};
static inline context_t *context_from_ptr(const void *ptr)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment