[svn:parrot] r36474 - trunk/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sun Feb 8 21:20:45 UTC 2009
Author: NotFound
Date: Sun Feb 8 21:20:45 2009
New Revision: 36474
URL: https://trac.parrot.org/parrot/changeset/36474
Log:
[pmc] more hacks to cleanly disable bignum
Modified:
trunk/src/pmc/bignum.pmc
Modified: trunk/src/pmc/bignum.pmc
==============================================================================
--- trunk/src/pmc/bignum.pmc Sun Feb 8 20:59:16 2009 (r36473)
+++ trunk/src/pmc/bignum.pmc Sun Feb 8 21:20:45 2009 (r36474)
@@ -39,23 +39,31 @@
mpf_t b;
} BIGNUM;
+#endif
static void
bignum_init(PARROT_INTERP, PMC *self) {
Parrot_BigNum_attributes *attrs =
mem_allocate_zeroed_typed(Parrot_BigNum_attributes);
+#ifdef PARROT_HAS_GMP
attrs->bi = mem_allocate_zeroed_typed(BIGNUM);
mpf_init(attrs->bi->b);
+#endif
PMC_data(self) = attrs;
}
+
static void
bignum_clear(PARROT_INTERP, PMC *self) {
+#ifdef PARROT_HAS_GMP
BIGNUM *bi;
GETATTR_BigNum_bi(interp, self, bi);
mpf_clear(bi->b);
+#endif
}
+#ifdef PARROT_HAS_GMP
+
static void
bignum_set(PARROT_INTERP, PMC *dest, PMC *src) {
BIGNUM *bi_dest, *bi_src;
@@ -367,6 +375,7 @@
FLOATVAL b; /* bogus definition for users without libgmp*/
} BIGNUM;
+#if 0
static void
bignum_init(PARROT_INTERP, PMC *self) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
@@ -378,6 +387,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
"no bignum lib loaded");
}
+#endif
static void
bignum_set_long(PARROT_INTERP, PMC *self, long value) {
More information about the parrot-commits
mailing list