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/test/Attic/object.c between version 1.3 and 1.4

version 1.3, 2003/02/23 17:39:24 version 1.4, 2003/03/09 10:32:41
Line 44 
Line 44 
         if (a == COM (save)) {          if (a == COM (save)) {
                 COX_THROW (undef);                  COX_THROW (undef);
         }          }
           if (a == COM (destroy)) {
                   free (o);
           }
         return rv;          return rv;
 } /* }}} */  } /* }}} */
 /* {{{ */ static co_v test_obj2_msg (co o, co s, co_id_t a, va_list ap)  /* {{{ */ static co_v test_obj2_msg (co o, co s, co_id_t a, va_list ap)
 {  {
         co_v rv;          co_v rv;
         rv . _int = 3;          rv . _int = 3;
           if (a == COM (destroy)) {
                   free (o);
           }
         return rv;          return rv;
 } /* }}} */  } /* }}} */
 /* {{{ */ static co test_obj1_new (void)  /* {{{ */ static co test_obj1_new (void)
 {  {
         co_o_head_full o;          co_o_head_full o;
         o = new (co_o_head_full_s);          o = new (co_o_head_full_s);
           cox_pop (o);
         CO_BLESS_M (o, test_obj1);          CO_BLESS_M (o, test_obj1);
         return o;          return o;
 } /* }}} */  } /* }}} */
Line 63 
Line 70 
 {  {
         co_o_head_full o;          co_o_head_full o;
         o = new (co_o_head_full_s);          o = new (co_o_head_full_s);
           cox_pop (o);
         CO_BLESS_M (o, test_obj2);          CO_BLESS_M (o, test_obj2);
         return o;          return o;
 } /* }}} */  } /* }}} */
Line 85 
Line 93 
         tst2 = CO_NEW (test_obj2);          tst2 = CO_NEW (test_obj2);
         if (!tst1) error (1, "test object 1 creation failed\n");          if (!tst1) error (1, "test object 1 creation failed\n");
         if (!tst2) error (1, "test object 2 creation failed\n");          if (!tst2) error (1, "test object 2 creation failed\n");
           cox_pop (tst2);
           cox_pop (tst1);
   
         // test return status of CO_M          // test return status of CO_M
         if (CO_M (tst1, reload) . _int != 1) error (2, "eh\n");          if (CO_M (tst1, reload) . _int != 1) error (2, "eh\n");
Line 107 
Line 117 
         CO_CNT (tst2, ok, tst1, destroy);          CO_CNT (tst2, ok, tst1, destroy);
         CO_EV (tst2, ok);          CO_EV (tst2, ok);
   
           //CO_M (tst1, destroy);
           CO_M (super, destroy, 0);
   
         //if (CO_DESTROY (tst1)) (4, "CO_DESTROY failed\n");          //if (CO_DESTROY (tst1)) (4, "CO_DESTROY failed\n");
         //if (tst1) error (5, "CO_DESTROY did not set tst to NULL\n");          //if (tst1) error (5, "CO_DESTROY did not set tst to NULL\n");

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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