3.3.10. scriba_NewSbBytes()

[<<<] [>>>]

This function allocates and returns a pointer pointing to a structure of type SbData holding a string value. If the allocation failed the return value is NULL. If the memory allocation was successful the allocated structure will have the type SBT_STRING and will hold the initial value specified by the argument pszInitValue of the length len.

pSbData scriba_NewSbBytes(pSbProgram pProgram,
                          unsigned long len,
                          unsigned char *pszInitValue
  )@{
This function allocates len+1 number of bytes data and stores the initial value pointed by pszInitValue in it.

The extra plus one byte is an extra terminating zero char that may help the C programmers to handle the string in case it is not binary. Please also read the not on the terminating ZChar in the function scriba_NewSbString().

See also scriba_NewSbLong(), scriba_NewSbDouble(), scriba_NewSbUndef(), scriba_NewSbString(), scriba_NewSbBytes(), scriba_DestroySbData().


[<<<] [>>>]