Author: Whiteknight
Date: Thu Jan 15 17:21:18 2009
New Revision: 35612
Modified:
branches/morph_pmc_type/src/dynpmc/rational.pmc
branches/morph_pmc_type/src/pmc/bigint.pmc
Log:
[morph_pmc_type] one last fix from bigint.pmc and update src/dynpmc/rational.pmc
Modified: branches/morph_pmc_type/src/dynpmc/rational.pmc
==============================================================================
--- branches/morph_pmc_type/src/dynpmc/rational.pmc (original)
+++ branches/morph_pmc_type/src/dynpmc/rational.pmc Thu Jan 15 17:21:18 2009
@@ -79,7 +79,7 @@
if (dest) {
if (self != dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph_string(interp, dest, self->vtable->whoami);
}
else {
dest = pmc_new(interp, self->vtable->base_type);
@@ -109,7 +109,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph_string(interp, dest, self->vtable->whoami);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -134,7 +134,7 @@
static void rat_multiply_integer(PARROT_INTERP, PMC *self, int value, PMC *dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph_string(interp, dest, self->vtable->whoami);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -159,7 +159,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph_string(interp, dest, self->vtable->whoami);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -186,7 +186,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph_string(interp, dest, self->vtable->whoami);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -213,7 +213,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph_string(interp, dest, self->vtable->whoami);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -241,7 +241,7 @@
mpz_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph_string(interp, dest, self->vtable->whoami);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -564,7 +564,7 @@
MULTI PMC *add(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph_string(INTERP, dest, SELF->vtable->whoami);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -674,7 +674,7 @@
MULTI PMC *subtract(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph_string(INTERP, dest, SELF->vtable->whoami);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -784,7 +784,7 @@
MULTI PMC *multiply(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph_string(INTERP, dest, SELF->vtable->whoami);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -894,7 +894,7 @@
MULTI PMC *divide(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph_string(INTERP, dest, SELF->vtable->whoami);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -994,7 +994,7 @@
VTABLE PMC *neg(PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph_string(INTERP, dest, SELF->vtable->whoami);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1030,7 +1030,7 @@
VTABLE PMC *absolute(PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph_string(INTERP, dest, SELF->vtable->whoami);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
Modified: branches/morph_pmc_type/src/pmc/bigint.pmc
==============================================================================
--- branches/morph_pmc_type/src/pmc/bigint.pmc (original)
+++ branches/morph_pmc_type/src/pmc/bigint.pmc Thu Jan 15 17:21:18 2009
@@ -926,14 +926,6 @@
dest = pmc_new(INTERP, SELF->vtable->base_type);
bigint_div_bigint(INTERP, SELF, value, dest);
-#if 0
- /* to downgrade or not that's the question */
- if (mpz_fits_slong_p(BN(dest))) {
- long iresult = mpz_get_si(BN(dest));
- VTABLE_morph(interp, dest, enum_class_Integer);
- VTABLE_set_integer_native(interp, dest, iresult);
- }
-#endif
return dest;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.