hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 4bedb1b40107713cac6bc343b9a8599b60e9611a
parent b082d6ffd94bb0baac4c48be20075e53b8ef6dcd
Author: Alexey Yerin <yyp@disroot.org>
Date:   Fri, 14 Jan 2022 11:24:29 +0300

path::{dir,base}name: fix dup reference

They return a str, so we need strings::dup.

Signed-off-by: Alexey Yerin <yyp@disroot.org>

Diffstat:
Mpath/names.ha | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/path/names.ha b/path/names.ha @@ -5,8 +5,8 @@ use strings; // Returns the directory name for a given path. For a path to a file name, this // returns the directory in which that file resides. For a path to a directory, // this returns the path to its parent directory. The return value is either -// borrowed from the input or statically allocated), use [[dup]] to extend its -// lifetime or modify it. +// borrowed from the input or statically allocated), use [[strings::dup]] to +// extend its lifetime or modify it. export fn dirname(path: (str | *buffer)) const str = { let path = getstring(path); if (path == "") { @@ -53,7 +53,7 @@ export fn dirname(path: (str | *buffer)) const str = { // Returns the final component of a given path. For a path to a file name, this // returns the file name. For a path to a directory, this returns the directory // name. The return value is either borrowed from the input or statically -// allocated, use [[dup]] to extend its lifetime or modify it. +// allocated, use [[strings::dup]] to extend its lifetime or modify it. export fn basename(path: (str | *buffer)) const str = { let path = getstring(path); if (path == "") {