Ignore:
Timestamp:
Sep 15, 2001, 11:28:23 AM (24 years ago)
Author:
sandervl
Message:

wine update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/quartz/memalloc.c

    r6649 r6710  
    1 /* $Id: memalloc.c,v 1.3 2001-09-05 13:36:37 bird Exp $ */
    21/*
    32 * Implementation of CLSID_MemoryAllocator.
     
    3130};
    3231
     32static void QUARTZ_DestroyMemoryAllocator(IUnknown* punk)
     33{
     34        CMemoryAllocator_THIS(punk,unk);
     35
     36        CMemoryAllocator_UninitIMemAllocator( This );
     37}
     38
    3339HRESULT QUARTZ_CreateMemoryAllocator(IUnknown* punkOuter,void** ppobj)
    3440{
    35     CMemoryAllocator*   pma;
     41        CMemoryAllocator*       pma;
     42        HRESULT hr;
    3643
    37     TRACE("(%p,%p)\n",punkOuter,ppobj);
     44        TRACE("(%p,%p)\n",punkOuter,ppobj);
    3845
    39     pma = (CMemoryAllocator*)QUARTZ_AllocObj( sizeof(CMemoryAllocator) );
    40     if ( pma == NULL )
    41         return E_OUTOFMEMORY;
     46        pma = (CMemoryAllocator*)QUARTZ_AllocObj( sizeof(CMemoryAllocator) );
     47        if ( pma == NULL )
     48                return E_OUTOFMEMORY;
    4249
    43     QUARTZ_IUnkInit( &pma->unk, punkOuter );
    44     CMemoryAllocator_InitIMemAllocator( pma );
     50        QUARTZ_IUnkInit( &pma->unk, punkOuter );
     51        hr = CMemoryAllocator_InitIMemAllocator( pma );
     52        if ( FAILED(hr) )
     53        {
     54                QUARTZ_FreeObj( pma );
     55                return hr;
     56        }
    4557
    46     pma->unk.pEntries = IFEntries;
    47     pma->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
     58        pma->unk.pEntries = IFEntries;
     59        pma->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
     60        pma->unk.pOnFinalRelease = QUARTZ_DestroyMemoryAllocator;
    4861
    49     *ppobj = (void*)(&pma->unk);
     62        *ppobj = (void*)(&pma->unk);
    5063
    51     return S_OK;
     64        return S_OK;
    5265}
Note: See TracChangeset for help on using the changeset viewer.