summaryrefslogtreecommitdiff
path: root/src/buildstream/_variables.pyx
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-10 13:59:12 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-15 14:14:03 +0000
commit301d40d1a42c056f7c9e8e734b6ce6251378cafb (patch)
treed3b3f57bf620c54e0796d353ad55f4408c42e2d9 /src/buildstream/_variables.pyx
parent53019a61c926787b622b6a5f94f81096b043cf99 (diff)
downloadbuildstream-301d40d1a42c056f7c9e8e734b6ce6251378cafb.tar.gz
_yaml: Split Node-related parts into 'node.pyx'
This makes the 'Node' API public, and available for use directly for plugins.
Diffstat (limited to 'src/buildstream/_variables.pyx')
-rw-r--r--src/buildstream/_variables.pyx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/_variables.pyx b/src/buildstream/_variables.pyx
index eb2deb553..470feddc9 100644
--- a/src/buildstream/_variables.pyx
+++ b/src/buildstream/_variables.pyx
@@ -24,7 +24,7 @@ import re
import sys
from ._exceptions import LoadError, LoadErrorReason
-from . cimport _yaml
+from .node cimport MappingNode
# Variables are allowed to have dashes here
#
@@ -65,11 +65,11 @@ PARSE_EXPANSION = re.compile(r"\%\{([a-zA-Z][a-zA-Z0-9_-]*)\}")
#
cdef class Variables:
- cdef _yaml.Node original
+ cdef MappingNode original
cdef dict _expstr_map
cdef public dict flat
- def __init__(self, _yaml.Node node):
+ def __init__(self, MappingNode node):
self.original = node
self._expstr_map = self._resolve(node)
self.flat = self._flatten()
@@ -115,7 +115,7 @@ cdef class Variables:
#
# Here we resolve all of our inputs into a dictionary, ready for use
# in subst()
- cdef dict _resolve(self, _yaml.Node node):
+ cdef dict _resolve(self, MappingNode node):
# Special case, if notparallel is specified in the variables for this
# element, then override max-jobs to be 1.
# Initialize it as a string as all variables are processed as strings.