// SPDX-License-Identifier: MIT // Copyright (c) 2023 John Watts and the LuminaSensum contributors #include "number.h" #include <stdio.h> int lang_main(void) { printf("Hello world!\n"); struct object *numA = number_create(5); struct object *numB = number_create(3); struct object *args[] = {numB}; dispatch_call(numA, "Add", 1, &args[0]); struct object *numC = args[0]; printf("numC value is %i\n", number_value(numC)); printf("numA is %p\n", (void *)numA); printf("numB is %p\n", (void *)numB); printf("numC is %p\n", (void *)numC); object_drop(&numA); object_drop(&numB); object_drop(&numC); printf("numA is %p\n", (void *)numA); printf("numB is %p\n", (void *)numB); printf("numC is %p\n", (void *)numC); return 0; }