Commit 636403f
committed
str: dedupe StrCmp -- alias the canonical str_compare
StrCmp was its own implementation: ZstrCompare((str)->data, (ostr)->data)
-- a NUL-scan that ignores Str's explicit length. str_compare added in
commit 88950a9 already does the correct length-aware compare
(MemCompare over min(len) + length tiebreaker). Make StrCmp a thin
alias so there's one implementation, and Strs carrying embedded NULs
compare correctly through both entry points.1 parent 8067efe commit 636403f
1 file changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | | - | |
55 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
56 | 63 | | |
57 | | - | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
0 commit comments