Changeset c715e5f for tests/exceptions
- Timestamp:
- May 25, 2022, 5:51:24 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- c3b9d639
- Parents:
- 5024df4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/defaults.cfa
r5024df4 rc715e5f 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 void copy(log_message * this, log_message * that) { 10 *this = *that; 11 } 12 11 13 const char * msg(log_message * this) { 12 14 return this->msg; 13 15 } 14 _EHM_VIRTUAL_TABLE(log_message, , log_vt); 16 17 const struct log_message_vtable log_vt @= { 18 .__cfavir_typeid : &__cfatid_log_message, 19 .size : sizeof(struct log_message), 20 .copy : copy, 21 .^?{} : ^?{}, 22 .msg : msg, 23 }; 15 24 16 25 // Logging messages don't have to be handled.
Note: See TracChangeset
for help on using the changeset viewer.