1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

fd: move relative path string to library

Use a single static variable located in the library, instead of
having a separate one for each compilation unit.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2020-11-16 18:10:45 -05:00
parent 420c218c83
commit 8a2fb75462
2 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,6 @@ namespace crucible {
typedef ResourceHandle<int, IOHandle> Fd; typedef ResourceHandle<int, IOHandle> Fd;
static string __relative_path;
void set_relative_path(string path); void set_relative_path(string path);
string relative_path(); string relative_path();

View File

@ -529,6 +529,8 @@ namespace crucible {
THROW_ERROR(runtime_error, "readlink: maximum buffer size exceeded"); THROW_ERROR(runtime_error, "readlink: maximum buffer size exceeded");
} }
static string __relative_path;
string string
relative_path() relative_path()
{ {