From 0292d88a531f92fa85e4c6ccb39513b8402f8de8 Mon Sep 17 00:00:00 2001 From: Minus Date: Mon, 16 Nov 2026 04:09:38 +0000 Subject: [PATCH] types: lowercase type_name for the object type (object, not Object) Matches the lowercase convention of every other type (int, bool, generator, native, list). Updates table.c, empty.c and the ffi test expectation. 84/84 tests. --- src/cat/types/empty.c | 2 +- src/cat/types/table.c | 2 +- tests/run_tests.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cat/types/empty.c b/src/cat/types/empty.c index 637050a..d253118 100644 --- a/src/cat/types/empty.c +++ b/src/cat/types/empty.c @@ -30,7 +30,7 @@ static int empty_set_attribute(CAT_VALUE_Value *self, const char *name, } static CAT_VALUE_Vtable g_empty_vtable = { - .type_name = "Object", + .type_name = "object", .kind = CAT_VALUE_KIND_TABLE, .get_attribute = { empty_get_attribute }, .set_attribute = { empty_set_attribute }, diff --git a/src/cat/types/table.c b/src/cat/types/table.c index e7d5e08..21a7a63 100644 --- a/src/cat/types/table.c +++ b/src/cat/types/table.c @@ -84,7 +84,7 @@ static void table_destroy(CAT_VALUE_Value *self) } static CAT_VALUE_Vtable g_table_vtable = { - .type_name = "Object", + .type_name = "object", .kind = CAT_VALUE_KIND_TABLE, .call = { table_call }, .get_attribute = { table_get_attribute }, diff --git a/tests/run_tests.sh b/tests/run_tests.sh index e9ade3e..bb30809 100644 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -120,7 +120,7 @@ check "ffi-abs" "abs(-42) = 42" "`echo "$out" | sed -n 5p`" out=`$BIN tests/ffi.cat` check "ffi-badload-empty" "bad load empty: true" "`echo "$out" | sed -n 1p`" -check "ffi-badload-type" "bad load type: Object" "`echo "$out" | sed -n 2p`" +check "ffi-badload-type" "bad load type: object" "`echo "$out" | sed -n 2p`" check "ffi-bound" "pow bound: true" "`echo "$out" | sed -n 3p`" check "ffi-missing-sym" "missing sym empty: true" "`echo "$out" | sed -n 4p`" check "ffi-badsig" "bad sig empty: true" "`echo "$out" | sed -n 5p`"