This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <setjmp.h> | |
#include <stddef.h> | |
#include <string.h> | |
#define NORETURN __attribute__((noreturn)) | |
typedef void (*AllocCont)( void * ); | |
void NORETURN longjmp_on_return( AllocCont f, jmp_buf env, void *mem ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A hand-crafted dynamic resolver. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your compiler must support blocks. | |
To compile, run ONE of the following: | |
gcc -o ooc -std=c99 -fblocks ooc.c | |
clang -o ooc ooc.c | |
The output looks like this: | |
Integer: 1337 | |
String: "Hello World!" |