ext/iodine/fiobj_mustache.c
/**
 * Called when entering a nested section.
 *
 * `index` is a zero based index indicating the number of repetitions that
 * occurred so far (same as the array index for arrays).
 *
 * A return value of -1 will stop processing with an error.
 *
 * Note: this is a good time to update the subsection's `udata` with the value
 * of the array index. The `udata` will always contain the value or the parent's
 * `udata`.
 */
Called when entering a nested section.
`index` is a zero based index indicating the number of repetitions that
occurred so far (same as the array index for arrays).

A return value of -1 will stop processing with an error.

this is a good time to update the subsection's `udata` with the value
of the array index. The `udata` will always contain the value or the parent's
`udata`.
Called when entering a nested section . ` index ` is a zero based index indicating the number of repetitions that occurred so far ( same as the array index for arrays ) . A return value of - 1 will stop processing with an error . this is a good time to update the subsection ' s ` udata ` with the value of the array index . The ` udata ` will always contain the value or the parent ' s ` udata ` .
static int mustache_on_section_start(mustache_section_s *section,
                                     char const *name, uint32_t name_len,
                                     uint32_t index) {
  FIOBJ o = fiobj_mustache_find_obj(section, name, name_len);
  if (!o)
    return -1;
  if (FIOBJ_TYPE_IS(o, FIOBJ_T_ARRAY))
    section->udata2 = (void *)fiobj_ary_index(o, index);
  else
    section->udata2 = (void *)o;
  return 0;
}
static int mustache_on_section_start ( mustache_section_s * section , char const * name , uint32_t name_len , uint32_t index ) { FIOBJ o = fiobj_mustache_find_obj ( section , name , name_len ) ; if ( ! o ) return -1 ; if ( FIOBJ_TYPE_IS ( o , FIOBJ_T_ARRAY ) ) section -> udata2 = ( void * ) fiobj_ary_index ( o , index ) ; else section -> udata2 = ( void * ) o ; return 0 ; }
Called when entering a nested section.
Called when entering a nested section .