ext/iodine/mustache_parser.h
/**
 * Returns the section's unparsed content as a non-NUL terminated byte array.
 *
 * The length of the data will be placed in the `size_t` variable pointed to by
 * `p_len`. Do NOT use `strlen`, since the data isn't NUL terminated.
 *
 * This allows text to be accessed when a section's content is, in fact, meant
 * to be passed along to a function / lambda.
 */
Returns the section's unparsed content as a non-NUL terminated byte array.
The length of the data will be placed in the `size_t` variable pointed to by
`p_len`. Do NOT use `strlen`, since the data isn't NUL terminated.

This allows text to be accessed when a section's content is, in fact, meant
to be passed along to a function / lambda.
Returns the section ' s unparsed content as a non - NUL terminated byte array . The length of the data will be placed in the ` size_t ` variable pointed to by ` p_len ` . Do NOT use ` strlen ` since the data isn ' t NUL terminated . This allows text to be accessed when a section ' s content is in fact meant to be passed along to a function / lambda .
static inline const char *mustache_section_text(mustache_section_s *section,
                                                size_t *p_len) {
  if (!section || !p_len)
    goto error;
  mustache__builder_stack_s *s = mustache___section2stack(section);
  mustache__instruction_s *inst =
      MUSTACH2INSTRUCTIONS(s->data) + s->pos; 
  if (inst->instruction != MUSTACHE_SECTION_START)
    goto error;
  const char *start =
      MUSTACH2DATA(s->data) + inst->data.name_pos + inst->data.offset;
  *p_len = inst->data.len;
  return start;
error:
  *p_len = 0;
  return NULL;
}
static inline const char * mustache_section_text ( mustache_section_s * section , size_t * p_len ) { if ( ! section || ! p_len ) goto error ; mustache__builder_stack_s * s = mustache___section2stack ( section ) ; mustache__instruction_s * inst = MUSTACH2INSTRUCTIONS ( s -> data ) + s -> pos ; if ( inst -> instruction != MUSTACHE_SECTION_START ) goto error ; const char * start = MUSTACH2DATA ( s -> data ) + inst -> data . name_pos + inst -> data . offset ; * p_len = inst -> data . len ; return start ; error : * p_len = 0 ; return NULL ; }
Returns the section's unparsed content as a non-NUL terminated byte array.
Returns the section ' s unparsed content as a non - NUL terminated byte array .
/* current instruction*/