Skip to content

Commit c9b3a49

Browse files
committed
add pre to pntrAddElement
1 parent 3021161 commit c9b3a49

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/mmdata.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ vstring g_qsortKey; /* Used by qsortStringCmp; pointer only, do not deallocate *
216216
*
217217
* - Revisit the \ref block "block", \ref stack "stack" references to check the
218218
* inserted wording.
219-
* - Check what the advantages of __p__ tag are and whether the are better
220-
* replaced with backtick pairs. (\p aParam vs `aParam`)
219+
* - The formatting of __p__ tags seem insufficient. Figure out whether and
220+
* how doxygen allows assigning formats to a semantic tag. Do not replace
221+
* a tag with direct formattings like \p aParam vs `aParam`, as some editors
222+
* recognize and highlight semantic tags.
221223
* - Regularly check the warning in \ref pntrString to see whether it still
222224
* holds, or can be made more precise.
223225
*/

src/mmdata.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -852,18 +852,16 @@ flag pntrEq(const pntrString *sout, const pntrString *sin);
852852
/*!
853853
* \fn temp_pntrString *pntrAddElement(const pntrString *g)
854854
* \param[in] g points to the first element of a NULL terminated array in a
855-
* \ref block.
855+
* \ref block. It is assumed it is an array of pointer to \ref vstring.
856856
* \return a copy of \p g, the terminal NULL replaced with a \ref vstring ""
857857
* followed by NULL.
858858
* \attention
859-
* - the pointers in \p g are copied to the result. If some of them
860-
* reference allocated memory, check for possible double free, for example.
861-
* - a pointer to constant data is padded to the right. The referenced memory
862-
* must not be overwritten.
859+
* the pointers in \p g are copied to the result. If some of them
860+
* reference allocated memory, check for possible double free, for example.
861+
* \pre
862+
* Intended to be used with arrays of \ref vstring * only.
863863
* \post
864-
* - the elements of \p g are duplicated.
865-
* - a pointer to a NUL byte ("") constant is padded to the right. Make sure
866-
* the referenced memory is never overwritten.
864+
* the elements of \p g are duplicated.
867865
*/
868866
temp_pntrString *pntrAddElement(const pntrString *g);
869867

0 commit comments

Comments
 (0)