cvsuser     04/01/02 13:21:16

  Modified:    classes  integer.pmc float.pmc
  Log:
  Can assign a generic PMC to these OK
  
  Revision  Changes    Path
  1.8       +5 -1      parrot/classes/integer.pmc
  
  Index: integer.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/classes/integer.pmc,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- integer.pmc       28 Oct 2003 19:43:32 -0000      1.7
  +++ integer.pmc       2 Jan 2004 21:21:16 -0000       1.8
  @@ -1,6 +1,6 @@
   /* integer.pmc
    *  Copyright: 2003 The Perl Foundation.  All Rights Reserved.
  - *  CVS Info $Id: integer.pmc,v 1.7 2003/10/28 19:43:32 dan Exp $
  + *  CVS Info $Id: integer.pmc,v 1.8 2004/01/02 21:21:16 dan Exp $
    *  Overview:
    *   Integer PMC class
    *  Data Structure and Algorithms:
  @@ -45,6 +45,10 @@
   
       void set_string_native(STRING* value) {
         SELF->cache.int_val = string_to_num(value);
  +    }
  +
  +    void set_pmc(PMC *value) {
  +      SELF->cache.int_val = VTABLE_get_integer(INTERP, value);
       }
   
       FLOATVAL get_number() {
  
  
  
  1.4       +5 -1      parrot/classes/float.pmc
  
  Index: float.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/classes/float.pmc,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- float.pmc 5 Oct 2003 01:06:32 -0000       1.3
  +++ float.pmc 2 Jan 2004 21:21:16 -0000       1.4
  @@ -1,6 +1,6 @@
   /* float.pmc
    *  Copyright: 2003 The Perl Foundation.  All Rights Reserved.
  - *  CVS Info $Id: float.pmc,v 1.3 2003/10/05 01:06:32 dan Exp $
  + *  CVS Info $Id: float.pmc,v 1.4 2004/01/02 21:21:16 dan Exp $
    *  Overview:
    *   Float PMC class
    *  Data Structure and Algorithms:
  @@ -29,6 +29,10 @@
   
       void set_string_native(STRING* value) {
         SELF->cache.num_val = string_to_num(value);
  +    }
  +
  +    void set_pmc(PMC *value) {
  +      SELF->cache.num_val = VTABLE_get_number(INTERP, value);
       }
   
       FLOATVAL get_number() {
  
  
  

Reply via email to