# Metalang99-based library, adding Python-like "with" blocks ```c #include #include #include #define WITH99_resource_type_intptr_IMPL(...) v(int*) #define WITH99_resource_init_intptr_IMPL(var, init, ...) v((printf("Allocated to %p\n", var), var = malloc(sizeof(int)), *var = init, 0)) #define WITH99_resource_free_intptr_IMPL(var, ...) v((printf("Freed %p at %p\n", var, var), free(var))) #define WITH99_resource_throws_intptr_IMPL(...) ML99_false() #define With WITH99_With int main(void) { With( (intptr, a, 1), (intptr, b, 3) ) { *a += *b; printf("%d\n", *a); } } ```