added hcl_instantiatewithtrailer()
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-15 22:59:34 +09:00
parent 47e0604b03
commit c795b28cb8
21 changed files with 236 additions and 216 deletions

View File

@ -3317,8 +3317,16 @@ static HCL_INLINE int open_cci_stream (hcl_t* hcl, hcl_io_cciarg_t* arg)
fn = ((bb_t*)arg->includer->handle)->fn;
fb = hcl_get_base_name_from_bcstr_path(fn);
parlen = fb - fn;
if (arg->name[0] == '/') /* TODO: change the code to check if it's an absolute path */
{
fb = "";
parlen = 0;
}
else
{
fb = hcl_get_base_name_from_bcstr_path(fn);
parlen = fb - fn;
}
bb = (bb_t*)hcl_callocmem(hcl, HCL_SIZEOF(*bb) + (HCL_SIZEOF(hcl_bch_t) * (parlen + bcslen + 1)));
if (!bb) goto oops;