Changes in src/tests/except-0.c [cbce272:ad0be81]
- File:
-
- 1 edited
-
src/tests/except-0.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/except-0.c
rcbce272 rad0be81 6 6 #include <stdbool.h> 7 7 8 // Local type to mark exits from scopes. (see ERROR)9 8 struct signal_exit { 10 9 const char * area; … … 20 19 } 21 20 22 23 // Local Exception Types and manual vtable types. 24 //#define TRIVIAL_EXCEPTION(name) //TRIVAL_EXCEPTION(yin) 25 struct yin; 26 struct yin_vtable { 27 struct exception_t_vtable const * parent; 28 size_t size; 29 void (*copy)(yin *this, yin * other); 30 void (*free)(yin *this); 31 const char (*msg)(yin *this); 32 }; 33 struct yin { 34 struct yin_vtable const * parent; 35 }; 36 void yin_msg(yin) { 37 return "in"; 38 } 39 yin_vtable _yin_vtable_instance = { 40 &_exception_t_vtable_instance, sizeof(yin), ?{}, ^?{}, yin_msg 41 } 42 43 44 void terminate(exception * except_value) { 21 void terminate(int except_value) { 45 22 signal_exit a = {"terminate function"}; 46 23 throw except_value; … … 48 25 } 49 26 50 void resume( exception *except_value) {27 void resume(int except_value) { 51 28 signal_exit a = {"resume function"}; 52 29 throwResume except_value;
Note:
See TracChangeset
for help on using the changeset viewer.