diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-29 12:55:14 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-29 12:55:14 -0500 |
| commit | 4b5e4cd1f21582f5e5fa682ab4e4bff252963468 (patch) | |
| tree | e8fecb01f444c1d392c09255adba5cf6b312b326 /stdlib/paths.c | |
| parent | 0b0e0a0a1d41e9574de8dc17c688a4894c5e7f92 (diff) | |
Change how types handle metamethods
Diffstat (limited to 'stdlib/paths.c')
| -rw-r--r-- | stdlib/paths.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/paths.c b/stdlib/paths.c index ee73647d..98bcab56 100644 --- a/stdlib/paths.c +++ b/stdlib/paths.c @@ -89,7 +89,7 @@ public Path_t Path$cleanup(Path_t path) } else { // (../..) -> (../..) i += 1; } - } else if (Text$equal(&component, (Path_t*)(components.data + (i-1)*components.stride))) { // (___/../..) -> (____/../..) + } else if (Text$equal(&component, (Path_t*)(components.data + (i-1)*components.stride), &Text$info)) { // (___/../..) -> (____/../..) i += 1; } else { // (___/foo/..) -> (___) Array$remove_at(&components, I(i), I(2), sizeof(Path_t)); @@ -569,6 +569,7 @@ public const TypeInfo_t Path$info = { .align=__alignof__(Path_t), .tag=TextInfo, .TextInfo={.lang="Path"}, + .metamethods=Text$metamethods, }; // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
