summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-05-17 15:07:44 +0100
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-05-22 18:40:03 +0100
commit283fabff547c88ca4ebda779d78415b35d11f60c (patch)
treed78fa6738225f36962115f38a0640074119a6760
parent8a43cc838188c5274882fa95b329790d637d2af4 (diff)
downloadbuildstream-283fabff547c88ca4ebda779d78415b35d11f60c.tar.gz
WIP: make Variables extension class
-rw-r--r--src/buildstream/_variables.pyx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildstream/_variables.pyx b/src/buildstream/_variables.pyx
index e47adedf5..0c2044e2c 100644
--- a/src/buildstream/_variables.pyx
+++ b/src/buildstream/_variables.pyx
@@ -64,10 +64,13 @@ PARSE_EXPANSION = re.compile(r"\%\{([a-zA-Z][a-zA-Z0-9_-]*)\}")
# Raises:
# LoadError, if unresolved variables, or cycles in resolution, occur.
#
-class Variables():
+cdef class Variables:
- def __init__(self, node):
+ cdef object original
+ cdef dict _expstr_map
+ cdef public dict flat
+ def __cinit__(self, node):
self.original = node
self._expstr_map = self._resolve(node)
self.flat = self._flatten()