Bill Allombert on Thu, 02 Feb 2012 19:03:34 +0100


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

Please test pari-2.5.1 prerelease 2


Dear PARI developers,

I have updated the prerelease tarball to fix the bug reported by Jeroen.
Please test the new tarball:

<http://pari.math.u-bordeaux.fr/pub/pari/snapshots/pari-2.5.1.pre2.tar.gz>

Also I am considering whether or not applying the attached patch which work around
a compiler problem (gcc PR49330).

Cheers,
Bill.
commit edae6c3696f08ce64dcf11e475aafefbf0b1a60a
Author: bill <bill@ae928d23-7a17-477f-a5ef-102d13978bf2>
Date:   Mon Aug 15 11:36:14 2011 +0000

    Fix MODULES.

diff --git a/src/language/init.c b/src/language/init.c
index 68b22bc..d077010 100644
--- a/src/language/init.c
+++ b/src/language/init.c
@@ -76,8 +76,12 @@ entree  **varentries;
 THREAD pari_sp bot, top, avma;
 THREAD size_t memused;
 
-static void ** MODULES, ** OLDMODULES;
-static pari_stack s_MODULES, s_OLDMODULES;
+static struct
+{
+  void ** M;
+  pari_stack s;
+} MODULES, OLDMODULES;
+
 const long functions_tblsz = 135; /* size of functions_hash */
 entree **functions_hash, **defaults_hash;
 
@@ -584,17 +588,17 @@ gp_init_entrees(pari_stack *p_A, entree **hash)
 int
 gp_init_functions(void)
 {
-  return gp_init_entrees(new_fun_set? &s_MODULES: &s_OLDMODULES, functions_hash);
+  return gp_init_entrees(new_fun_set? &MODULES.s: &OLDMODULES.s, functions_hash);
 }
 
 extern entree functions_basic[], functions_default[];
 static void
 pari_init_functions(void)
 {
-  stack_init(&s_MODULES, sizeof(*MODULES),(void**)&MODULES);
-  stack_pushp(&s_MODULES,functions_basic);
-  stack_init(&s_OLDMODULES, sizeof(*OLDMODULES),(void**)&OLDMODULES);
-  stack_pushp(&s_OLDMODULES,oldfonctions);
+  stack_init(&MODULES.s, sizeof(MODULES.M),(void**)&MODULES.M);
+  stack_pushp(&MODULES.s,functions_basic);
+  stack_init(&OLDMODULES.s, sizeof(*OLDMODULES.M),(void**)&OLDMODULES.M);
+  stack_pushp(&OLDMODULES.s,oldfonctions);
   functions_hash = (entree**) pari_calloc(sizeof(entree*)*functions_tblsz);
   pari_fill_hashtable(functions_hash,
                       new_fun_set? functions_basic: oldfonctions);
@@ -607,7 +611,7 @@ pari_add_module(entree *ep)
 {
   if (new_fun_set)
     pari_fill_hashtable(functions_hash, ep);
-  stack_pushp(&s_MODULES, ep);
+  stack_pushp(&MODULES.s, ep);
 }
 
 void
@@ -619,7 +623,7 @@ pari_add_oldmodule(entree *ep)
 {
   if (!new_fun_set)
     pari_fill_hashtable(functions_hash, ep);
-  stack_pushp(&s_OLDMODULES, ep);
+  stack_pushp(&OLDMODULES.s, ep);
 }
 
 static void
@@ -781,8 +785,8 @@ pari_close_opts(ulong init_opts)
   free((void*)diffptr);
   free(current_logfile);
   free(current_psfile);
-  stack_delete(&s_MODULES);
-  stack_delete(&s_OLDMODULES);
+  stack_delete(&MODULES.s);
+  stack_delete(&OLDMODULES.s);
   if (pari_datadir) free(pari_datadir);
   if (init_opts&INIT_DFTm)
   { /* delete GP_DATA */