(bind-func rados-connect-to-pool
(lambda (cluster poolname)
(let ((io:rados_ioctx_t* (salloc)))
(if (< (rados_ioctx_create cluster poolname io) 0)
(begin (printf "[rados] error connecting to pool")
(cast null rados_ioctx_t))
(pref io 0)))))