Skip to content

Commit

Permalink
Clarify checked & unchecked runtime errors of new functions of the At…
Browse files Browse the repository at this point in the history
…om interface
  • Loading branch information
thaidn committed Apr 8, 2012
1 parent a1f0d7c commit 2d219af
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/atom.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
static char rcsid[] = "$Id: atom.c 6 2007-01-22 00:45:22Z drhanson $";
#include "my_atom.h"
#include "atom.h"
#include <string.h>
#include "assert.h"
#include <limits.h>
Expand Down Expand Up @@ -57,8 +57,8 @@ static unsigned long scatter[] = {
1884137923, 53392249, 1735424165, 1602280572
};
const char *Atom_string(const char *str) {
assert(str);
return Atom_new(str, strlen(str));
assert(str);
return Atom_new(str, strlen(str));
}
const char *Atom_int(long n) {
char str[43];
Expand Down Expand Up @@ -116,8 +116,8 @@ int Atom_length(const char *str) {
}

/*
c.r.e: str must be non NULL pointer
c.r.e: str must be an atom
c.r.e: str is NULL
c.r.e: str isn't an atom
*/
void Atom_free(const char *str) {
struct atom *p, *last;
Expand Down Expand Up @@ -150,7 +150,7 @@ void Atom_reset(void) {
}
}

/* uc.r.e: the arg list doesn't end with a NULL pointer
/* uc.r.e: the arg list ends with a NULL pointer
uc.r.e: the arg list contains other data types rather than char *
*/
void Atom_vload(const char *str, ...) {
Expand All @@ -165,7 +165,7 @@ void Atom_vload(const char *str, ...) {
}
}
/*
c.r.e: str must be non NULL pointer
c.r.e: str is NULL
*/
void Atom_aload(const char *str[]) {
const char *p;
Expand All @@ -175,7 +175,7 @@ void Atom_aload(const char *str[]) {
}

/*
c.r.e: mapfn must be non NULL pointer
c.r.e: mapfn is NULL
*/
void Atom_map(AtomMapFn_T mapfn, void *aux) {
struct atom *p;
Expand Down

0 comments on commit 2d219af

Please sign in to comment.