/[gcl]/gcl/h/cmponly.h
ViewVC logotype

Diff of /gcl/h/cmponly.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by camm, Wed Feb 26 22:21:36 2003 UTC revision 1.6.6.1 by camm, Mon Dec 1 16:50:00 2003 UTC
# Line 46  MP_INT * otoi(object x); Line 46  MP_INT * otoi(object x);
46  #error Need alloca for GMP  #error Need alloca for GMP
47  #endif  #endif
48    
49    /* Add fourth argument af to the SETQ macros to allow for malloc allocation */
50    /* inside setjmp frames, and faster alloca allocation otherwise.*/
51    /* FIXME, verify that IDECL need not be changed, improve logic behind malloc */
52    /* selection, e.g. closure boundaries.  CM 20031201*/
53  #define IDECL(a,b,c) mp_limb_t *c=(mp_limb_t *)alloca(1*sizeof(mp_limb_t));MP_INT b={1,1,c}; a = &b  #define IDECL(a,b,c) mp_limb_t *c=(mp_limb_t *)alloca(1*sizeof(mp_limb_t));MP_INT b={1,1,c}; a = &b
54  #define SETQ_IO(var,alloc,val) { object _xx = (val); \  #define SETQ_IO(var,alloc,val,af) { object _xx = (val); \
55                                   int _n; \                                      int _n; \
56                                   if ((_n=obj_to_mpz(_xx,(var)))) {\                                      if ((_n=obj_to_mpz(_xx,(var)))) {\
57                                     obj_to_mpz1(_xx,(var),alloca(_n));}}                                        obj_to_mpz1(_xx,(var),af(_n));}}
58  #define SETQ_II(var,alloc,val) { MP_INT * _xx = (val); \  #define SETQ_II(var,alloc,val,af) { MP_INT * _xx = (val); \
59                                   int _n; \                                      int _n; \
60                                   if ((_n=mpz_to_mpz(_xx,(var)))) {\                                      if ((_n=mpz_to_mpz(_xx,(var)))) {\
61                                     mpz_to_mpz1(_xx,(var),alloca(_n));}}                                        mpz_to_mpz1(_xx,(var),af(_n));}}
62  #define ISETQ_FIX(a,b,c) isetq_fix(a,c)  #define ISETQ_FIX(a,b,c) isetq_fix(a,c)
63    
64    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.6.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26