sv: major refactor
- Internal data pointer is read only by default => any uses that require use of the pointer itself (freeing, mutating) must perform a cast. - refactor tests to use some new sv macros and functions, and clean them up. - slight cleanup of sv.c
This commit is contained in:
@@ -24,8 +24,8 @@ void sv_copy_test(void)
|
||||
TEST(strncmp(word.data, copy.data, copy.size) == 0, "`%s` == `%s`",
|
||||
word.data, copy.data);
|
||||
|
||||
// Obviously we can't just have this lying around.
|
||||
free(copy.data);
|
||||
// NOTE: Okay to free since we own copy.
|
||||
free((void *)copy.data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user