withMaybeCid :: Maybe CorrelationId -> (Ptr CorrelationIdImpl -> IO a) -> IO a
withMaybeCid cid f =
    alloca $ \cidPtr -> do
      poke cidPtr (getCidImpl cid)
      cidImpl <- newCorrelationIdImpl
      withForeignPtr cidImpl $ \cidImplP -> do
        blpapi_CorrelationId_convertFromWrapped cidPtr cidImplP
        f cidImplP
withMaybeCid :: Maybe CorrelationId -> (Ptr CorrelationIdImpl -> IO a) -> IO a
withMaybeCid cid f =
    alloca $ \cidPtr -> do
      poke cidPtr (getCidImpl cid)
      cidImpl <- newCorrelationIdImpl
      withForeignPtr cidImpl $ \cidImplP -> do
        blpapi_CorrelationId_convertFromWrapped cidPtr cidImplP
        f cidImplP
withMaybeCid cid f =
    alloca $ \cidPtr -> do
      poke cidPtr (getCidImpl cid)
      cidImpl <- newCorrelationIdImpl
      withForeignPtr cidImpl $ \cidImplP -> do
        blpapi_CorrelationId_convertFromWrapped cidPtr cidImplP
        f cidImplP