Commit Graph

6 Commits (da4a90c13e03d5a8684c66e7e8e69b174af822a0)

Author SHA1 Message Date
Ran Benita 40aab05e77 build: include config.h manually
Previously we included it with an `-include` compiler directive. But
that's not portable. And it's better to be explicit anyway.

Every .c file should have `include "config.h"` first thing.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-12-27 13:09:11 +02:00
Ran Benita c79c80335b atom: combine atom_intern() and atom_lookup()
Use an "add" bool parameter instead. This simplifies the code a bit.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-11-09 21:28:43 +02:00
Ran Benita 2a6155936c test/atom: increase iteration count and print random seed on failure
Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-11-08 22:40:13 +02:00
Ran Benita 2af474e8d0 parser: get rid of "stealing" atoms
This requires (well, at least implemented by) casting away `const` which
is undefined behavior, and clang started to warn about it.

The micro optimization didn't save too many allocations, anyway.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-11-08 12:13:31 +02:00
Ran Benita 623b10f8c5 Fix sign-compare warnings
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-02-08 00:54:53 +02:00
Ran Benita b246edc688 test/atom: add test for atom table
Mostly a random test.

Signed-off-by: Ran Benita <ran234@gmail.com>
2013-12-02 15:13:59 +02:00