Changeset 8b1af6 in git for gfanlib/gfanlib_q.h


Ignore:
Timestamp:
Nov 6, 2013, 2:30:52 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
93fc820b11e13b03357f9d05061a1954e37d658c
Parents:
75761633171290fa9ee90c7fc19a9d9bfba3534911ab4e8595e6e90a6b646949f46d516f88a72015
Message:
Merge pull request #389 from jankoboehm/spielwiese

Gerhards fix for zeroRad und some typos
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gfanlib/gfanlib_q.h

    r11ab4e r8b1af6  
    1313#include "gmp.h"
    1414
     15#if (__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR<2)
     16extern void *  (*__gmp_allocate_func) _PROTO ((size_t));
     17extern void *  (*__gmp_reallocate_func) _PROTO ((void *, size_t, size_t));
     18extern void    (*__gmp_free_func) _PROTO ((void *, size_t));
     19
     20static inline void
     21mp_get_memory_functions (void *(**alloc_func) (size_t),
     22                         void *(**realloc_func) (void *, size_t, size_t),
     23                         void (**free_func) (void *, size_t))
     24{
     25  if (alloc_func != NULL)
     26    *alloc_func = __gmp_allocate_func;
     27
     28  if (realloc_func != NULL)
     29    *realloc_func = __gmp_reallocate_func;
     30
     31  if (free_func != NULL)
     32    *free_func = __gmp_free_func;
     33}
     34#endif
     35
    1536#include "gfanlib_z.h"
    1637
     
    156177    return mpq_sgn(value);
    157178  }
    158   static Rational gcd(Rational const &a, Rational const &b, Rational &s, Rational &t)
     179  static Rational gcd(Rational const &a, Rational const /*&b*/, Rational /*&s*/, Rational /*t*/)
    159180  {
    160181/*    mpz_t r;
Note: See TracChangeset for help on using the changeset viewer.