summaryrefslogtreecommitdiff
path: root/src/str.c
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2002-05-02 03:22:26 +0000
committerMichael Jennings <mej@kainx.org>2002-05-02 03:22:26 +0000
commita5ec12f5bc18bae94a1e2d68a9c96cf7e9b0d24d (patch)
treef548618af052d6924491eb1bc0c78fbafe5772ed /src/str.c
parent8dd8069c34de76a507fb2b4a3a4c4dec6a5d65c9 (diff)
downloadlibast-a5ec12f5bc18bae94a1e2d68a9c96cf7e9b0d24d.tar.gz
Wed May 1 23:21:23 2002 Michael Jennings (mej)
Fleshed out the URL class. SVN revision: 6198
Diffstat (limited to 'src/str.c')
-rw-r--r--src/str.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/str.c b/src/str.c
index 14d39ce..3d66c5e 100644
--- a/src/str.c
+++ b/src/str.c
@@ -199,6 +199,7 @@ spif_str_init_from_fd(spif_str_t self, int fd)
spif_bool_t
spif_str_done(spif_str_t self)
{
+ REQUIRE_RVAL(!SPIF_STR_ISNULL(self), FALSE);
if (self->mem) {
FREE(self->s);
self->len = 0;
@@ -213,6 +214,7 @@ spif_str_dup(spif_str_t orig)
{
spif_str_t self;
+ REQUIRE_RVAL(!SPIF_STR_ISNULL(orig), FALSE);
self = SPIF_ALLOC(str);
memcpy(self, orig, SPIF_SIZEOF_TYPE(str));
self->s = SPIF_CAST(charptr) STRDUP(SPIF_CONST_CAST_C(char *) SPIF_STR_STR(orig));