cvsuser     04/05/19 02:37:06

  Modified:    src      objects.c
  Log:
  - removed src/object.c:find_global, replaced with Parrot_find_global
  
  Revision  Changes    Path
  1.93      +4 -71     parrot/src/objects.c
  
  Index: objects.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/objects.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -w -r1.92 -r1.93
  --- objects.c 18 May 2004 08:59:04 -0000      1.92
  +++ objects.c 19 May 2004 09:37:06 -0000      1.93
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: objects.c,v 1.92 2004/05/18 08:59:04 leo Exp $
  +$Id: objects.c,v 1.93 2004/05/19 09:37:06 jrieks Exp $
   
   =head1 NAME
   
  @@ -45,73 +45,6 @@
       return new_array;
   }
   
  -/*
  -
  -=item C<static PMC *
  -find_global(Parrot_Interp interpreter, STRING *class, STRING *globalname)>
  -
  -This should be public, but for right now it's internal.
  -
  -=cut
  -
  -v*/
  -
  -static PMC *
  -find_global(Parrot_Interp interpreter, STRING *class, STRING *globalname)
  -{
  -    PMC *stash;
  -#if 1
  -    /*
  -     * we are cheating a bit and use PerlHash internals to avoid
  -     * hash lookup duplication
  -     */
  -    HashBucket *b;
  -#ifdef FIND_DEBUG
  -    PIO_printf(interpreter, "find_global class '%Ss' meth '%Ss\n",
  -            class, globalname);
  -#endif
  -    stash = interpreter->globals->stash_hash;
  -    if (class) {
  -        b = hash_get_bucket(interpreter,
  -                (Hash*) PMC_struct_val(stash), class);
  -        if (!b)
  -            return NULL;
  -        stash = b->value;
  -        b = hash_get_bucket(interpreter,
  -                (Hash*) PMC_struct_val(stash), globalname);
  -        if (!b)
  -            return NULL;
  -        return VTABLE_get_pmc_keyed_int(interpreter, stash,
  -                PMC_int_val((PMC*)b->value));
  -    }
  -    b = hash_get_bucket(interpreter,
  -                (Hash*) PMC_struct_val(stash), globalname);
  -    if (!b)
  -        return NULL;
  -    return b->value;
  -
  -#else
  -    if (class) {
  -        if (!VTABLE_exists_keyed_str(interpreter,
  -                                     interpreter->globals->stash_hash,
  -                                     class)) {
  -            return NULL;
  -        }
  -        stash = VTABLE_get_pmc_keyed_str(interpreter,
  -                                         interpreter->globals->stash_hash,
  -                                         class);
  -    }
  -    else {
  -        stash = interpreter->globals->stash_hash;
  -    }
  -    if (!VTABLE_exists_keyed_str(interpreter, stash, globalname)) {
  -        return NULL;
  -    }
  -    return VTABLE_get_pmc_keyed_str(interpreter,
  -            stash, globalname);
  -#endif
  -}
  -
   /* Take the class and completely rebuild the atttribute stuff for
      it. Horribly destructive, and definitely not a good thing to do if
      there are instantiated objects for the class */
  @@ -1057,7 +990,7 @@
   
       /* if its a non-classes, just return the sub */
       if (!PObj_is_class_TEST(class)) {
  -        return find_global(interpreter,
  +        return Parrot_find_global(interpreter,
                              NULL,
                              method_name);
       }
  @@ -1072,7 +1005,7 @@
        */
   
       /* See if we get lucky and its in the class of the PMC */
  -    method = find_global(interpreter,
  +    method = Parrot_find_global(interpreter,
                            VTABLE_get_string(interpreter,
                                     get_attrib_num((SLOTTYPE *)PMC_data(class),
                                                    PCD_CLASS_NAME)),
  @@ -1091,7 +1024,7 @@
       for (searchoffset = 0; searchoffset < classcount; searchoffset++) {
           curclass = VTABLE_get_pmc_keyed_int(interpreter,
                   classsearch_array, searchoffset);
  -        method = find_global(interpreter,
  +        method = Parrot_find_global(interpreter,
                                VTABLE_get_string(interpreter,
                                     get_attrib_num((SLOTTYPE *)PMC_data(curclass),
                                                    PCD_CLASS_NAME)),
  
  
  

Reply via email to