Improve encode documentation (#65)
Improve the documentation for QCBOREncode_Init() and QCBOREncode_Finish().
replace all use of the deprecated macro MakeUsefulBufOnStack().
Address #62
Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/test/qcbor_encode_tests.c b/test/qcbor_encode_tests.c
index 154bde7..b77ba40 100644
--- a/test/qcbor_encode_tests.c
+++ b/test/qcbor_encode_tests.c
@@ -2716,7 +2716,7 @@
* other test exercises QCBOREncode_EncodeHead().
*/
// ---- basic test to encode a zero ----
- MakeUsefulBufOnStack(RightSize, QCBOR_HEAD_BUFFER_SIZE);
+ UsefulBuf_MAKE_STACK_UB(RightSize, QCBOR_HEAD_BUFFER_SIZE);
UsefulBufC encoded = QCBOREncode_EncodeHead(RightSize,
CBOR_MAJOR_TYPE_POSITIVE_INT,
@@ -2744,7 +2744,7 @@
// ---- Try to encode into too-small a buffer ----
- MakeUsefulBufOnStack(TooSmall, QCBOR_HEAD_BUFFER_SIZE-1);
+ UsefulBuf_MAKE_STACK_UB(TooSmall, QCBOR_HEAD_BUFFER_SIZE-1);
encoded = QCBOREncode_EncodeHead(TooSmall,
CBOR_MAJOR_TYPE_POSITIVE_INT,