From: ts Date: 2006-07-15T19:23:12+09:00 Subject: Re: Help making a ruby module >>>>> "R" == Ryan McGovern writes: R> int res=fcntl(in_fd,F_GETQUOTA,&test); R> //test.response has struct R> //how do i return that? See ext/etc/etc.c in the ruby distribution to see how create and return a ruby struct. R> } R> static VALUE set_quota(VALUE self,VALUE user, VALUE hl, VALUE sl, VALUE to) R> { R> SetQuotaReq_t setquota; R> char *str; R> str=RSTRING(user)->ptr; Never do this : what if `user' is a Float ? Use StringValuePtr() R> strcpy(setquota.sq_quotaname,str); R> void Init_XsanQuota() best to call it `Init_xsanquota' Guy Decoux