cvsuser     03/06/16 07:02:21

  Modified:    .        dotgnu.ops io.ops
  Log:
  fixed inout PMC argument directions 2
  
  Revision  Changes    Path
  1.4       +3 -3      parrot/dotgnu.ops
  
  Index: dotgnu.ops
  ===================================================================
  RCS file: /cvs/public/parrot/dotgnu.ops,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- dotgnu.ops        30 Nov 2002 16:31:33 -0000      1.3
  +++ dotgnu.ops        16 Jun 2003 14:02:21 -0000      1.4
  @@ -99,17 +99,17 @@
     goto NEXT();
   }
   
  -inline op conv_i8(inout PMC, in INT) {
  +inline op conv_i8(in PMC, in INT) {
     $1->vtable->set_integer_native(interpreter, $1,$2);
     goto NEXT();
   }
   
  -inline op conv_i8(inout PMC, in PMC) {
  +inline op conv_i8(in PMC, in PMC) {
     $1->vtable->set_integer_same(interpreter, $1,$2);
     goto NEXT();
   }
   
  -inline op conv_i8(inout PMC, in NUM) {
  +inline op conv_i8(in PMC, in NUM) {
     $1->vtable->set_integer_native(interpreter, $1,$2);
     goto NEXT();
   }
  
  
  
  1.21      +12 -2     parrot/io.ops
  
  Index: io.ops
  ===================================================================
  RCS file: /cvs/public/parrot/io.ops,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -r1.20 -r1.21
  --- io.ops    6 Jun 2003 16:27:00 -0000       1.20
  +++ io.ops    16 Jun 2003 14:02:21 -0000      1.21
  @@ -29,13 +29,13 @@
   
   ########################################
   
  -=item B<close>(inout PMC)
  +=item B<close>(in PMC)
   
   Close IO object $1
   
   =cut
   
  -inline op close(inout PMC) {
  +inline op close(in PMC) {
        PIO_close(interpreter, (ParrotIO*)(PMC_data($1)));
        goto NEXT();
   }
  @@ -58,6 +58,11 @@
     mode = string_to_cstring(interpreter, $3);
   
     ParrotIO *io = PIO_fdopen(interpreter, $2, mode);
  +  /* string_cstring_free(mode); */
  +  /* TODO all results from sring_to_cstring() need freeing
  +     but this generates ugly warnings WRT discarding the const
  +     qualifier -lt
  +   */
     if(io) {
       $1 = new_io_pmc(interpreter, io);
     }
  @@ -89,6 +94,8 @@
     mode = string_to_cstring(interpreter, $3);
   
     io = PIO_open(interpreter, path, mode);
  +  /* string_cstring_free(mode); */
  +  /* string_cstring_free(path); */
     if(io) {
       $1 = new_io_pmc(interpreter, io);
     }
  @@ -113,6 +120,7 @@
   op open(out INT, in STR) {
     char *path = string_to_cstring(interpreter, $2);
     ParrotIO *io = PIO_open(interpreter, path, "+<");
  +  /* string_cstring_free(path); */
     if (io) {
       $1 = PIO_getfd(interpreter, io);
     }
  @@ -126,6 +134,8 @@
     char *path = string_to_cstring(interpreter, $2);
     char *mode = string_to_cstring(interpreter, $3);
     ParrotIO *io = PIO_open(interpreter, path, mode);
  +  /* string_cstring_free(mode); */
  +  /* string_cstring_free(path); */
     if (io) {
       $1 = PIO_getfd(interpreter, io);
     }
  
  
  

Reply via email to