xref: /petsc/src/sys/yaml/README.md (revision 98d129c30f3ee9fdddc40fdbc5a989b7be64f888)
1This directory contains a partial and slightly modified copy of
2(LibYAML)[https://pyyaml.org/wiki/LibYAML] sources corresponding to
3release 0.2.5. A copy of the LibYAML [license](License) is also included.
4
5The source files are not compiled directly into the PETSc library. Rather they
6are included in src/sys/objects/optionsyaml.c as static functions so they do not
7pollute the public symbolic name space.
8
9A list of the modifications follow:
10
11* The emitter API and other output-related parts have been removed,
12  as we are only interested in the input-related parts.
13* `yaml_get_version()` and `yaml_get_version_string()` have been
14  removed, as we do not need them.
15* The constant `0` as been replaced by `NULL` in a few places to
16  silence `-Wzero-as-null-pointer-constant` when using C++ compilers.
17* The macro `YAML_DECLARE()` in `yaml.h` has been modified to specify
18  `static` visibility for all LibYAML symbols.
19
20Thanks to the exceptionally good source code organization in LibYAML,
21the removals and minor modifications occur in large contiguous blocks
22of code. This will make it quite easy to merge back upstream changes
23to keep this copy properly synchronized and maintained, or even
24incorporate some of the removed features if such need ever arises. We
25recommend using a merge tool like [`meld`](https://meldmerge.org/) to
26perform these future maintenance updates.
27