cvsuser     04/07/18 09:41:37

  Modified:    ops      pmc.ops
  Log:
  Added in elements op to get number of elements in an aggregate
  
  Revision  Changes    Path
  1.24      +17 -0     parrot/ops/pmc.ops
  
  Index: pmc.ops
  ===================================================================
  RCS file: /cvs/public/parrot/ops/pmc.ops,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -r1.23 -r1.24
  --- pmc.ops   2 Jul 2004 08:23:25 -0000       1.23
  +++ pmc.ops   18 Jul 2004 16:41:36 -0000      1.24
  @@ -287,6 +287,23 @@
   
   =cut
   
  +########################################
  +
  +=item B<elements>(out INT, in PMC)
  +
  +Returns the number of items in aggregate $2
  +
  +=cut
  +
  +inline op elements(out INT, in PMC) {
  +  $1 = VTABLE_elements(interpreter, $2);
  +  goto NEXT();
  +}
  +
  +=back
  +
  +=cut
  +
   ###############################################################################
   
   =head2 Fast access ops
  
  
  

Reply via email to