diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-05-30 09:34:49 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-05-30 09:34:49 +0000 |
commit | 8b302c55d2da4f7ab29e346496a8e2fe3d7a7660 (patch) | |
tree | 8e46707ab3af4ecca682bfa754ea4d5233921690 /src/buildstream/_yaml.pxd | |
parent | 4b450f664b1bdd0f342f36453f8e46edbd0c887a (diff) | |
parent | 32ee4163bc6c628dc1d475a110022b37bf661fa5 (diff) | |
download | buildstream-8b302c55d2da4f7ab29e346496a8e2fe3d7a7660.tar.gz |
Merge branch 'bschubert/cython' into 'master'
Introduce Cython for better performances
See merge request BuildStream/buildstream!1350
Diffstat (limited to 'src/buildstream/_yaml.pxd')
-rw-r--r-- | src/buildstream/_yaml.pxd | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/buildstream/_yaml.pxd b/src/buildstream/_yaml.pxd new file mode 100644 index 000000000..27a1a888e --- /dev/null +++ b/src/buildstream/_yaml.pxd @@ -0,0 +1,44 @@ +# +# Copyright (C) 2019 Bloomberg L.P. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library. If not, see <http://www.gnu.org/licenses/>. +# +# Authors: +# Benjamin Schubert <bschubert@bloomberg.net> + +# Documentation for each class and method here can be found in the adjacent +# implementation file (_yaml.pyx) + +cdef class Node: + + cdef public object value + cdef public int file_index + cdef public int line + cdef public int column + + +cdef class ProvenanceInformation: + + cdef public Node node + cdef str displayname + cdef public str filename, shortname + cdef public int col, line + cdef public object project, toplevel + cdef public bint is_synthetic + + +cpdef object node_get(Node node, object expected_type, str key, list indices=*, object default_value=*, bint allow_none=*) +cpdef void node_set(Node node, object key, object value, list indices=*) except * +cpdef list node_keys(object node) +cpdef ProvenanceInformation node_get_provenance(Node node, str key=*, list indices=*) |