File: patching-rules-table.adoc

package info (click to toggle)
barectf 3.1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,840 kB
  • sloc: python: 3,781; ansic: 1,585; makefile: 45; sh: 11
file content (39 lines) | stat: -rw-r--r-- 1,279 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
For a given property of __**A**__, the patching rules are:

[%autowidth.stretch, cols="d,a,a"]
|===
|__**A**__'s property type |<em>A</em>'s property exists in&#160;<em>B</em> |<em>A</em>'s property doesn't exist in&#160;<em>B</em>

|Null, boolean, integer, and string
|Replace __**B**__'s property with __**A**__'s property.
|Keep __**A**__'s property.

|Sequence
|
__**B**__'s property is also a sequence::
    Append the items of __**A**__'s property to __**B**__'s
    property.
+
A structure field type object's
xref:struct-ft-obj.adoc#members-prop[`members` property] is an
exception: __**A**__'s property is considered to be an _ordered
mapping_, therefore apply the mapping patching rules.

__**B**__'s property is _not_ a sequence::
    Replace __**B**__'s property with __**A**__'s property.
|Keep __**A**__'s property.

|Mapping
|
__**B**__'s property is also a mapping::
    Patch __**A**__'s property over __**B**__'s property according to
    those rules.

__**B**__'s property is _not_ a mapping::
    Replace __**B**__'s property with __**A**__'s property.
|Keep __**A**__'s property.
|===

NOTE: When __**A**__'s property replaces __**B**__'s property and the
value of __**A**__'s property is null, this effectively "`resets`" the
property to its default value.