retval: fix swift compatibility