[ruby-cvs:50000] akr:r42858 (trunk): * rational.c: Include gmp.h if GMP is used.

akr at ruby-lang.org akr at ruby-lang.org
Fri Sep 6 21:07:09 JST 2013


akr	2013-09-06 21:07:08 +0900 (Fri, 06 Sep 2013)

  New Revision: 42858

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42858

  Log:
    * rational.c: Include gmp.h if GMP is used.
      (GMP_GCD_DIGITS): New macro.
      (rb_gcd_gmp): New function.
      (f_gcd_normal): Renamed from f_gcd.
      (rb_gcd_normal): New function.
      (f_gcd): Invoke rb_gcd_gmp or f_gcd_normal.
    
    * internal.h (rb_gcd_normal): Declared.
      (rb_gcd_gmp): Ditto.
    
    * ext/-test-/rational: New directory.

  Added directories:
    trunk/ext/-test-/rational/
    trunk/test/-ext-/rational/
  Added files:
    trunk/ext/-test-/rational/depend
    trunk/ext/-test-/rational/extconf.rb
    trunk/ext/-test-/rational/rat.c
    trunk/test/-ext-/rational/test_rat.rb
  Modified files:
    trunk/ChangeLog
    trunk/internal.h
    trunk/rational.c


More information about the ruby-cvs mailing list