Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/defaults.cfa

    rc3b9d639 rd00d581  
    22
    33#include <string.h>
     4#include <exception.hfa>
    45
    56exception log_message {
     
    78};
    89
    9 // Manually define the virtual table and helper functions.
    10 void copy(log_message * this, log_message * that) {
    11         *this = *that;
    12 }
    13 
     10_EHM_DEFINE_COPY(log_message, )
    1411const char * msg(log_message * this) {
    1512        return this->msg;
    1613}
    17 
    18 const struct log_message_vtable log_vt @= {
    19         .__cfavir_typeid : &__cfatid_log_message,
    20         .size : sizeof(struct log_message),
    21         .copy : copy,
    22         .^?{} : ^?{},
    23         .msg : msg,
    24 };
     14_EHM_VIRTUAL_TABLE(log_message, , log_vt);
    2515
    2616// Logging messages don't have to be handled.
Note: See TracChangeset for help on using the changeset viewer.