diff options
author | Chris Fallin <cfallin@c1f.net> | 2014-12-11 18:58:04 -0800 |
---|---|---|
committer | Chris Fallin <cfallin@c1f.net> | 2014-12-12 14:49:12 -0800 |
commit | b3f6daf83d8adf0040a1bf9401342c811502f690 (patch) | |
tree | 2b51257e4b9cebfc3640d98cda45f9b8be36fdb2 /upb/refcounted.c | |
parent | 56913be6bb57f81dbbf7baf9cc9a0a2cd1a36493 (diff) |
Amalgamated distribution (upb.c/upb.h) tool.
There are a number of tweaks to get this to work:
- The #include dependence graph wasn't quite complete, and I had to add
a few #includes to get the tool to work.
- I had to change a number of symbol names to avoid conflicts between
'static' definitions in different .c files. This could be avoided if
the tool were smart enough to rename static symbols to have unique
prefixes instead, but (i) this requires semantic understanding of C,
and (ii) the macro-defined static functions (e.g., handlers for
primitive types in several places) would probably trip this up.
Verified that the resulting upb.h/upb.c compiles and doesn't have any
unresolved references.
Diffstat (limited to 'upb/refcounted.c')
-rw-r--r-- | upb/refcounted.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/upb/refcounted.c b/upb/refcounted.c index ca97d9f..40e6e89 100644 --- a/upb/refcounted.c +++ b/upb/refcounted.c @@ -399,7 +399,7 @@ static upb_refcounted *pop(tarjan *t) { return r; } -static void newgroup(tarjan *t) { +static void tarjan_newgroup(tarjan *t) { uint32_t *group = malloc(sizeof(*group)); if (!group) oom(t); // Push group and empty group leader (we'll fill in leader later). @@ -493,7 +493,7 @@ static void do_tarjan(const upb_refcounted *obj, tarjan *t) { push(t, obj); visit(obj, tarjan_visit, t); if (lowlink(t, obj) == idx(t, obj)) { - newgroup(t); + tarjan_newgroup(t); while (pop(t) != obj) ; } |