cvsuser     03/10/09 06:18:54

  Modified:    .        extend.c objects.c
  Log:
  Stub in some new object manipulation methods, and some extension routines
  
  Revision  Changes    Path
  1.4       +65 -1     parrot/extend.c
  
  Index: extend.c
  ===================================================================
  RCS file: /cvs/public/parrot/extend.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- extend.c  3 Oct 2003 17:46:18 -0000       1.3
  +++ extend.c  9 Oct 2003 13:18:54 -0000       1.4
  @@ -1,7 +1,7 @@
   /* extend.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: extend.c,v 1.3 2003/10/03 17:46:18 dan Exp $
  + *     $Id: extend.c,v 1.4 2003/10/09 13:18:54 dan Exp $
    *  Overview:
    *     The Parrot extension interface. These are the functions that
    *     parrot extensions (i.e. parrot subroutines written in C, or
  @@ -143,6 +143,70 @@
    */
   void Parrot_free_cstring(char *string) {
       string_cstring_free(string);
  +}
  +
  +/*=for api extend Parrot_get_intreg
  + *
  + * Return the value of an integer register
  + */
  +Parrot_Int Parrot_get_intreg(Parrot_INTERP interpreter, Parrot_Int regnum) {
  +    return REG_INT(regnum);
  +}
  +
  +/*=for api extend Parrot_get_numreg
  + *
  + * Return the value of a numeric register
  + */
  +Parrot_Float Parrot_get_numreg(Parrot_INTERP interpreter, Parrot_Int regnum) {
  +    return REG_NUM(regnum);
  +}
  +
  +/*=for api extend Parrot_get_strreg
  + *
  + * Return the value of a string register
  + */
  +Parrot_STRING Parrot_get_strreg(Parrot_INTERP interpreter, Parrot_Int regnum) {
  +    return REG_STR(regnum);
  +}
  +
  +/*=for api extend Parrot_get_intreg
  + *
  + * Return the value of a PMC register
  + */
  +Parrot_PMC Parrot_get_pmcreg(Parrot_INTERP interpreter, Parrot_Int regnum) {
  +    return REG_PMC(regnum);
  +}
  +
  +/*=for api extend Parrot_set_intreg
  + *
  + * Set the value of a  register
  + */
  +void Parrot_set_intreg(Parrot_INTERP interpreter, Parrot_Int regnum, Parrot_Int 
value) {
  +    REG_INT(regnum) = value;
  +}
  +
  +/*=for api extend Parrot_set_numreg
  + *
  + * Set the value of a  register
  + */
  +void Parrot_set_numreg(Parrot_INTERP interpreter, Parrot_Int regnum, Parrot_Float 
value) {
  +    REG_NUM(regnum) = value;
  +}
  +
  +/*=for api extend Parrot_set_strreg
  + *
  + * Set the value of a  register
  + */
  +void Parrot_set_strreg(Parrot_INTERP interpreter, Parrot_Int regnum, Parrot_STRING 
value) {
  +    REG_STR(regnum) = value;
  +}
  +
  +/*=for api extend Parrot_set_pmcreg
  + *
  + * Set the value of a  register
  + */
  +void Parrot_set_pmcreg(Parrot_INTERP interpreter, Parrot_Int regnum, Parrot_PMC 
value) {
  +    REG_PMC(regnum) = value;
   }
   
   /*
  
  
  
  1.7       +19 -1     parrot/objects.c
  
  Index: objects.c
  ===================================================================
  RCS file: /cvs/public/parrot/objects.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -r1.6 -r1.7
  --- objects.c 29 Jul 2003 01:45:28 -0000      1.6
  +++ objects.c 9 Oct 2003 13:18:54 -0000       1.7
  @@ -1,7 +1,7 @@
   /* objects.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: objects.c,v 1.6 2003/07/29 01:45:28 scog Exp $
  + *     $Id: objects.c,v 1.7 2003/10/09 13:18:54 dan Exp $
    *  Overview:
    *     Handles class and object manipulation
    *  Data Structure and Algorithms:
  @@ -123,6 +123,24 @@
                          key_new_string(interpreter,class_name), new_class);
   
     return new_class;
  +}
  +
  +PMC *
  +Parrot_add_parent(Parrot_Interp interpreter, PMC *new_base_class,
  +           PMC *existing_class) {
  +    return NULL;
  +}
  +
  +PMC *
  +Parrot_remove_parent(Parrot_Interp interpreter, PMC *removed_class,
  +                     PMC *existing_class) {
  +    return NULL;
  +}
  +
  +PMC *
  +Parrot_multi_subclass(Parrot_Interp interpreter, PMC *base_class_array,
  +                      STRING *child_class_name) {
  +    return NULL;
   }
   
   /*
  
  
  

Reply via email to