ext/iodine/mustache_parser.h
/* data segment serialization, returns the number of bytes written. */
data segment serialization, returns the number of bytes written.
data segment serialization returns the number of bytes written .
static inline size_t
mustache__data_segment_write(uint8_t *dest, mustache__data_segment_s data) {
  dest[0] = 0xFF & data.inst_start;
  dest[1] = 0xFF & (data.inst_start >> 1);
  dest[2] = 0xFF & (data.inst_start >> 2);
  dest[3] = 0xFF & (data.inst_start >> 3);
  dest[4] = 0xFF & data.next;
  dest[5] = 0xFF & (data.next >> 1);
  dest[6] = 0xFF & (data.next >> 2);
  dest[7] = 0xFF & (data.next >> 3);
  dest[8] = 0xFF & data.filename_len;
  dest[9] = 0xFF & (data.filename_len >> 1);
  dest[10] = 0xFF & data.path_len;
  dest[11] = 0xFF & (data.path_len >> 1);
  if (data.filename_len)
    memcpy(dest + 12, data.filename, data.filename_len);
  (dest + 12)[data.filename_len] = 0;
  return 13 + data.filename_len;
}
static inline size_t mustache__data_segment_write ( uint8_t * dest , mustache__data_segment_s data ) { dest [ 0 ] = 0xFF & data . inst_start ; dest [ 1 ] = 0xFF & ( data . inst_start >> 1 ) ; dest [ 2 ] = 0xFF & ( data . inst_start >> 2 ) ; dest [ 3 ] = 0xFF & ( data . inst_start >> 3 ) ; dest [ 4 ] = 0xFF & data . next ; dest [ 5 ] = 0xFF & ( data . next >> 1 ) ; dest [ 6 ] = 0xFF & ( data . next >> 2 ) ; dest [ 7 ] = 0xFF & ( data . next >> 3 ) ; dest [ 8 ] = 0xFF & data . filename_len ; dest [ 9 ] = 0xFF & ( data . filename_len >> 1 ) ; dest [ 10 ] = 0xFF & data . path_len ; dest [ 11 ] = 0xFF & ( data . path_len >> 1 ) ; if ( data . filename_len ) memcpy ( dest + 12 , data . filename , data . filename_len ) ; ( dest + 12 ) [ data . filename_len ] = 0 ; return 13 + data . filename_len ; }
data segment serialization, returns the number of bytes written.
data segment serialization returns the number of bytes written .