#include #include "./shed.h" struct ShedInt { PatioInt value; }; ShedObject shed__runtime__int_create(PatioInt value) { struct ShedInt* result = shed__runtime__alloc(sizeof(struct ShedInt)); result->value = value; return (ShedObject) result; } PatioInt shed__runtime__int_value(ShedObject object) { return ((struct ShedInt*) object)->value; } ShedObject shed__runtime__int_add(ShedObject left, ShedObject right) { PatioInt left_value = shed__runtime__int_value(left); PatioInt right_value = shed__runtime__int_value(right); PatioInt result_value = left_value + right_value; return shed__runtime__int_create(result_value); } ShedObject shed__runtime__int_sub(ShedObject left, ShedObject right) { PatioInt left_value = shed__runtime__int_value(left); PatioInt right_value = shed__runtime__int_value(right); PatioInt result_value = left_value - right_value; return shed__runtime__int_create(result_value); } bool shed__runtime__int_equals(ShedObject left, ShedObject right) { PatioInt left_value = shed__runtime__int_value(left); PatioInt right_value = shed__runtime__int_value(right); return left_value == right_value; } bool shed__runtime__int_not_equal(ShedObject left, ShedObject right) { PatioInt left_value = shed__runtime__int_value(left); PatioInt right_value = shed__runtime__int_value(right); return left_value != right_value; }