From 433744c33a91440f98a7968f06370f6e0c5be312 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 4 Aug 2024 13:40:07 +0900 Subject: [PATCH] fixed the wrong core function name in mod/core.c --- mod/core.c | 2 +- src/kernel.hcl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mod/core.c b/mod/core.c index a59315b..65a14ed 100644 --- a/mod/core.c +++ b/mod/core.c @@ -350,7 +350,7 @@ static hcl_pfrc_t pf_core_put (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs) static hcl_pfinfo_t pfinfos[] = { - { { 'b','a','s','i','c,','_','n','e','w','\0' }, { HCL_PFBASE_FUNC, pf_core_basic_new, 2, 2 } }, + { { 'b','a','s','i','c','_','n','e','w','\0' }, { HCL_PFBASE_FUNC, pf_core_basic_new, 2, 2 } }, { { 'c','l','a','s','s','_','n','a','m','e','\0' }, { HCL_PFBASE_FUNC, pf_core_get_class_name, 1, 1 } }, { { 'g','e','t','\0' }, { HCL_PFBASE_FUNC, pf_core_get, 2, 2 } }, { { 'l','e','n','g','t','h','\0' }, { HCL_PFBASE_FUNC, pf_core_size, 1, 1 } }, diff --git a/src/kernel.hcl b/src/kernel.hcl index c3cc94b..19b317c 100644 --- a/src/kernel.hcl +++ b/src/kernel.hcl @@ -1,5 +1,5 @@ class Apex { - fun basicNew(size) { + fun :: basicNew(size) { return (core.basic_new self size) } } @@ -92,3 +92,7 @@ try { printf "EXCEPTION %O\n" e } + +k := (Array:new 10) +k:atPut 3 "hello" +printf "%O\n" k