Skip to content

Commit

Permalink
Move fields common between Concatenation and Function to Generic stru…
Browse files Browse the repository at this point in the history
…cture

(refactoring)

* cord/cordbscs.c (word): Remove type.
* cord/cordbscs.c (Concatenation, Function): Remove null, header,
depth, left_len fields; move some comments to Generic.
* cord/cordbscs.c (MAX_LEFT_LEN): Move definition down.
* cord/cordbscs.c (Generic.null): Rename to nul.
* cord/cordbscs.c (Generic.left_len): Change type from char to unsigned
char (as was in Concatenation).
* cord/cordbscs.c (Generic.len): Change type from word to unsigned
long.
* cord/cordbscs.c (ConcatOrFunc): New union type (with concat and
function items).
* cord/cordbscs.c (CordRep): Change type from union to struct with
generic and data fields; remove concatenation, function and string
items.
* cord/cordbscs.c (LEFT_LEN): Change argument from c (of Concatenation
type) to s (of CordRep* type).
* cord/cordbscs.c (CORD_dump_inner, CORD_cat_char_star, CORD_cat,
CORD_from_fn_inner, CORD_apply_access_fn, CORD_substr_closure,
CORD_substr_checked, CORD_iter5, CORD_riter4, CORD_balance_insert,
CORD__extend_path, CORD__pos_fetch, CORD__next): Update after change of
CordRep, Concatenation and Function.
  • Loading branch information
ivmai committed Oct 20, 2022
1 parent 5ab0ce8 commit 9135a7e
Showing 1 changed file with 84 additions and 93 deletions.

0 comments on commit 9135a7e

Please sign in to comment.