Changeset f8d27e1 in git for factory


Ignore:
Timestamp:
Jul 6, 2020, 12:23:58 AM (4 years ago)
Author:
Max Horn <max@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
d6c852edab73f91c0b7fd573de9f4cb9c4880d7b
Parents:
9e20b9f7749f3bf1b809cdfca51f8fdbbc25e754
Message:
Move FLINTrandom into factory to fix test suite crashes

Without this, `make check` runs into segfaults in tests that use factory but
not the full Singular library, as factory accesses FLINTrandom but does not
contain its definition.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_random.cc

    r9e20b9f rf8d27e1  
    1414#include "gfops.h"
    1515#include "imm.h"
     16
     17#ifdef HAVE_FLINT
     18extern "C"
     19{
     20#ifndef __GMP_BITS_PER_MP_LIMB
     21#define __GMP_BITS_PER_MP_LIMB GMP_LIMB_BITS
     22#endif
     23#include <flint/flint.h>
     24
     25GLOBAL_VAR flint_rand_t FLINTrandom;
     26}
     27#endif
    1628
    1729class RandomGenerator {
     
    174186}
    175187
     188
    176189void factoryseed ( int s )
    177190{
    178191    ranGen.seed( s );
     192
     193#ifdef HAVE_FLINT
     194    flint_randinit(FLINTrandom);
     195#endif
    179196}
Note: See TracChangeset for help on using the changeset viewer.