[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dennou-ruby:001672] math2_shtlib



�ⶶ�Ǥ���

�����ä������Ĥ�����Ǥ�����math2_shtlib ��Υ᥽�åɤ����¤�ư���ޤ���
��ͳ�� shtint ���֤�������ΰ�򤽤�ʹߤδؿ����Ϥ��ʤ�����Ǥ���

shts2g ��Ȥ���褦�ˤ���ˤ��㤨�Ф���ʴ����Ǥ���

�� ¾�ΤɤΥ᥽�åɤ��Ȥ��ʤ��Τ���Ĵ�٤Ƥޤ��󡣤��ߤޤ���

diff -Naur ruby-dcl-1.3.0.orig/lib/dcl.rb ruby-dcl-1.3.0/lib/dcl.rb
--- ruby-dcl-1.3.0.orig/lib/dcl.rb	2003-09-23 23:19:23.000000000 +0900
+++ ruby-dcl-1.3.0/lib/dcl.rb	2004-01-10 03:27:48.000000000 +0900
@xxxxxx@xxxxxx -4705,13 +4705,13 @xxxxxx@xxxxxx
       private_class_method :__shtg2w
 
       alias __shts2g shts2g 
-      def shts2g( mm,jm,im,isw,s )
+      def shts2g( mm,jm,im,isw,s,work )
 
         #< check array size(s) >
         raise "Invalid array length: s.length != (mm+1)*(mm+1)" if s.length != ((mm+1)*(mm+1))
 
         #< call the original method >
-        __shts2g( mm,jm,im,isw,s )
+        __shts2g( mm,jm,im,isw,s,work )
       end
       module_function :shts2g, :__shts2g 
       private_class_method :__shts2g
diff -Naur ruby-dcl-1.3.0.orig/math2_shtlib.c ruby-dcl-1.3.0/math2_shtlib.c
--- ruby-dcl-1.3.0.orig/math2_shtlib.c	2003-09-23 22:41:25.000000000 +0900
+++ ruby-dcl-1.3.0/math2_shtlib.c	2004-01-10 03:21:11.000000000 +0900
@xxxxxx@xxxxxx -977,8 +977,8 @xxxxxx@xxxxxx
 }
 
 static VALUE
-dcl_shts2g(obj, mm, jm, im, isw, s)
-    VALUE obj, mm, jm, im, isw, s;
+dcl_shts2g(obj, mm, jm, im, isw, s, work)
+    VALUE obj, mm, jm, im, isw, s, work;
 {
     integer i_mm;
     integer i_jm;
@xxxxxx@xxxxxx -1019,7 +1019,8 @xxxxxx@xxxxxx
 
     o_w= ALLOCA_N(real, (2*i_jm+1)*(2*i_mm+1));
     o_g= ALLOCA_N(real, (2*i_im+1)*(2*i_jm+1));
-    w_q= ALLOCA_N(real, (i_jm+1)*(4*i_jm+5*i_mm+14)+(i_mm+1)*(i_mm+1)+i_mm+2+6*i_im+15);
+
+    w_q = dcl_obj2crealary(work);
 
     shts2g_(&i_mm, &i_jm, &i_im, &i_isw, i_s, o_w, o_g, w_q);
 
@xxxxxx@xxxxxx -1394,7 +1395,7 @xxxxxx@xxxxxx
     rb_define_module_function(mDCL, "shtwgz", dcl_shtwgz, 3);
     rb_define_module_function(mDCL, "shtwgj", dcl_shtwgj, 5);
     rb_define_module_function(mDCL, "shtg2w", dcl_shtg2w, 4);
-    rb_define_module_function(mDCL, "shts2g", dcl_shts2g, 5);
+    rb_define_module_function(mDCL, "shts2g", dcl_shts2g, 6);
     rb_define_module_function(mDCL, "shtsga", dcl_shtsga, 7);
     rb_define_module_function(mDCL, "shtsgz", dcl_shtsgz, 5);
     rb_define_module_function(mDCL, "shtsgm", dcl_shtsgm, 6);