Changeset e5d9274 for tests/exceptions/defaults.cfa
- Timestamp:
- Jun 2, 2022, 3:11:21 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- ced5e2a
- Parents:
- 015925a (diff), fc134a48 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/defaults.cfa
r015925a re5d9274 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.