From: nobu@... Date: 2006-07-15T22:15:32+09:00 Subject: Re: Help making a ruby module Hi, At Sat, 15 Jul 2006 08:01:11 +0900, Ryan McGovern wrote in [ruby-talk:202039]: > Essecally i need 2 functions, a GetQuota function that would return a > Ruby struct with the information and a SetQuota function > the GetQuota would take only a name("mcgoverp") and a type ("U"), the > SetQuota function would take a hard limit soft limit and time out as > well as a name and a type. > > This is my current trial Seems module functions better. > void Init_XsanQuota() > { cXsanQuota=rb_define_module("XsanQuota"); rb_define_module_function(cXsanQuota,"getQuota", quota_initialize,3); rb_define_module_function(cXsanQuota,"setQuota", quota_initialize,5); > } > free_quota(), quota_alloc() and quota_initialize() aren't needed. -- Nobu Nakada