Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for libco/utils/copp between version 1.5 and 1.6

version 1.5, 2003/03/15 15:23:17 version 1.6, 2003/03/23 11:02:38
Line 17  sub addid {
Line 17  sub addid {
   
 my %def_meth = (  my %def_meth = (
         "has_method" => "co_has_method",          "has_method" => "co_has_method",
         "sclone" => "co_clone_shallow",          "sclone" => "#OBJ#_clone_shallow",
         "dclone" => "co_clone_deep",          "dclone" => "co_clone_deep",
         "fclone" => "co_clone_full",          "fclone" => "co_clone_full",
         "dclone_c" => "co_clone_clean",          "dclone_c" => "co_clone_clean",
Line 118  sub meth {
Line 118  sub meth {
         for (@objs) {          for (@objs) {
                 $o = $_;                  $o = $_;
                 for (keys %def_meth) {                  for (keys %def_meth) {
                           my $meth = $def_meth{$_};
                           $meth =~ s/#OBJ#/$o/;
                         #$fwd{$o} .= "co_v $def_meth{$_} (co this, co self, "                          #$fwd{$o} .= "co_v $def_meth{$_} (co this, co self, "
                         #       ."co_id_t message, va_list ap);\n";                          #       ."co_id_t message, va_list ap);\n";
                         $tab{$o} .= "\tco_meth_add (o -> __co_meth_ar,"                          $tab{$o} .= "\tco_meth_add (o -> __co_meth_ar,"
                                 ." COM ($_), $def_meth{$_});\n";                                  ." COM ($_), $meth);\n";
                 }                  }
         }          }
         for (@objs) {          for (@objs) {
                 print OUT "\n";                  print OUT "\n";
                 print OUT $fwd{$_}."\n";                  print OUT $fwd{$_}."\n";
   print OUT <<EOF
   static co_v ${_}_clone_shallow (co _src)
   {
           $_ src = _src;
           $_ dest = new (${_}_s);
           memcpy (dest, src, sizeof (${_}_s));
           cox_pop (dest);
           CO_PUSH (dest);
           CO_RETURN (co, dest);
   }
   EOF
   ;
                 #print OUT "/* static co_v ${_}_msg (co __this, co self, co_id_t"                  #print OUT "/* static co_v ${_}_msg (co __this, co self, co_id_t"
                 #       ." message, va_list ap) {\n";                  #       ." message, va_list ap) {\n";
                 #print OUT "$_ this = __this;\n";                  #print OUT "$_ this = __this;\n";

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top