/*
* call-seq
* conn.lo_lseek( lo_desc, offset, whence ) -> Fixnum
*
* Move the large object pointer _lo_desc_ to offset _offset_.
* Valid values for _whence_ are +SEEK_SET+, +SEEK_CUR+, and +SEEK_END+.
* (Or 0, 1, or 2.)
*/
static VALUE
pgconn_lolseek(VALUE self, VALUE in_lo_desc, VALUE offset, VALUE whence)
{
PGconn *conn = get_pgconn(self);
int lo_desc = NUM2INT(in_lo_desc);
int ret;
if((ret = lo_lseek(conn, lo_desc, NUM2INT(offset), NUM2INT(whence))) < 0) {
rb_raise(rb_ePGError, "lo_lseek failed");
}
return INT2FIX(ret);
}