addToSubscriptionList :: Ptr SubscriptionListImpl
                         -> TopicString
                         -> Maybe CorrelationId
                         -> IO Int
addToSubscriptionList lst (QualifiedTopicString s) cid =
    alloca $ \cidPtr -> do
      poke cidPtr (getCidImpl cid)
      cidImpl <- newCorrelationIdImpl
      withForeignPtr cidImpl $ \cidImplP -> do
        blpapi_CorrelationId_convertFromWrapped cidPtr cidImplP
        withCString s $ \cs ->
             blpapi_SubscriptionList_add lst cs cidImplP nullPtr nullPtr 0 0
addToSubscriptionList :: Ptr SubscriptionListImpl
                         -> TopicString
                         -> Maybe CorrelationId
                         -> IO Int
addToSubscriptionList lst (QualifiedTopicString s) cid =
    alloca $ \cidPtr -> do
      poke cidPtr (getCidImpl cid)
      cidImpl <- newCorrelationIdImpl
      withForeignPtr cidImpl $ \cidImplP -> do
        blpapi_CorrelationId_convertFromWrapped cidPtr cidImplP
        withCString s $ \cs ->
             blpapi_SubscriptionList_add lst cs cidImplP nullPtr nullPtr 0 0
addToSubscriptionList lst (QualifiedTopicString s) cid =
    alloca $ \cidPtr -> do
      poke cidPtr (getCidImpl cid)
      cidImpl <- newCorrelationIdImpl
      withForeignPtr cidImpl $ \cidImplP -> do
        blpapi_CorrelationId_convertFromWrapped cidPtr cidImplP
        withCString s $ \cs ->
             blpapi_SubscriptionList_add lst cs cidImplP nullPtr nullPtr 0 0