summaryrefslogtreecommitdiff
path: root/src/buildstream/node.pxd
Commit message (Collapse)AuthorAgeFilesLines
* node.pyx: MappingNode.get_int(): Support `None` as defaultJürg Billeter2020-04-141-1/+1
|
* node.pyx: Make 'strip_node_info' publicBenjamin Schubert2019-10-161-1/+1
| | | | | 'strip_node_info' would be useful for multiple plugins. We should therefore allow users to use it.
* node: Support clobbering provenance of MappingNode itselfDaniel Silverstone2019-08-151-1/+1
| | | | | | | | In order to better composite things, sometimes we may want to clobber the provenance of the MappingNode itself. This means that error reporting for sources and elements might be somewhat better. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* node: Add 'as_enum' on ScalarNode and 'get_enum' helper on MappingNodeBenjamin Schubert2019-07-291-0/+2
| | | | | | | | This adds a method to ensure that a value is from a set of valid values and raises an error message accordingly. - Define Enum types for each of the relevant cases - Adapt call places that were doing such things manually
* node: Add 'get_str_list' on 'MappingNode'Benjamin Schubert2019-07-171-0/+1
| | | | | | `mapping.get_sequence(...).as_str_list()` is a very common pattern seen both in plugins and the core. Adding a helper to reduce the number of operations will make usage smoother
* node: Document buildstream-private API and remove unused parameterBenjamin Schubert2019-07-151-1/+1
| | | | | _create_new_file did not use the 'toplevel' parameter, we can therefore remove it.
* node: Rename 'copy' to 'clone'Benjamin Schubert2019-07-151-1/+1
| | | | | | | | A 'clone' operation has an implicit understanding that it is expensive, which is not the case of a 'copy' operation, which is more usually a shallow copy. Therefore renaming to 'clone'
* node: Mark `MappingNode._get` as privateBenjamin Schubert2019-07-151-1/+1
|
* _yaml: Split Node-related parts into 'node.pyx'Benjamin Schubert2019-07-151-0/+112
This makes the 'Node' API public, and available for use directly for plugins.