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