Mercurial > hg > Members > kaito > longjump
changeset 7:c49bf9e28ea8
remove jmp_buf (replaced by integer array)
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 01 Dec 2013 14:59:18 +0900 |
parents | 509523ee1e27 |
children | a7c771f554e7 |
files | struct_longjump.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/struct_longjump.c Sun Nov 24 01:10:16 2013 +0900 +++ b/struct_longjump.c Sun Dec 01 14:59:18 2013 +0900 @@ -13,16 +13,16 @@ __code return1 (int n,void* env){ printf("return1 : __return entry\n"); *(int*)((struct CbC_env *)(env))->ret_p = n; - longjmp(*(jmp_buf*)(((struct CbC_env *)env)->env),1); + longjmp((int*)(((struct CbC_env *)env)->env),1); } int main1 (){ __code (*__return)(); struct CbC_env __environment; - jmp_buf j_buf; + int i_buf[128]; int retval; __environment.ret_p = &retval; - __environment.env = &j_buf; + __environment.env = &i_buf; printf("main1 : main1 entry\n"); if (setjmp(__environment.env)){ printf("main1 : main1 return\n");