cvsuser     04/11/27 03:11:22

  Modified:    ops      core.ops io.ops var.ops
  Log:
  Re: [perl #32643] [TODO] Remove Perl* PMCs from opcodes
  
  > The following opcodes return 'PerlUndef' on failure, instead of
  > 'Undef' or null
  >
  > open, socket, fdopen, dlfunc, dlvar, find_global
  
  Patch attached that changes all these to Undef.
  
  Courtesy of Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.379     +2 -2      parrot/ops/core.ops
  
  Index: core.ops
  ===================================================================
  RCS file: /cvs/public/parrot/ops/core.ops,v
  retrieving revision 1.378
  retrieving revision 1.379
  diff -u -r1.378 -r1.379
  --- core.ops  27 Nov 2004 09:32:17 -0000      1.378
  +++ core.ops  27 Nov 2004 11:11:22 -0000      1.379
  @@ -1124,7 +1124,7 @@
         const char * err = Parrot_dlerror();
         Parrot_warn(interpreter, PARROT_WARNINGS_UNDEF_FLAG,
         "Symbol '%s' not found: %s\n", name, err ? err : "unkown reason");
  -      $1 = pmc_new(interpreter, enum_class_PerlUndef);
  +      $1 = pmc_new(interpreter, enum_class_Undef);
     }
     else {
         $1 = pmc_new(interpreter, enum_class_NCI);
  @@ -1142,7 +1142,7 @@
         const char * err = Parrot_dlerror();
         Parrot_warn(interpreter, PARROT_WARNINGS_UNDEF_FLAG,
         "Symbol '%s' not found: %s\n", name, err ? err : "unkown reason");
  -      $1 = pmc_new(interpreter, enum_class_PerlUndef);
  +      $1 = pmc_new(interpreter, enum_class_Undef);
     }
     else {
         /* At this point we have the symbol's address. We just need to build
  
  
  
  1.52      +4 -4      parrot/ops/io.ops
  
  Index: io.ops
  ===================================================================
  RCS file: /cvs/public/parrot/ops/io.ops,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- io.ops    29 Sep 2004 15:44:29 -0000      1.51
  +++ io.ops    27 Nov 2004 11:11:22 -0000      1.52
  @@ -58,7 +58,7 @@
   
     $1 = PIO_fdopen(interpreter, NULL, (PIOHANDLE)$2, mode);
     if (!$1) {
  -    $1 = pmc_new(interpreter, enum_class_PerlUndef);
  +    $1 = pmc_new(interpreter, enum_class_Undef);
     }
     /* string_cstring_free(mode); */
     /* TODO all results from string_to_cstring() need freeing
  @@ -155,7 +155,7 @@
     /* string_cstring_free(mode); */
     /* string_cstring_free(path); */
     if(!$1 || !PMC_struct_val($1)) {
  -    $1 = pmc_new(interpreter, enum_class_PerlUndef);
  +    $1 = pmc_new(interpreter, enum_class_Undef);
     }
     goto NEXT();
   }
  @@ -169,7 +169,7 @@
     $1 = PIO_open(interpreter, NULL, path, "+<");
     /* string_cstring_free(path); */
     if(!$1) {
  -    $1 = pmc_new(interpreter, enum_class_PerlUndef);
  +    $1 = pmc_new(interpreter, enum_class_Undef);
     }
     goto NEXT();
   }
  @@ -526,7 +526,7 @@
   op socket(out PMC, in INT, in INT, in INT) :base_network {
     $1 = PIO_socket(interpreter, $2, $3, $4);
     if(!$1) {
  -    $1 = pmc_new(interpreter, enum_class_PerlUndef);
  +    $1 = pmc_new(interpreter, enum_class_Undef);
     }
     goto NEXT();
   }
  
  
  
  1.22      +2 -2      parrot/ops/var.ops
  
  Index: var.ops
  ===================================================================
  RCS file: /cvs/public/parrot/ops/var.ops,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- var.ops   6 Aug 2004 12:23:55 -0000       1.21
  +++ var.ops   27 Nov 2004 11:11:22 -0000      1.22
  @@ -330,7 +330,7 @@
                    "Global '%Ss' not found\n", $3);
        }
        else {
  -         stash = pmc_new(interpreter, enum_class_PerlUndef);
  +         stash = pmc_new(interpreter, enum_class_Undef);
            VTABLE_set_pmc_keyed(interpreter, globals, $2, stash);
        }
       }
  @@ -343,7 +343,7 @@
                    "Global '%Ss' not found\n", $3);
        }
        else {
  -         $1 = pmc_new(interpreter, enum_class_PerlUndef);
  +         $1 = pmc_new(interpreter, enum_class_Undef);
        }
       }
       else {
  
  
  

Reply via email to