Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/except-0.c

    rcbce272 rad0be81  
    66#include <stdbool.h>
    77
    8 // Local type to mark exits from scopes. (see ERROR)
    98struct signal_exit {
    109        const char * area;
     
    2019}
    2120
    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) {
     21void terminate(int except_value) {
    4522        signal_exit a = {"terminate function"};
    4623        throw except_value;
     
    4825}
    4926
    50 void resume(exception * except_value) {
     27void resume(int except_value) {
    5128        signal_exit a = {"resume function"};
    5229        throwResume except_value;
Note: See TracChangeset for help on using the changeset viewer.