withQListLongResult :: (Ptr CLong -> IO CInt) -> IO [Int]
withQListLongResult f
  = do
    clen <- f nullPtr
    let len = fromCInt clen
    if (len <= 0)
     then return []
     else allocaArray len $ \carr ->
          do f carr
             xs <- peekArray len carr
             return (map fromCLong xs)
withQListLongResult :: (Ptr CLong -> IO CInt) -> IO [Int]
withQListLongResult f
  = do
    clen <- f nullPtr
    let len = fromCInt clen
    if (len <= 0)
     then return []
     else allocaArray len $ \carr ->
          do f carr
             xs <- peekArray len carr
             return (map fromCLong xs)
withQListLongResult f
  = do
    clen <- f nullPtr
    let len = fromCInt clen
    if (len <= 0)
     then return []
     else allocaArray len $ \carr ->
          do f carr
             xs <- peekArray len carr
             return (map fromCLong xs)