Skip to content

Commit f9d4724

Browse files
committed
expand ssdup docstring
1 parent 018ab87 commit f9d4724

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stringdtype/stringdtype/src/static_string.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ ssnewlen(const char *init, size_t len, ss *to_init);
2222
void
2323
ssfree(ss *str);
2424

25-
// copies the contents out *in* into *out*. Allocates a new string buffer for
26-
// *out*. Returns -1 if malloc fails and -2 if *out* is not empty. Returns 0 on
27-
// success.
25+
// Copies the contents of *in* into *out*. Allocates a new string buffer for
26+
// *out* and assumes that *out* is uninitialized. Returns -1 if malloc fails
27+
// and -2 if *out* is not initialized. ssfree *must* be called before this is
28+
// called if *in* points to an existing string. Returns 0 on success.
2829
int
2930
ssdup(const ss *in, ss *out);
3031

0 commit comments

Comments
 (0)