Skip to content

Commit 8b5cb05

Browse files
committed
doc UPDATE improve 3 - 4 transition page
1 parent 4f6a738 commit 8b5cb05

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

doc/transition_3_4.dox

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,27 @@
33
*
44
* There are not that major non-backwards-compatible changes between libyang version 3 and 4 and the version was
55
* increased in part due to new functionality. The main new feature, which most of the changes are related to, is the
6-
* ability to serialize (print) compiled YANG context. What is more, such a printed context does not have to be
6+
* ability to __serialize (print) compiled YANG context__. What is more, such a printed context does not have to be
77
* deserialized to be used by applications and they can directly read the printed context in run-time. This saves time
88
* when reusing contexts since they do not always have to be created in every process but also potentially a lot of
99
* memory since all the processes on the system may share a single printed context. Naturally, such a concept has
1010
* some limitations that are mentioned in detail in the documentation (@ref howtoPrintedContext).
1111
*
1212
* Related to this feature there were lots of minor changes to make sure all the intended functionality works. Most
13-
* importantly, there are now 2 dictionaries for a context. One, read-only for the strings in the compiled context
13+
* importantly, there are now __2 dictionaries__ for a context. One, read-only for the strings in the compiled context
1414
* and the other for YANG data that can be written to normally. The main consequence of this is that comparing
15-
* directly (the addresses) of strings from these 2 dictionaries will not work. Next, all plugin references were
16-
* replaced by an `uintptr_t` value but there are functions ::lysc_get_type_plugin() and ::lysc_get_ext_plugin() for
17-
* getting the actual plugin structures. Then, default values are stored as strings in the schema nodes. To learn their
18-
* real type or get their canonical value, use ::lyd_value_validate_dflt(). Finally, some new callbacks were required
19-
* for extension-instance plugins so that they can be printed with the context as well.
15+
* directly (the addresses) of strings from these 2 dictionaries will not work. Also, it is now possible to __free all
16+
* the parsed modules__ from the context to save memory. The library functions should all be adjusted and handle such a
17+
* situation properly. Next, all __plugin references__ were replaced by an `uintptr_t` value but there are functions
18+
* ::lysc_get_type_plugin() and ::lysc_get_ext_plugin() for getting the actual plugin structures. Then, __default values
19+
* are stored as strings__ in the schema nodes. To learn their real type or get their canonical value, use
20+
* ::lyd_value_validate_dflt(). Finally, some new callbacks were required for extension-instance plugins so that they
21+
* can be printed with the context as well.
2022
*
2123
* Other notable changes include major LYB binary data format optimizations. The effect in API is that wherever a size
22-
* of a value is required, it is now expected in bits instead of bytes. Next, there are extension plugin API
23-
* improvements to account for custom XPath root definitions. Then, obsolete nodes are not compiled and cannot be
24-
* instantiated in data by default but can be if requested by a context flag. Finally, the "default" metadata instance
24+
* of a value is required, it is now expected in __bits instead of bytes__. Next, there are extension plugin API
25+
* improvements to account for custom XPath root definitions. Then, __obsolete nodes are not compiled__ and cannot be
26+
* instantiated in data by default but can be if requested by a context flag. Finally, the __"default" metadata instance__
2527
* connected to the `ietf-netconf-with-defaults` YANG module is now in the proper namespace, which is not the namespace
2628
* of this module. Other minor NBC changes should be reported by the compilator and they should be explained in the
2729
* documentation of the corresponding changed functions.

0 commit comments

Comments
 (0)