Skip to content

Commit 9924cfe

Browse files
shubhamdpthiagomacieira
authored andcommitted
Encoder: Update documentation
Exchanged function documentation of cbor_encode_text_string and cbor_encode_byte_string Signed-off-by: Shubham Patil <[email protected]>
1 parent c49bb8f commit 9924cfe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/cborencoder.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,22 +433,22 @@ static CborError encode_string(CborEncoder *encoder, size_t length, uint8_t shif
433433
*/
434434

435435
/**
436-
* Appends the text string \a string of length \a length to the CBOR stream
437-
* provided by \a encoder. CBOR requires that \a string be valid UTF-8, but
438-
* TinyCBOR makes no verification of correctness.
436+
* Appends the byte string \a string of length \a length to the CBOR stream
437+
* provided by \a encoder. CBOR byte strings are arbitrary raw data.
439438
*
440-
* \sa CborError cbor_encode_text_stringz, cbor_encode_byte_string
439+
* \sa cbor_encode_text_stringz, cbor_encode_text_string
441440
*/
442441
CborError cbor_encode_byte_string(CborEncoder *encoder, const uint8_t *string, size_t length)
443442
{
444443
return encode_string(encoder, length, ByteStringType << MajorTypeShift, string);
445444
}
446445

447446
/**
448-
* Appends the byte string \a string of length \a length to the CBOR stream
449-
* provided by \a encoder. CBOR byte strings are arbitrary raw data.
447+
* Appends the text string \a string of length \a length to the CBOR stream
448+
* provided by \a encoder. CBOR requires that \a string be valid UTF-8, but
449+
* TinyCBOR makes no verification of correctness.
450450
*
451-
* \sa cbor_encode_text_stringz, cbor_encode_text_string
451+
* \sa CborError cbor_encode_text_stringz, cbor_encode_byte_string
452452
*/
453453
CborError cbor_encode_text_string(CborEncoder *encoder, const char *string, size_t length)
454454
{

0 commit comments

Comments
 (0)