dbJLink: Pass the correct dbfType to child links
API change for link types that support child links, they must now indicate whether a child link is an input, output or forward link by the return value from their parse_start_map() method. The original jlif_key_child_link enumeration has been replaced by 3 new values: jlif_key_child_inlink, jlif_key_child_outlink and jlif_key_child_fwdlink Previously we were passing the dbfType of the record link field to all child links within it, which was wrong.
This commit is contained in:
@@ -254,8 +254,10 @@ static jlif_key_result lnkCalc_start_map(jlink *pjlink)
|
||||
IFDEBUG(10)
|
||||
printf("lnkCalc_start_map(calc@%p)\n", clink);
|
||||
|
||||
if (clink->pstate == ps_args || clink->pstate == ps_out)
|
||||
return jlif_key_child_link;
|
||||
if (clink->pstate == ps_args)
|
||||
return jlif_key_child_inlink;
|
||||
if (clink->pstate == ps_out)
|
||||
return jlif_key_child_outlink;
|
||||
|
||||
if (clink->pstate != ps_init) {
|
||||
errlogPrintf("lnkCalc: Unexpected map\n");
|
||||
@@ -463,7 +465,7 @@ static void lnkCalc_report(const jlink *pjlink, int level, int indent)
|
||||
}
|
||||
}
|
||||
|
||||
long lnkCalc_map_children(jlink *pjlink, jlink_map_fn rtn, void *ctx)
|
||||
static long lnkCalc_map_children(jlink *pjlink, jlink_map_fn rtn, void *ctx)
|
||||
{
|
||||
calc_link *clink = CONTAINER(pjlink, struct calc_link, jlink);
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user