Changes in tests/exceptions/defaults.cfa [c3b9d639:d00d581]
- File:
-
- 1 edited
-
tests/exceptions/defaults.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/defaults.cfa
rc3b9d639 rd00d581 2 2 3 3 #include <string.h> 4 #include <exception.hfa> 4 5 5 6 exception log_message { … … 7 8 }; 8 9 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, ) 14 11 const char * msg(log_message * this) { 15 12 return this->msg; 16 13 } 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); 25 15 26 16 // Logging messages don't have to be handled.
Note:
See TracChangeset
for help on using the changeset viewer.