Function anjay_ret_i32

Function Documentation

static inline int anjay_ret_i32(anjay_output_ctx_t *ctx, int32_t value)

Returns a 32-bit signed integer from the data model handler.

Note: the only difference between anjay_ret_i32 and anjay_ret_i64 is the size of the value parameter. Actual number of bytes sent on the wire depends on the value.

Parameters:
  • ctx – Output context to operate on.

  • value – The value to return.

Returns:

0 on success, a negative value in case of error.