diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-04 20:24:27 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-04 20:24:27 -0400 |
commit | 7973da975eac7cf5155a140e4cb4f68d5cbb1eb9 (patch) | |
tree | 447a05d248c217b75b97c497d0a172204eeb8d7f /src/ext_depends/D-YAML/source/dyaml/loader.d | |
parent | nix use overlays when convenient (diff) |
make set_depends (dyaml update)
Diffstat (limited to 'src/ext_depends/D-YAML/source/dyaml/loader.d')
-rw-r--r-- | src/ext_depends/D-YAML/source/dyaml/loader.d | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ext_depends/D-YAML/source/dyaml/loader.d b/src/ext_depends/D-YAML/source/dyaml/loader.d index 09c19db..6638dfc 100644 --- a/src/ext_depends/D-YAML/source/dyaml/loader.d +++ b/src/ext_depends/D-YAML/source/dyaml/loader.d @@ -82,8 +82,10 @@ struct Loader /** Construct a Loader to load YAML from a string. * - * Params: data = String to load YAML from. The char[] version $(B will) - * overwrite its input during parsing as D:YAML reuses memory. + * Params: + * data = String to load YAML from. The char[] version $(B will) + * overwrite its input during parsing as D:YAML reuses memory. + * filename = The filename to give to the Loader, defaults to `"<unknown>"` * * Returns: Loader loading YAML from given string. * @@ -91,14 +93,14 @@ struct Loader * * YAMLException if data could not be read (e.g. a decoding error) */ - static Loader fromString(char[] data) @safe + static Loader fromString(char[] data, string filename = "<unknown>") @safe { - return Loader(cast(ubyte[])data); + return Loader(cast(ubyte[])data, filename); } /// Ditto - static Loader fromString(string data) @safe + static Loader fromString(string data, string filename = "<unknown>") @safe { - return fromString(data.dup); + return fromString(data.dup, filename); } /// Load a char[]. @safe unittest |