diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..7a1d7a0 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,931 @@ +# Copyright 2015-2019 Google LLC. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) # Apache 2.0 + +exports_files(["COPYING"]) + +prefix_dir = "src/" + +static_binary = 1 + +# Core library (lib/) + +cc_library( + name = "fst-decl", + hdrs = [prefix_dir + "include/fst/fst-decl.h"], + includes = [prefix_dir + "include"], + deps = [":base"], +) + +PUBLIC_HEADERS = [ + # One-stop header file which includes the remaining headers below: + prefix_dir + "include/fst/fstlib.h", + + # Fine-grained headers: + prefix_dir + "include/fst/accumulator.h", + prefix_dir + "include/fst/add-on.h", + prefix_dir + "include/fst/arc-arena.h", + prefix_dir + "include/fst/arc-map.h", + prefix_dir + "include/fst/arc.h", + prefix_dir + "include/fst/arcfilter.h", + prefix_dir + "include/fst/arcsort.h", + prefix_dir + "include/fst/bi-table.h", + prefix_dir + "include/fst/cache.h", + prefix_dir + "include/fst/closure.h", + prefix_dir + "include/fst/compact-fst.h", + prefix_dir + "include/fst/complement.h", + prefix_dir + "include/fst/compose-filter.h", + prefix_dir + "include/fst/compose.h", + prefix_dir + "include/fst/concat.h", + prefix_dir + "include/fst/connect.h", + prefix_dir + "include/fst/const-fst.h", + prefix_dir + "include/fst/determinize.h", + prefix_dir + "include/fst/dfs-visit.h", + prefix_dir + "include/fst/difference.h", + prefix_dir + "include/fst/disambiguate.h", + prefix_dir + "include/fst/edit-fst.h", + prefix_dir + "include/fst/encode.h", + prefix_dir + "include/fst/epsnormalize.h", + prefix_dir + "include/fst/equal.h", + prefix_dir + "include/fst/equivalent.h", + prefix_dir + "include/fst/expanded-fst.h", + prefix_dir + "include/fst/factor-weight.h", + prefix_dir + "include/fst/filter-state.h", + prefix_dir + "include/fst/fst.h", + prefix_dir + "include/fst/heap.h", + prefix_dir + "include/fst/intersect.h", + prefix_dir + "include/fst/invert.h", + prefix_dir + "include/fst/isomorphic.h", + prefix_dir + "include/fst/label-reachable.h", + prefix_dir + "include/fst/lookahead-filter.h", + prefix_dir + "include/fst/lookahead-matcher.h", + prefix_dir + "include/fst/map.h", + prefix_dir + "include/fst/matcher-fst.h", + prefix_dir + "include/fst/matcher.h", + prefix_dir + "include/fst/memory.h", + prefix_dir + "include/fst/minimize.h", + prefix_dir + "include/fst/mutable-fst.h", + prefix_dir + "include/fst/partition.h", + prefix_dir + "include/fst/project.h", + prefix_dir + "include/fst/properties.h", + prefix_dir + "include/fst/prune.h", + prefix_dir + "include/fst/push.h", + prefix_dir + "include/fst/queue.h", + prefix_dir + "include/fst/randequivalent.h", + prefix_dir + "include/fst/randgen.h", + prefix_dir + "include/fst/rational.h", + prefix_dir + "include/fst/relabel.h", + prefix_dir + "include/fst/replace-util.h", + prefix_dir + "include/fst/replace.h", + prefix_dir + "include/fst/reverse.h", + prefix_dir + "include/fst/reweight.h", + prefix_dir + "include/fst/rmepsilon.h", + prefix_dir + "include/fst/rmfinalepsilon.h", + prefix_dir + "include/fst/shortest-distance.h", + prefix_dir + "include/fst/shortest-path.h", + prefix_dir + "include/fst/state-map.h", + prefix_dir + "include/fst/state-reachable.h", + prefix_dir + "include/fst/state-table.h", + prefix_dir + "include/fst/statesort.h", + prefix_dir + "include/fst/string.h", + prefix_dir + "include/fst/symbol-table-ops.h", + prefix_dir + "include/fst/synchronize.h", + prefix_dir + "include/fst/test-properties.h", + prefix_dir + "include/fst/topsort.h", + prefix_dir + "include/fst/union.h", + prefix_dir + "include/fst/vector-fst.h", + prefix_dir + "include/fst/verify.h", + prefix_dir + "include/fst/visit.h", +] + +# This version does not have the export-dynamic flag set and should not be +# used to load dynamic-shared object FST extensions. Please see the +# "lib_export_dynamic" target below for binaries that need DSO loading. +cc_library( + name = "lib_lite", + srcs = [ + prefix_dir + "lib/fst.cc", + prefix_dir + "lib/properties.cc", + prefix_dir + "lib/symbol-table-ops.cc", + ], + hdrs = PUBLIC_HEADERS, + copts = ["-Wno-sign-compare"], + includes = [prefix_dir + "include"], + linkopts = ["-lm"], + deps = [ + ":base", + ":fst-decl", + ":icu", + ":interval-set", + ":register", + ":symbol-table", + ":union-find", + ":util", + ":weight", + ], +) + +cc_library( + name = "fst", + hdrs = PUBLIC_HEADERS, + includes = [prefix_dir + "include"], + deps = [ + ":fst-types", + ":lib_lite", + ], +) + +cc_library( + name = "lib_export_dynamic", + linkopts = ["-Wl,--export-dynamic"], + deps = [":fst"], +) + +cc_library( + name = "fst-types", + srcs = [prefix_dir + "lib/fst-types.cc"], + deps = [":lib_lite"], + alwayslink = 1, # because of registration +) + +cc_library( + name = "symbol-table", + srcs = [prefix_dir + "lib/symbol-table.cc"], + hdrs = [prefix_dir + "include/fst/symbol-table.h"], + copts = ["-Wno-sign-compare"], + includes = [prefix_dir + "include"], + deps = [ + ":base", + ":util", + ], +) + +cc_library( + name = "weight", + srcs = [prefix_dir + "lib/weight.cc"], + hdrs = [ + prefix_dir + "include/fst/expectation-weight.h", + prefix_dir + "include/fst/float-weight.h", + prefix_dir + "include/fst/lexicographic-weight.h", + prefix_dir + "include/fst/pair-weight.h", + prefix_dir + "include/fst/power-weight.h", + prefix_dir + "include/fst/product-weight.h", + prefix_dir + "include/fst/set-weight.h", + prefix_dir + "include/fst/signed-log-weight.h", + prefix_dir + "include/fst/sparse-power-weight.h", + prefix_dir + "include/fst/sparse-tuple-weight.h", + prefix_dir + "include/fst/string-weight.h", + prefix_dir + "include/fst/tuple-weight.h", + prefix_dir + "include/fst/union-weight.h", + prefix_dir + "include/fst/weight.h", + ], + includes = [prefix_dir + "include"], + linkopts = ["-lm"], + deps = [ + ":base", + ":util", + ], +) + +cc_library( + name = "interval-set", + hdrs = [prefix_dir + "include/fst/interval-set.h"], + includes = [prefix_dir + "include"], + deps = [ + ":base", + ":util", + ], +) + +cc_library( + name = "register", + hdrs = [ + prefix_dir + "include/fst/generic-register.h", + prefix_dir + "include/fst/register.h", + ], + includes = [prefix_dir + "include"], + linkopts = ["-ldl"], + deps = [ + ":base", + ":util", + ], +) + +cc_library( + name = "icu", + hdrs = [ + prefix_dir + "include/fst/icu.h", + ], +) + +cc_library( + name = "union-find", + hdrs = [prefix_dir + "include/fst/union-find.h"], + includes = [prefix_dir + "include"], + deps = [":base"], +) + +cc_library( + name = "util", + srcs = [ + prefix_dir + "lib/mapped-file.cc", + prefix_dir + "lib/util.cc", + ], + hdrs = [ + prefix_dir + "include/fst/mapped-file.h", + prefix_dir + "include/fst/util.h", + ], + includes = [prefix_dir + "include"], + deps = [":base"], +) + +cc_library( + name = "base", + srcs = [ + prefix_dir + "lib/compat.cc", + prefix_dir + "lib/flags.cc", + ], + hdrs = [ + prefix_dir + "include/fst/compat.h", + prefix_dir + "include/fst/config.h", + prefix_dir + "include/fst/flags.h", + prefix_dir + "include/fst/icu.h", + prefix_dir + "include/fst/lock.h", + prefix_dir + "include/fst/log.h", + prefix_dir + "include/fst/types.h", + ], + includes = [prefix_dir + "include"], +) + +# Core library tests (test/) + +cc_test( + name = "fst_test", + timeout = "short", + srcs = [ + prefix_dir + "test/fst_test.cc", + prefix_dir + "include/fst/test/fst_test.h", + ], + deps = [":fst"], +) + +cc_library( + name = "weight-tester", + testonly = 1, + hdrs = [prefix_dir + "include/fst/test/weight-tester.h"], + includes = [prefix_dir], + deps = [":weight"], +) + +cc_test( + name = "weight_test", + timeout = "short", + srcs = [prefix_dir + "test/weight_test.cc"], + copts = ["-Wno-unused-local-typedefs"], + deps = [ + ":fst", + ":weight-tester", + ], +) + +[ + cc_test( + name = "algo_test_%s" % weight, + srcs = [ + prefix_dir + "test/algo_test.cc", + prefix_dir + "include/fst/test/algo_test.h", + prefix_dir + "include/fst/test/rand-fst.h", + ], + defines = ["TEST_%s" % weight.upper()], + deps = [":fst"], + ) + for weight in [ + "tropical", + "log", + "minmax", + "lexicographic", + "power", + ] +] + +# Non-template scripting-language integration (script/) + +cc_library( + name = "fstscript_base", + srcs = [ + prefix_dir + "script/arciterator-class.cc", + prefix_dir + "script/encodemapper-class.cc", + prefix_dir + "script/fst-class.cc", + prefix_dir + "script/getters.cc", + prefix_dir + "script/stateiterator-class.cc", + prefix_dir + "script/text-io.cc", + prefix_dir + "script/weight-class.cc", + ], + hdrs = [ + prefix_dir + "include/fst/script/arc-class.h", + prefix_dir + "include/fst/script/arciterator-class.h", + prefix_dir + "include/fst/script/arg-packs.h", + prefix_dir + "include/fst/script/encodemapper-class.h", + prefix_dir + "include/fst/script/fst-class.h", + prefix_dir + "include/fst/script/fstscript-decl.h", + prefix_dir + "include/fst/script/fstscript.h", + prefix_dir + "include/fst/script/getters.h", + prefix_dir + "include/fst/script/register.h", + prefix_dir + "include/fst/script/script-impl.h", + prefix_dir + "include/fst/script/stateiterator-class.h", + prefix_dir + "include/fst/script/text-io.h", + prefix_dir + "include/fst/script/weight-class.h", + # + prefix_dir + "include/fst/script/arcsort.h", + prefix_dir + "include/fst/script/closure.h", + prefix_dir + "include/fst/script/compile.h", + prefix_dir + "include/fst/script/compile-impl.h", + prefix_dir + "include/fst/script/compose.h", + prefix_dir + "include/fst/script/concat.h", + prefix_dir + "include/fst/script/connect.h", + prefix_dir + "include/fst/script/convert.h", + prefix_dir + "include/fst/script/decode.h", + prefix_dir + "include/fst/script/determinize.h", + prefix_dir + "include/fst/script/difference.h", + prefix_dir + "include/fst/script/disambiguate.h", + prefix_dir + "include/fst/script/draw.h", + prefix_dir + "include/fst/script/draw-impl.h", + prefix_dir + "include/fst/script/encode.h", + prefix_dir + "include/fst/script/epsnormalize.h", + prefix_dir + "include/fst/script/equal.h", + prefix_dir + "include/fst/script/equivalent.h", + prefix_dir + "include/fst/script/info.h", + prefix_dir + "include/fst/script/info-impl.h", + prefix_dir + "include/fst/script/intersect.h", + prefix_dir + "include/fst/script/invert.h", + prefix_dir + "include/fst/script/isomorphic.h", + prefix_dir + "include/fst/script/map.h", + prefix_dir + "include/fst/script/minimize.h", + prefix_dir + "include/fst/script/print.h", + prefix_dir + "include/fst/script/print-impl.h", + prefix_dir + "include/fst/script/project.h", + prefix_dir + "include/fst/script/prune.h", + prefix_dir + "include/fst/script/push.h", + prefix_dir + "include/fst/script/randequivalent.h", + prefix_dir + "include/fst/script/randgen.h", + prefix_dir + "include/fst/script/relabel.h", + prefix_dir + "include/fst/script/replace.h", + prefix_dir + "include/fst/script/reverse.h", + prefix_dir + "include/fst/script/reweight.h", + prefix_dir + "include/fst/script/rmepsilon.h", + prefix_dir + "include/fst/script/shortest-distance.h", + prefix_dir + "include/fst/script/shortest-path.h", + prefix_dir + "include/fst/script/synchronize.h", + prefix_dir + "include/fst/script/topsort.h", + prefix_dir + "include/fst/script/union.h", + prefix_dir + "include/fst/script/verify.h", + ], + copts = ["-Wno-sign-compare"], + includes = [prefix_dir + "include"], + deps = [":fst"], +) + +[ + cc_library( + name = "fstscript_%s" % operation, + srcs = [prefix_dir + "script/%s.cc" % operation], + hdrs = [prefix_dir + "include/fst/script/%s.h" % operation], + includes = [prefix_dir + "include"], + deps = [":fstscript_base"], + ) + for operation in [ + "arcsort", + "closure", + "concat", + "connect", + "convert", + "decode", + "determinize", + "disambiguate", + "encode", + "epsnormalize", + "equal", + "equivalent", + "invert", + "isomorphic", + "map", + "minimize", + "project", + "prune", + "push", + "randgen", + "relabel", + "replace", + "reverse", + "reweight", + "synchronize", + "topsort", + "union", + "verify", + ] +] + +cc_library( + name = "fstscript_compile", + srcs = [prefix_dir + "script/compile.cc"], + hdrs = [ + prefix_dir + "include/fst/script/compile.h", + prefix_dir + "include/fst/script/compile-impl.h", + ], + includes = [prefix_dir + "include"], + deps = [":fstscript_base"], +) + +cc_library( + name = "fstscript_compose", + srcs = [prefix_dir + "script/compose.cc"], + hdrs = [prefix_dir + "include/fst/script/compose.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fstscript_base", + ":fstscript_connect", + ], +) + +cc_library( + name = "fstscript_difference", + srcs = [prefix_dir + "script/difference.cc"], + hdrs = [prefix_dir + "include/fst/script/difference.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fstscript_base", + ":fstscript_compose", + ], +) + +cc_library( + name = "fstscript_draw", + srcs = [prefix_dir + "script/draw.cc"], + hdrs = [ + prefix_dir + "include/fst/script/draw.h", + prefix_dir + "include/fst/script/draw-impl.h", + ], + includes = [prefix_dir + "include"], + deps = [":fstscript_base"], +) + +cc_library( + name = "fstscript_info", + srcs = [ + prefix_dir + "script/info.cc", + prefix_dir + "script/info-impl.cc", + ], + hdrs = [ + prefix_dir + "include/fst/script/info.h", + prefix_dir + "include/fst/script/info-impl.h", + ], + includes = [prefix_dir + "include"], + deps = [":fstscript_base"], +) + +cc_library( + name = "fstscript_intersect", + srcs = [prefix_dir + "script/intersect.cc"], + hdrs = [prefix_dir + "include/fst/script/intersect.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fstscript_base", + ":fstscript_compose", + ], +) + +cc_library( + name = "fstscript_print", + srcs = [prefix_dir + "script/print.cc"], + hdrs = [ + prefix_dir + "include/fst/script/print.h", + prefix_dir + "include/fst/script/print-impl.h", + ], + includes = [prefix_dir + "include"], + deps = [":fstscript_base"], +) + +cc_library( + name = "fstscript_randequivalent", + srcs = [prefix_dir + "script/randequivalent.cc"], + hdrs = [prefix_dir + "include/fst/script/randequivalent.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fstscript_base", + ":fstscript_randgen", + ], +) + +cc_library( + name = "fstscript_rmepsilon", + srcs = [prefix_dir + "script/rmepsilon.cc"], + hdrs = [prefix_dir + "include/fst/script/rmepsilon.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fstscript_base", + ":fstscript_shortest_distance", + ], +) + +cc_library( + name = "fstscript_shortest_distance", + srcs = [prefix_dir + "script/shortest-distance.cc"], + hdrs = [prefix_dir + "include/fst/script/shortest-distance.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fstscript_base", + ":fstscript_prune", + ], +) + +cc_library( + name = "fstscript_shortest_path", + srcs = [prefix_dir + "script/shortest-path.cc"], + hdrs = [prefix_dir + "include/fst/script/shortest-path.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fstscript_base", + ":fstscript_shortest_distance", + ], +) + +cc_library( + name = "fstscript", + deps = [ + ":fstscript_arcsort", + ":fstscript_closure", + ":fstscript_compile", + ":fstscript_compose", + ":fstscript_concat", + ":fstscript_connect", + ":fstscript_convert", + ":fstscript_decode", + ":fstscript_determinize", + ":fstscript_difference", + ":fstscript_disambiguate", + ":fstscript_draw", + ":fstscript_encode", + ":fstscript_epsnormalize", + ":fstscript_equal", + ":fstscript_equivalent", + ":fstscript_info", + ":fstscript_intersect", + ":fstscript_invert", + ":fstscript_isomorphic", + ":fstscript_map", + ":fstscript_minimize", + ":fstscript_print", + ":fstscript_project", + ":fstscript_prune", + ":fstscript_push", + ":fstscript_randequivalent", + ":fstscript_randgen", + ":fstscript_relabel", + ":fstscript_replace", + ":fstscript_reverse", + ":fstscript_reweight", + ":fstscript_rmepsilon", + ":fstscript_shortest_distance", + ":fstscript_shortest_path", + ":fstscript_synchronize", + ":fstscript_topsort", + ":fstscript_union", + ":fstscript_verify", + ], +) + +# Command-line binaries (bin/) + +[ + cc_binary( + name = "fst%s" % operation.replace("_", ""), + srcs = [ + prefix_dir + "bin/fst%s.cc" % operation.replace("_", ""), + prefix_dir + "bin/fst%s-main.cc" % operation.replace("_", ""), + ], + linkstatic = static_binary, + deps = [":fstscript_%s" % operation], + ) + for operation in [ + "arcsort", + "closure", + "compile", + "compose", + "concat", + "connect", + "convert", + "determinize", + "difference", + "disambiguate", + "draw", + "epsnormalize", + "equal", + "info", + "intersect", + "invert", + "isomorphic", + "map", + "minimize", + "print", + "project", + "prune", + "push", + "randgen", + "relabel", + "replace", + "reverse", + "reweight", + "rmepsilon", + "shortest_distance", + "shortest_path", + "synchronize", + "topsort", + "union", + ] +] + +cc_binary( + name = "fstencode", + srcs = [ + prefix_dir + "bin/fstencode.cc", + prefix_dir + "bin/fstencode-main.cc", + ], + linkstatic = static_binary, + deps = [ + ":fstscript_decode", + ":fstscript_encode", + ], +) + +cc_binary( + name = "fstequivalent", + srcs = [ + prefix_dir + "bin/fstequivalent.cc", + prefix_dir + "bin/fstequivalent-main.cc", + ], + linkstatic = static_binary, + deps = [ + ":fstscript_equivalent", + ":fstscript_randequivalent", + ], +) + +cc_binary( + name = "fstsymbols", + srcs = [ + prefix_dir + "bin/fstsymbols.cc", + prefix_dir + "bin/fstsymbols-main.cc", + ], + linkstatic = static_binary, + deps = [":fstscript_verify"], +) + +# Extension: Fst ARchive a/k/a FAR (extensions/far/) + +cc_library( + name = "sttable", + srcs = [ + prefix_dir + "extensions/far/stlist.cc", + prefix_dir + "extensions/far/sttable.cc", + ], + hdrs = [ + prefix_dir + "include/fst/extensions/far/stlist.h", + prefix_dir + "include/fst/extensions/far/sttable.h", + ], + includes = [prefix_dir + "include"], + deps = [":util"], +) + +cc_library( + name = "far_base", + hdrs = [ + prefix_dir + "include/fst/extensions/far/far.h", + ], + includes = [prefix_dir + "include"], + deps = [ + ":fst", + ":sttable", + ], +) + +cc_library( + name = "far", + srcs = [prefix_dir + "extensions/far/strings.cc"], + hdrs = [ + prefix_dir + "include/fst/extensions/far/compile-strings.h", + prefix_dir + "include/fst/extensions/far/create.h", + prefix_dir + "include/fst/extensions/far/equal.h", + prefix_dir + "include/fst/extensions/far/extract.h", + prefix_dir + "include/fst/extensions/far/farlib.h", + prefix_dir + "include/fst/extensions/far/info.h", + prefix_dir + "include/fst/extensions/far/isomorphic.h", + prefix_dir + "include/fst/extensions/far/print-strings.h", + ], + includes = [prefix_dir + "include"], + deps = [ + ":far_base", + ":fst", + ], +) + +cc_library( + name = "farscript", + srcs = [ + prefix_dir + "extensions/far/far-class.cc", + prefix_dir + "extensions/far/farscript.cc", + prefix_dir + "extensions/far/getters.cc", + prefix_dir + "extensions/far/script-impl.cc", + prefix_dir + "extensions/far/strings.cc", + ], + hdrs = [ + prefix_dir + "include/fst/extensions/far/compile-strings.h", + prefix_dir + "include/fst/extensions/far/far-class.h", + prefix_dir + "include/fst/extensions/far/farscript.h", + prefix_dir + "include/fst/extensions/far/getters.h", + prefix_dir + "include/fst/extensions/far/script-impl.h", + ], + includes = [prefix_dir + "include"], + deps = [ + ":base", + ":far", + ":fstscript_base", + ], +) + +[ + cc_binary( + name = "far%s" % operation, + srcs = [prefix_dir + "extensions/far/far%s.cc" % operation], + linkstatic = static_binary, + deps = [":farscript"], + ) + for operation in [ + "compilestrings", + "create", + "equal", + "extract", + "info", + "isomorphic", + "printstrings", + ] +] + +# Extension: PushDown Transducers a/k/a PDT (extensions/pdt/) + +cc_library( + name = "pdt", + hdrs = [ + prefix_dir + "include/fst/extensions/pdt/collection.h", + prefix_dir + "include/fst/extensions/pdt/compose.h", + prefix_dir + "include/fst/extensions/pdt/expand.h", + prefix_dir + "include/fst/extensions/pdt/getters.h", + prefix_dir + "include/fst/extensions/pdt/info.h", + prefix_dir + "include/fst/extensions/pdt/paren.h", + prefix_dir + "include/fst/extensions/pdt/pdt.h", + prefix_dir + "include/fst/extensions/pdt/pdtlib.h", + prefix_dir + "include/fst/extensions/pdt/replace.h", + prefix_dir + "include/fst/extensions/pdt/reverse.h", + prefix_dir + "include/fst/extensions/pdt/shortest-path.h", + ], + includes = [prefix_dir + "include"], + deps = [ + ":fst", + ], +) + +cc_library( + name = "pdtscript", + srcs = [ + prefix_dir + "extensions/pdt/getters.cc", + prefix_dir + "extensions/pdt/pdtscript.cc", + ], + hdrs = [ + prefix_dir + "include/fst/extensions/pdt/getters.h", + prefix_dir + "include/fst/extensions/pdt/pdtscript.h", + ], + includes = [prefix_dir + "include"], + deps = [ + ":fst", + ":fstscript_base", + ":pdt", + ], +) + +cc_binary( + name = "pdtcompose", + srcs = [prefix_dir + "extensions/pdt/pdtcompose.cc"], + linkstatic = static_binary, + deps = [ + ":fstscript_connect", + ":pdtscript", + ], +) + +[ + cc_binary( + name = "pdt%s" % operation, + srcs = [prefix_dir + "extensions/pdt/pdt%s.cc" % operation], + linkstatic = static_binary, + deps = [":pdtscript"], + ) + for operation in [ + "expand", + "info", + "replace", + "reverse", + "shortestpath", + ] +] + +# Extension: Multi PushDown Transducers a/k/a MPDT (extensions/mpdt/) + +cc_library( + name = "mpdt", + hdrs = [ + prefix_dir + "include/fst/extensions/mpdt/compose.h", + prefix_dir + "include/fst/extensions/mpdt/expand.h", + prefix_dir + "include/fst/extensions/mpdt/info.h", + prefix_dir + "include/fst/extensions/mpdt/mpdt.h", + prefix_dir + "include/fst/extensions/mpdt/mpdtlib.h", + prefix_dir + "include/fst/extensions/mpdt/read_write_utils.h", + prefix_dir + "include/fst/extensions/mpdt/reverse.h", + ], + includes = [prefix_dir + "include"], + deps = [ + ":fst", + ":pdt", + ], +) + +cc_library( + name = "mpdtscript", + srcs = [prefix_dir + "extensions/mpdt/mpdtscript.cc"], + hdrs = [prefix_dir + "include/fst/extensions/mpdt/mpdtscript.h"], + includes = [prefix_dir + "include"], + deps = [ + ":fst", + ":fstscript_base", + ":mpdt", + ":pdtscript", + ], +) + +cc_binary( + name = "mpdtcompose", + srcs = [prefix_dir + "extensions/mpdt/mpdtcompose.cc"], + linkstatic = static_binary, + deps = [ + ":fstscript_connect", + ":mpdtscript", + ], +) + +[ + cc_binary( + name = "mpdt%s" % operation, + srcs = [prefix_dir + "extensions/mpdt/mpdt%s.cc" % operation], + linkstatic = static_binary, + deps = [":mpdtscript"], + ) + for operation in [ + "expand", + "info", + "reverse", + ] +] + +# Extension: LOUDS compressed n-gram language models (extensions/ngram/) + +cc_library( + name = "ngram", + srcs = [ + prefix_dir + "extensions/ngram/bitmap-index.cc", + prefix_dir + "extensions/ngram/ngram-fst.cc", + prefix_dir + "extensions/ngram/nthbit.cc", + ], + hdrs = [ + prefix_dir + "include/fst/extensions/ngram/bitmap-index.h", + prefix_dir + "include/fst/extensions/ngram/ngram-fst.h", + prefix_dir + "include/fst/extensions/ngram/nthbit.h", + ], + includes = [prefix_dir + "include"], + deps = [ + ":fst", + ], +) + +# TODO: Extensions compact, compress, const, linear, lookahead, python, special diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b16ccb..f6189db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if (ICU_FOUND) endif (ICU_FOUND) find_package(ZLIB) -if (ZLIB_FOUND) +if (ZLIB_FOUND) include_directories(${ZLIB_INCLUDE_DIRECTORIES}) set(ZLIBS ${ZLIB_LIBRARIES}) endif (ZLIB_FOUND) @@ -27,9 +27,9 @@ else() option(BUILD_SHARED_LIBS "Build shared libraries" ON) endif (WIN32) -set(SOVERSION "10") -OPTION(BUILD_USE_SOLUTION_FOLDERS "Enable grouping of projects in VS" ON) -SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ${BUILD_USE_SOLUTION_FOLDERS}) +set(SOVERSION "16") +OPTION(BUILD_USE_SOLUTION_FOLDERS "Enable grouping of projects in VS" ON) +SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ${BUILD_USE_SOLUTION_FOLDERS}) option(HAVE_BIN "Build the fst binaries" ON) diff --git a/Makefile.am b/Makefile.am index 0182df2..809d5c1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,4 @@ SUBDIRS = src ACLOCAL_AMFLAGS = -I m4 + +EXTRA_DIST = BUILD.bazel diff --git a/Makefile.in b/Makefile.in index 240865a..0d29489 100644 --- a/Makefile.in +++ b/Makefile.in @@ -345,6 +345,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = BUILD.bazel all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/NEWS b/NEWS index 9436843..6955538 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,10 @@ OpenFst: Release 1.7 + * Fixes bug with coinaccessible states in NaturalAStarEstimate (1.7.2) + * Optionally allows building with Bazel (1.7.2) + * Simplifies string printing interface (1.7.2) + * Marks weight converters const (1.7.2) + * Adds NoMatchComposeFilter (1.7.2) + * Removed static assertions that trigger bugs in GCC (1.7.1) * Evaluates many weight operations at compile-time (1.7.1) * Adds configure-time test for float equality reflexivity (1.7.0) * Adds additional overloads to Equals (1.7.0) diff --git a/README b/README index 0e243b6..db23077 100644 --- a/README +++ b/README @@ -1,10 +1,10 @@ -OpenFst: Release 1.7.1. +OpenFst: Release 1.7.2. OpenFst is a library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs). REQUIREMENTS: - This version is known to work under Linux using g++ (>= 4.7) and OS X using + This version is known to work under Linux using g++ (>= 4.9) and OS X using XCode (>= 5). It is expected to work wherever adequate POSIX (dlopen, ssize_t, basename), C99 (snprintf, strtoll, ), and C++11 (, , ) support is available. @@ -61,6 +61,19 @@ USAGE: correctly if desired. Any extensions will be found under /usr/local/lib/fst or /usr/local/include/fst/extensions. +BUILDING WITH BAZEL: + As of release 1.7.2 it is possible to build the core library and binaries as + well as several extensions with Bazel and to depend on OpenFst as an + external dependency in other projects compiled with Bazel. Please refer to + https://bazel.build for information on using Bazel. OpenFst can be compiled + from anywhere in the source tree, as follows: + + $ bazel build //:all + + Tests can be run in a similar fashion: + + $ bazel test //:all + DOCUMENTATION: See www.openfst.org for general documentation. See ./NEWS for updates since the last release. diff --git a/config.guess b/config.guess index 31e01ef..f50dcdb 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-11-07' +timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +149,20 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -208,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -219,52 +226,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) - echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix + echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) - echo ${UNAME_MACHINE}-unknown-redox + echo "$UNAME_MACHINE"-unknown-redox exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -316,7 +326,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -325,10 +335,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -340,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -367,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. @@ -392,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -407,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -436,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -494,11 +504,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -524,17 +534,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -551,7 +561,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -563,14 +573,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -581,7 +591,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -595,7 +605,7 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -604,9 +614,9 @@ EOF IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix @@ -615,7 +625,7 @@ EOF echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -630,28 +640,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -684,13 +694,13 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = hppa2.0w ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -709,15 +719,15 @@ EOF HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -742,7 +752,7 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; @@ -763,9 +773,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -790,109 +800,109 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -906,63 +916,63 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -976,70 +986,74 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} + echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1053,34 +1067,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1090,12 +1104,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1105,9 +1119,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1127,9 +1141,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1149,9 +1163,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1160,28 +1174,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1192,7 +1206,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1212,23 +1226,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1247,39 +1261,39 @@ EOF echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux${UNAME_RELEASE} + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ @@ -1307,7 +1321,7 @@ EOF # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` @@ -1315,22 +1329,25 @@ EOF UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk${UNAME_RELEASE} + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1339,7 +1356,7 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 @@ -1350,7 +1367,7 @@ EOF else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1371,14 +1388,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1387,16 +1404,16 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs @@ -1405,7 +1422,7 @@ esac echo "$0: unable to guess system type" >&2 -case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 </dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 diff --git a/config.sub b/config.sub index 00f68b8..1d8e98b 100755 --- a/config.sub +++ b/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-11-23' +timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -94,7 +94,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -112,7 +112,7 @@ esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ @@ -120,16 +120,16 @@ case $maybe_os in kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac @@ -178,44 +178,44 @@ case $os in ;; -sco6) os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 @@ -227,7 +227,7 @@ case $os in os=-lynxos ;; -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos @@ -296,7 +296,7 @@ case $basic_machine in | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ + | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ @@ -333,7 +333,7 @@ case $basic_machine in basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown @@ -362,7 +362,7 @@ case $basic_machine in ;; # Object if more than one company name word. *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -457,7 +457,7 @@ case $basic_machine in # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -491,7 +491,7 @@ case $basic_machine in basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -536,7 +536,7 @@ case $basic_machine in os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -544,13 +544,13 @@ case $basic_machine in os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -648,7 +648,7 @@ case $basic_machine in os=$os"spe" ;; e500v[12]-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; ebmon29k) @@ -740,9 +740,6 @@ case $basic_machine in hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -755,26 +752,26 @@ case $basic_machine in basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -793,19 +790,16 @@ case $basic_machine in os=-sysv ;; leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -837,10 +831,10 @@ case $basic_machine in os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -859,7 +853,7 @@ case $basic_machine in os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc @@ -946,6 +940,9 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; nsx-tandem) basic_machine=nsx-tandem ;; @@ -981,7 +978,7 @@ case $basic_machine in os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -997,7 +994,7 @@ case $basic_machine in basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -1012,16 +1009,16 @@ case $basic_machine in basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -1031,23 +1028,23 @@ case $basic_machine in ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1101,17 +1098,10 @@ case $basic_machine in sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1130,7 +1120,7 @@ case $basic_machine in os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1244,9 +1234,6 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; - wasm32) - basic_machine=wasm32-unknown - ;; w65*) basic_machine=w65-wdc os=-none @@ -1266,20 +1253,12 @@ case $basic_machine in basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1308,10 +1287,6 @@ case $basic_machine in vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1321,9 +1296,6 @@ case $basic_machine in sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1343,7 +1315,7 @@ case $basic_machine in # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1351,10 +1323,10 @@ esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1377,15 +1349,16 @@ case $os in -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1398,7 +1371,7 @@ case $os in | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ @@ -1409,14 +1382,15 @@ case $os in | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1433,12 +1407,12 @@ case $os in -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1447,10 +1421,10 @@ case $os in os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1461,12 +1435,6 @@ case $os in -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1513,7 +1481,7 @@ case $os in -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1528,18 +1496,9 @@ case $os in -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; -zvmoe) os=-zvmoe ;; @@ -1568,7 +1527,7 @@ case $os in *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1664,9 +1623,6 @@ case $basic_machine in *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1721,9 +1677,6 @@ case $basic_machine in i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1833,11 +1786,11 @@ case $basic_machine in vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: diff --git a/configure b/configure index 20135c6..285a278 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for OpenFst 1.7.1. +# Generated by GNU Autoconf 2.69 for OpenFst 1.7.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='OpenFst' PACKAGE_TARNAME='openfst' -PACKAGE_VERSION='1.7.1' -PACKAGE_STRING='OpenFst 1.7.1' +PACKAGE_VERSION='1.7.2' +PACKAGE_STRING='OpenFst 1.7.2' PACKAGE_BUGREPORT='help@www.openfst.org' PACKAGE_URL='' @@ -1395,7 +1395,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenFst 1.7.1 to adapt to many kinds of systems. +\`configure' configures OpenFst 1.7.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1466,7 +1466,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenFst 1.7.1:";; + short | recursive ) echo "Configuration of OpenFst 1.7.2:";; esac cat <<\_ACEOF @@ -1598,7 +1598,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenFst configure 1.7.1 +OpenFst configure 1.7.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2039,7 +2039,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenFst $as_me 1.7.1, which was +It was created by OpenFst $as_me 1.7.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2902,7 +2902,7 @@ fi # Define the identity of the package. PACKAGE='openfst' - VERSION='1.7.1' + VERSION='1.7.2' cat >>confdefs.h <<_ACEOF @@ -17458,7 +17458,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenFst $as_me 1.7.1, which was +This file was extended by OpenFst $as_me 1.7.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17524,7 +17524,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -OpenFst config.status 1.7.1 +OpenFst config.status 1.7.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index abffbdf..ea450da 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([OpenFst], [1.7.1], [help@www.openfst.org]) +AC_INIT([OpenFst], [1.7.2], [help@www.openfst.org]) AM_INIT_AUTOMAKE([foreign nostdinc -Wall -Werror subdir-objects]) AM_PROG_AR diff --git a/src/bin/fstcompose.cc b/src/bin/fstcompose.cc index 8b1348f..297a6e1 100644 --- a/src/bin/fstcompose.cc +++ b/src/bin/fstcompose.cc @@ -5,7 +5,7 @@ DEFINE_string(compose_filter, "auto", "Composition filter, one of: \"alt_sequence\", \"auto\", " - "\"match\", \"null\", \"sequence\", \"trivial\""); + "\"match\", \"no_match\", \"null\", \"sequence\", \"trivial\""); DEFINE_bool(connect, true, "Trim output"); int fstcompose_main(int argc, char **argv); diff --git a/src/extensions/compact/Makefile.am b/src/extensions/compact/Makefile.am index 81d377d..cc28550 100644 --- a/src/extensions/compact/Makefile.am +++ b/src/extensions/compact/Makefile.am @@ -6,7 +6,7 @@ libfst_LTLIBRARIES = compact8_acceptor-fst.la compact8_string-fst.la compact8_un lib_LTLIBRARIES = libfstcompact.la libfstcompact_la_SOURCES = compact8_acceptor-fst.cc compact8_string-fst.cc compact8_unweighted-fst.cc compact8_unweighted_acceptor-fst.cc compact8_weighted_string-fst.cc compact16_acceptor-fst.cc compact16_string-fst.cc compact16_unweighted-fst.cc compact16_unweighted_acceptor-fst.cc compact16_weighted_string-fst.cc compact64_acceptor-fst.cc compact64_string-fst.cc compact64_unweighted-fst.cc compact64_unweighted_acceptor-fst.cc compact64_weighted_string-fst.cc -libfstcompact_la_LDFLAGS = -version-info 15:0:0 +libfstcompact_la_LDFLAGS = -version-info 16:0:0 libfstcompact_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) compact8_acceptor_fst_la_SOURCES = compact8_acceptor-fst.cc diff --git a/src/extensions/compact/Makefile.in b/src/extensions/compact/Makefile.in index 173e4cb..bcb292f 100644 --- a/src/extensions/compact/Makefile.in +++ b/src/extensions/compact/Makefile.in @@ -514,7 +514,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) libfst_LTLIBRARIES = compact8_acceptor-fst.la compact8_string-fst.la compact8_unweighted-fst.la compact8_unweighted_acceptor-fst.la compact8_weighted_string-fst.la compact16_acceptor-fst.la compact16_string-fst.la compact16_unweighted-fst.la compact16_unweighted_acceptor-fst.la compact16_weighted_string-fst.la compact64_acceptor-fst.la compact64_string-fst.la compact64_unweighted-fst.la compact64_unweighted_acceptor-fst.la compact64_weighted_string-fst.la lib_LTLIBRARIES = libfstcompact.la libfstcompact_la_SOURCES = compact8_acceptor-fst.cc compact8_string-fst.cc compact8_unweighted-fst.cc compact8_unweighted_acceptor-fst.cc compact8_weighted_string-fst.cc compact16_acceptor-fst.cc compact16_string-fst.cc compact16_unweighted-fst.cc compact16_unweighted_acceptor-fst.cc compact16_weighted_string-fst.cc compact64_acceptor-fst.cc compact64_string-fst.cc compact64_unweighted-fst.cc compact64_unweighted_acceptor-fst.cc compact64_weighted_string-fst.cc -libfstcompact_la_LDFLAGS = -version-info 15:0:0 +libfstcompact_la_LDFLAGS = -version-info 16:0:0 libfstcompact_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) compact8_acceptor_fst_la_SOURCES = compact8_acceptor-fst.cc compact8_acceptor_fst_la_LDFLAGS = -module diff --git a/src/extensions/compress/CMakeLists.txt b/src/extensions/compress/CMakeLists.txt index d58b3cb..9274c74 100644 --- a/src/extensions/compress/CMakeLists.txt +++ b/src/extensions/compress/CMakeLists.txt @@ -6,27 +6,27 @@ add_library(fstcompressscript ${HEADER_FILES} ) -target_link_libraries(fstcompressscript +target_link_libraries(fstcompressscript fstscript fst ${ZLIBS} ) set_target_properties(fstcompressscript PROPERTIES - SOVERSION "10" + SOVERSION "${SOVERSION}" ) -install(TARGETS fstcompressscript +install(TARGETS fstcompressscript LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION lib ) if(HAVE_BIN) - add_executable(fstcompress + add_executable(fstcompress fstcompress.cc) - target_link_libraries(fstcompress - fstcompressscript - fstscript + target_link_libraries(fstcompress + fstcompressscript + fstscript fst ${ZLIBS} ${CMAKE_DL_LIBS} @@ -37,14 +37,14 @@ if(HAVE_BIN) ) target_link_libraries(fstrandmod - fstcompressscript - fstscript + fstcompressscript + fstscript fst ${ZLIBS} ${CMAKE_DL_LIBS} ) - install(TARGETS fstcompress fstrandmod + install(TARGETS fstcompress fstrandmod LIBRARY DESTINATION bin ARCHIVE DESTINATION bin RUNTIME DESTINATION bin diff --git a/src/extensions/compress/Makefile.am b/src/extensions/compress/Makefile.am index f9ead0b..af715ae 100644 --- a/src/extensions/compress/Makefile.am +++ b/src/extensions/compress/Makefile.am @@ -14,7 +14,7 @@ endif if HAVE_SCRIPT libfstcompressscript_la_SOURCES = compress-script.cc -libfstcompressscript_la_LDFLAGS = -version-info 15:0:0 +libfstcompressscript_la_LDFLAGS = -version-info 16:0:0 libfstcompressscript_la_LIBADD = \ ../../script/libfstscript.la \ ../../lib/libfst.la -lz -lm $(DL_LIBS) diff --git a/src/extensions/compress/Makefile.in b/src/extensions/compress/Makefile.in index 44b6879..b5fa35d 100644 --- a/src/extensions/compress/Makefile.in +++ b/src/extensions/compress/Makefile.in @@ -376,7 +376,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) @HAVE_BIN_TRUE@fstcompress_SOURCES = fstcompress.cc @HAVE_BIN_TRUE@fstrandmod_SOURCES = fstrandmod.cc @HAVE_SCRIPT_TRUE@libfstcompressscript_la_SOURCES = compress-script.cc -@HAVE_SCRIPT_TRUE@libfstcompressscript_la_LDFLAGS = -version-info 15:0:0 +@HAVE_SCRIPT_TRUE@libfstcompressscript_la_LDFLAGS = -version-info 16:0:0 @HAVE_SCRIPT_TRUE@libfstcompressscript_la_LIBADD = \ @HAVE_SCRIPT_TRUE@ ../../script/libfstscript.la \ @HAVE_SCRIPT_TRUE@ ../../lib/libfst.la -lz -lm $(DL_LIBS) diff --git a/src/extensions/const/Makefile.am b/src/extensions/const/Makefile.am index 3a0883c..4ad7ab0 100644 --- a/src/extensions/const/Makefile.am +++ b/src/extensions/const/Makefile.am @@ -6,7 +6,7 @@ libfst_LTLIBRARIES = const8-fst.la const16-fst.la const64-fst.la lib_LTLIBRARIES = libfstconst.la libfstconst_la_SOURCES = const8-fst.cc const16-fst.cc const64-fst.cc -libfstconst_la_LDFLAGS = -version-info 15:0:0 -lm $(DL_LIBS) +libfstconst_la_LDFLAGS = -version-info 16:0:0 -lm $(DL_LIBS) libfstconst_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) const8_fst_la_SOURCES = const8-fst.cc diff --git a/src/extensions/const/Makefile.in b/src/extensions/const/Makefile.in index 776441f..21e369f 100644 --- a/src/extensions/const/Makefile.in +++ b/src/extensions/const/Makefile.in @@ -371,7 +371,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) libfst_LTLIBRARIES = const8-fst.la const16-fst.la const64-fst.la lib_LTLIBRARIES = libfstconst.la libfstconst_la_SOURCES = const8-fst.cc const16-fst.cc const64-fst.cc -libfstconst_la_LDFLAGS = -version-info 15:0:0 -lm $(DL_LIBS) +libfstconst_la_LDFLAGS = -version-info 16:0:0 -lm $(DL_LIBS) libfstconst_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) const8_fst_la_SOURCES = const8-fst.cc const8_fst_la_LDFLAGS = -module diff --git a/src/extensions/far/Makefile.am b/src/extensions/far/Makefile.am index 0f4784e..7a7c985 100644 --- a/src/extensions/far/Makefile.am +++ b/src/extensions/far/Makefile.am @@ -7,13 +7,13 @@ lib_LTLIBRARIES = libfstfar.la endif libfstfar_la_SOURCES = sttable.cc stlist.cc -libfstfar_la_LDFLAGS = -version-info 15:0:0 +libfstfar_la_LDFLAGS = -version-info 16:0:0 libfstfar_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) if HAVE_SCRIPT libfstfarscript_la_SOURCES = far-class.cc farscript.cc getters.cc script-impl.cc \ strings.cc -libfstfarscript_la_LDFLAGS = -version-info 15:0:0 +libfstfarscript_la_LDFLAGS = -version-info 16:0:0 libfstfarscript_la_LIBADD = \ libfstfar.la ../../script/libfstscript.la \ ../../lib/libfst.la -lm $(DL_LIBS) diff --git a/src/extensions/far/Makefile.in b/src/extensions/far/Makefile.in index ed0068d..4e1623c 100644 --- a/src/extensions/far/Makefile.in +++ b/src/extensions/far/Makefile.in @@ -426,12 +426,12 @@ AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) @HAVE_SCRIPT_FALSE@lib_LTLIBRARIES = libfstfar.la @HAVE_SCRIPT_TRUE@lib_LTLIBRARIES = libfstfar.la libfstfarscript.la libfstfar_la_SOURCES = sttable.cc stlist.cc -libfstfar_la_LDFLAGS = -version-info 15:0:0 +libfstfar_la_LDFLAGS = -version-info 16:0:0 libfstfar_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) @HAVE_SCRIPT_TRUE@libfstfarscript_la_SOURCES = far-class.cc farscript.cc getters.cc script-impl.cc \ @HAVE_SCRIPT_TRUE@ strings.cc -@HAVE_SCRIPT_TRUE@libfstfarscript_la_LDFLAGS = -version-info 15:0:0 +@HAVE_SCRIPT_TRUE@libfstfarscript_la_LDFLAGS = -version-info 16:0:0 @HAVE_SCRIPT_TRUE@libfstfarscript_la_LIBADD = \ @HAVE_SCRIPT_TRUE@ libfstfar.la ../../script/libfstscript.la \ @HAVE_SCRIPT_TRUE@ ../../lib/libfst.la -lm $(DL_LIBS) diff --git a/src/extensions/linear/Makefile.am b/src/extensions/linear/Makefile.am index bb1fc96..a7bbb1c 100644 --- a/src/extensions/linear/Makefile.am +++ b/src/extensions/linear/Makefile.am @@ -13,7 +13,7 @@ endif if HAVE_SCRIPT libfstlinearscript_la_SOURCES = linearscript.cc -libfstlinearscript_la_LDFLAGS = -version-info 15:0:0 -lm $(DL_LIBS) +libfstlinearscript_la_LDFLAGS = -version-info 16:0:0 -lm $(DL_LIBS) libfstlinearscript_la_LIBADD = ../../script/libfstscript.la \ ../../lib/libfst.la -lm $(DL_LIBS) endif diff --git a/src/extensions/linear/Makefile.in b/src/extensions/linear/Makefile.in index 0833423..dba29dc 100644 --- a/src/extensions/linear/Makefile.in +++ b/src/extensions/linear/Makefile.in @@ -400,7 +400,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) @HAVE_BIN_TRUE@fstlinear_SOURCES = fstlinear.cc @HAVE_BIN_TRUE@fstloglinearapply_SOURCES = fstloglinearapply.cc @HAVE_SCRIPT_TRUE@libfstlinearscript_la_SOURCES = linearscript.cc -@HAVE_SCRIPT_TRUE@libfstlinearscript_la_LDFLAGS = -version-info 15:0:0 -lm $(DL_LIBS) +@HAVE_SCRIPT_TRUE@libfstlinearscript_la_LDFLAGS = -version-info 16:0:0 -lm $(DL_LIBS) @HAVE_SCRIPT_TRUE@libfstlinearscript_la_LIBADD = ../../script/libfstscript.la \ @HAVE_SCRIPT_TRUE@ ../../lib/libfst.la -lm $(DL_LIBS) diff --git a/src/extensions/lookahead/Makefile.am b/src/extensions/lookahead/Makefile.am index 8e46b80..42190c7 100644 --- a/src/extensions/lookahead/Makefile.am +++ b/src/extensions/lookahead/Makefile.am @@ -8,7 +8,7 @@ lib_LTLIBRARIES = libfstlookahead.la libfstlookahead_la_SOURCES = arc_lookahead-fst.cc ilabel_lookahead-fst.cc \ olabel_lookahead-fst.cc -libfstlookahead_la_LDFLAGS = -version-info 15:0:0 +libfstlookahead_la_LDFLAGS = -version-info 16:0:0 libfstlookahead_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) arc_lookahead_fst_la_SOURCES = arc_lookahead-fst.cc diff --git a/src/extensions/lookahead/Makefile.in b/src/extensions/lookahead/Makefile.in index 29e18d9..8d32bf3 100644 --- a/src/extensions/lookahead/Makefile.in +++ b/src/extensions/lookahead/Makefile.in @@ -381,7 +381,7 @@ lib_LTLIBRARIES = libfstlookahead.la libfstlookahead_la_SOURCES = arc_lookahead-fst.cc ilabel_lookahead-fst.cc \ olabel_lookahead-fst.cc -libfstlookahead_la_LDFLAGS = -version-info 15:0:0 +libfstlookahead_la_LDFLAGS = -version-info 16:0:0 libfstlookahead_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) arc_lookahead_fst_la_SOURCES = arc_lookahead-fst.cc arc_lookahead_fst_la_LDFLAGS = -module diff --git a/src/extensions/mpdt/Makefile.am b/src/extensions/mpdt/Makefile.am index d454c23..3474bff 100644 --- a/src/extensions/mpdt/Makefile.am +++ b/src/extensions/mpdt/Makefile.am @@ -20,7 +20,7 @@ endif if HAVE_SCRIPT lib_LTLIBRARIES = libfstmpdtscript.la libfstmpdtscript_la_SOURCES = mpdtscript.cc -libfstmpdtscript_la_LDFLAGS = -version-info 15:0:0 +libfstmpdtscript_la_LDFLAGS = -version-info 16:0:0 libfstmpdtscript_la_LIBADD = ../../script/libfstscript.la \ ../../lib/libfst.la -lm $(DL_LIBS) endif diff --git a/src/extensions/mpdt/Makefile.in b/src/extensions/mpdt/Makefile.in index 43f6e5f..89544af 100644 --- a/src/extensions/mpdt/Makefile.in +++ b/src/extensions/mpdt/Makefile.in @@ -398,7 +398,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) @HAVE_BIN_TRUE@mpdtreverse_SOURCES = mpdtreverse.cc @HAVE_SCRIPT_TRUE@lib_LTLIBRARIES = libfstmpdtscript.la @HAVE_SCRIPT_TRUE@libfstmpdtscript_la_SOURCES = mpdtscript.cc -@HAVE_SCRIPT_TRUE@libfstmpdtscript_la_LDFLAGS = -version-info 15:0:0 +@HAVE_SCRIPT_TRUE@libfstmpdtscript_la_LDFLAGS = -version-info 16:0:0 @HAVE_SCRIPT_TRUE@libfstmpdtscript_la_LIBADD = ../../script/libfstscript.la \ @HAVE_SCRIPT_TRUE@ ../../lib/libfst.la -lm $(DL_LIBS) diff --git a/src/extensions/ngram/Makefile.am b/src/extensions/ngram/Makefile.am index b94f4ac..6174873 100644 --- a/src/extensions/ngram/Makefile.am +++ b/src/extensions/ngram/Makefile.am @@ -9,5 +9,5 @@ ngram_fst_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc ngram_fst_la_LDFLAGS = -module libfstngram_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc -libfstngram_la_LDFLAGS = -version-info 15:0:0 +libfstngram_la_LDFLAGS = -version-info 16:0:0 libfstngram_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) diff --git a/src/extensions/ngram/Makefile.in b/src/extensions/ngram/Makefile.in index e85a799..7cdf643 100644 --- a/src/extensions/ngram/Makefile.in +++ b/src/extensions/ngram/Makefile.in @@ -355,7 +355,7 @@ lib_LTLIBRARIES = libfstngram.la ngram_fst_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc ngram_fst_la_LDFLAGS = -module libfstngram_la_SOURCES = bitmap-index.cc ngram-fst.cc nthbit.cc -libfstngram_la_LDFLAGS = -version-info 15:0:0 +libfstngram_la_LDFLAGS = -version-info 16:0:0 libfstngram_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) all: all-am diff --git a/src/extensions/ngram/nthbit.cc b/src/extensions/ngram/nthbit.cc index ac446e5..be26f3d 100644 --- a/src/extensions/ngram/nthbit.cc +++ b/src/extensions/ngram/nthbit.cc @@ -3,6 +3,7 @@ #include +#ifndef __BMI2__ // This table is generated using: // // unsigned int nth_bit_scan(uint64 v, unsigned int r) { @@ -25,7 +26,7 @@ // if (i % 4 == 3) printf("\n"); // } // -uint32 nth_bit_bit_offset[] = { +const uint32 nth_bit_bit_offset[] = { 0x88888888, 0x88888880, 0x88888881, 0x88888810, 0x88888882, 0x88888820, 0x88888821, 0x88888210, 0x88888883, 0x88888830, 0x88888831, 0x88888310, 0x88888832, 0x88888320, 0x88888321, 0x88883210, 0x88888884, 0x88888840, @@ -70,3 +71,4 @@ uint32 nth_bit_bit_offset[] = { 0x88765421, 0x87654210, 0x88876543, 0x88765430, 0x88765431, 0x87654310, 0x88765432, 0x87654320, 0x87654321, 0x76543210, }; +#endif // !defined(__BMI2__) diff --git a/src/extensions/pdt/Makefile.am b/src/extensions/pdt/Makefile.am index 4b7277d..5ede45b 100644 --- a/src/extensions/pdt/Makefile.am +++ b/src/extensions/pdt/Makefile.am @@ -24,7 +24,7 @@ endif if HAVE_SCRIPT lib_LTLIBRARIES = libfstpdtscript.la libfstpdtscript_la_SOURCES = getters.cc pdtscript.cc -libfstpdtscript_la_LDFLAGS = -version-info 15:0:0 +libfstpdtscript_la_LDFLAGS = -version-info 16:0:0 libfstpdtscript_la_LIBADD = ../../script/libfstscript.la \ ../../lib/libfst.la -lm $(DL_LIBS) endif diff --git a/src/extensions/pdt/Makefile.in b/src/extensions/pdt/Makefile.in index 3297964..243db7f 100644 --- a/src/extensions/pdt/Makefile.in +++ b/src/extensions/pdt/Makefile.in @@ -413,7 +413,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../include $(ICU_CPPFLAGS) @HAVE_BIN_TRUE@pdtshortestpath_SOURCES = pdtshortestpath.cc @HAVE_SCRIPT_TRUE@lib_LTLIBRARIES = libfstpdtscript.la @HAVE_SCRIPT_TRUE@libfstpdtscript_la_SOURCES = getters.cc pdtscript.cc -@HAVE_SCRIPT_TRUE@libfstpdtscript_la_LDFLAGS = -version-info 15:0:0 +@HAVE_SCRIPT_TRUE@libfstpdtscript_la_LDFLAGS = -version-info 16:0:0 @HAVE_SCRIPT_TRUE@libfstpdtscript_la_LIBADD = ../../script/libfstscript.la \ @HAVE_SCRIPT_TRUE@ ../../lib/libfst.la -lm $(DL_LIBS) diff --git a/src/extensions/python/pywrapfst.cc b/src/extensions/python/pywrapfst.cc index 7fb6373..be72573 100644 --- a/src/extensions/python/pywrapfst.cc +++ b/src/extensions/python/pywrapfst.cc @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.2 */ +/* Generated by Cython 0.29.6 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,8 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_2" -#define CYTHON_HEX_VERSION 0x001D02F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -360,26 +360,6 @@ class __Pyx_FakeReference { #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif -#if CYTHON_USE_DICT_VERSIONS -#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ - (version_var) = __PYX_GET_DICT_VERSION(dict);\ - (cache_var) = (value); -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ - static PY_UINT64_T __pyx_dict_version = 0;\ - static PyObject *__pyx_dict_cached_value = NULL;\ - if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ - (VAR) = __pyx_dict_cached_value;\ - } else {\ - (VAR) = __pyx_dict_cached_value = (LOOKUP);\ - __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ - }\ - } -#else -#define __PYX_GET_DICT_VERSION(dict) (0) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); -#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) @@ -412,7 +392,7 @@ class __Pyx_FakeReference { typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); - return 0; // PyThread_create_key reports success always + return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); @@ -435,7 +415,7 @@ static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } -#endif // TSS (Thread Specific Storage) API +#endif #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else @@ -658,7 +638,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 1 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "utf8" #define __Pyx_PyObject_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize @@ -1821,7 +1802,7 @@ struct __pyx_obj_9pywrapfst_FarWriter { }; -/* "pywrapfst.pyx":3117 +/* "pywrapfst.pyx":3118 * * # Magic method used to get a Pythonic Iterator API out of the C++ API * def __iter__(self): # <<<<<<<<<<<<<< @@ -1835,7 +1816,7 @@ struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__ { -/* "pywrapfst.pyx":333 +/* "pywrapfst.pyx":334 * * * cdef class Weight(object): # <<<<<<<<<<<<<< @@ -1853,7 +1834,7 @@ struct __pyx_vtabstruct_9pywrapfst_Weight { static struct __pyx_vtabstruct_9pywrapfst_Weight *__pyx_vtabptr_9pywrapfst_Weight; -/* "pywrapfst.pyx":663 +/* "pywrapfst.pyx":664 * * * cdef class _SymbolTable(object): # <<<<<<<<<<<<<< @@ -1877,7 +1858,7 @@ struct __pyx_vtabstruct_9pywrapfst__SymbolTable { static struct __pyx_vtabstruct_9pywrapfst__SymbolTable *__pyx_vtabptr_9pywrapfst__SymbolTable; -/* "pywrapfst.pyx":851 +/* "pywrapfst.pyx":852 * * * cdef class _EncodeMapperSymbolTable(_SymbolTable): # <<<<<<<<<<<<<< @@ -1891,7 +1872,7 @@ struct __pyx_vtabstruct_9pywrapfst__EncodeMapperSymbolTable { static struct __pyx_vtabstruct_9pywrapfst__EncodeMapperSymbolTable *__pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTable; -/* "pywrapfst.pyx":871 +/* "pywrapfst.pyx":872 * * * cdef class _FstSymbolTable(_SymbolTable): # <<<<<<<<<<<<<< @@ -1905,7 +1886,7 @@ struct __pyx_vtabstruct_9pywrapfst__FstSymbolTable { static struct __pyx_vtabstruct_9pywrapfst__FstSymbolTable *__pyx_vtabptr_9pywrapfst__FstSymbolTable; -/* "pywrapfst.pyx":890 +/* "pywrapfst.pyx":891 * * * cdef class _MutableSymbolTable(_SymbolTable): # <<<<<<<<<<<<<< @@ -1922,7 +1903,7 @@ struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable { static struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *__pyx_vtabptr_9pywrapfst__MutableSymbolTable; -/* "pywrapfst.pyx":942 +/* "pywrapfst.pyx":943 * * * cdef class _MutableFstSymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -1936,7 +1917,7 @@ struct __pyx_vtabstruct_9pywrapfst__MutableFstSymbolTable { static struct __pyx_vtabstruct_9pywrapfst__MutableFstSymbolTable *__pyx_vtabptr_9pywrapfst__MutableFstSymbolTable; -/* "pywrapfst.pyx":953 +/* "pywrapfst.pyx":954 * * * cdef class SymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -1950,7 +1931,7 @@ struct __pyx_vtabstruct_9pywrapfst_SymbolTable { static struct __pyx_vtabstruct_9pywrapfst_SymbolTable *__pyx_vtabptr_9pywrapfst_SymbolTable; -/* "pywrapfst.pyx":1148 +/* "pywrapfst.pyx":1149 * * * cdef class SymbolTableIterator(object): # <<<<<<<<<<<<<< @@ -1968,7 +1949,7 @@ struct __pyx_vtabstruct_9pywrapfst_SymbolTableIterator { static struct __pyx_vtabstruct_9pywrapfst_SymbolTableIterator *__pyx_vtabptr_9pywrapfst_SymbolTableIterator; -/* "pywrapfst.pyx":1230 +/* "pywrapfst.pyx":1231 * * * cdef class EncodeMapper(object): # <<<<<<<<<<<<<< @@ -1989,7 +1970,7 @@ struct __pyx_vtabstruct_9pywrapfst_EncodeMapper { static struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *__pyx_vtabptr_9pywrapfst_EncodeMapper; -/* "pywrapfst.pyx":1386 +/* "pywrapfst.pyx":1387 * * * cdef class _Fst(object): # <<<<<<<<<<<<<< @@ -2022,7 +2003,7 @@ struct __pyx_vtabstruct_9pywrapfst__Fst { static struct __pyx_vtabstruct_9pywrapfst__Fst *__pyx_vtabptr_9pywrapfst__Fst; -/* "pywrapfst.pyx":1801 +/* "pywrapfst.pyx":1802 * * * cdef class _MutableFst(_Fst): # <<<<<<<<<<<<<< @@ -2067,7 +2048,7 @@ struct __pyx_vtabstruct_9pywrapfst__MutableFst { static struct __pyx_vtabstruct_9pywrapfst__MutableFst *__pyx_vtabptr_9pywrapfst__MutableFst; -/* "pywrapfst.pyx":2919 +/* "pywrapfst.pyx":2920 * * * cdef class Arc(object): # <<<<<<<<<<<<<< @@ -2081,7 +2062,7 @@ struct __pyx_vtabstruct_9pywrapfst_Arc { static struct __pyx_vtabstruct_9pywrapfst_Arc *__pyx_vtabptr_9pywrapfst_Arc; -/* "pywrapfst.pyx":2986 +/* "pywrapfst.pyx":2987 * * * cdef class ArcIterator(object): # <<<<<<<<<<<<<< @@ -2102,7 +2083,7 @@ struct __pyx_vtabstruct_9pywrapfst_ArcIterator { static struct __pyx_vtabstruct_9pywrapfst_ArcIterator *__pyx_vtabptr_9pywrapfst_ArcIterator; -/* "pywrapfst.pyx":3097 +/* "pywrapfst.pyx":3098 * * * cdef class MutableArcIterator(object): # <<<<<<<<<<<<<< @@ -2124,7 +2105,7 @@ struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator { static struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *__pyx_vtabptr_9pywrapfst_MutableArcIterator; -/* "pywrapfst.pyx":3217 +/* "pywrapfst.pyx":3218 * * * cdef class StateIterator(object): # <<<<<<<<<<<<<< @@ -2141,7 +2122,7 @@ struct __pyx_vtabstruct_9pywrapfst_StateIterator { static struct __pyx_vtabstruct_9pywrapfst_StateIterator *__pyx_vtabptr_9pywrapfst_StateIterator; -/* "pywrapfst.pyx":4115 +/* "pywrapfst.pyx":4119 * * * cdef class Compiler(object): # <<<<<<<<<<<<<< @@ -2156,7 +2137,7 @@ struct __pyx_vtabstruct_9pywrapfst_Compiler { static struct __pyx_vtabstruct_9pywrapfst_Compiler *__pyx_vtabptr_9pywrapfst_Compiler; -/* "pywrapfst.pyx":4245 +/* "pywrapfst.pyx":4249 * * * cdef class FarReader(object): # <<<<<<<<<<<<<< @@ -2178,7 +2159,7 @@ struct __pyx_vtabstruct_9pywrapfst_FarReader { static struct __pyx_vtabstruct_9pywrapfst_FarReader *__pyx_vtabptr_9pywrapfst_FarReader; -/* "pywrapfst.pyx":4392 +/* "pywrapfst.pyx":4396 * * * cdef class FarWriter(object): # <<<<<<<<<<<<<< @@ -2317,6 +2298,32 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) {\ @@ -2558,7 +2565,7 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj /* ClassMethod.proto */ #include "descrobject.h" -static PyObject* __Pyx_Method_ClassMethod(PyObject *method); +static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* GetNameInClass.proto */ #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) @@ -4575,7 +4582,7 @@ static enum fst::ComposeFilter __pyx_f_9pywrapfst__get_compose_filter(std::strin PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_get_compose_filter", 0); - /* "pywrapfst.pyx":226 + /* "pywrapfst.pyx":227 * """ * cdef fst.ComposeFilter compose_filter_enum * if not fst.GetComposeFilter(compose_filter, addr(compose_filter_enum)): # <<<<<<<<<<<<<< @@ -4585,26 +4592,26 @@ static enum fst::ComposeFilter __pyx_f_9pywrapfst__get_compose_filter(std::strin __pyx_t_1 = ((!(fst::script::GetComposeFilter(__pyx_v_compose_filter, (&__pyx_v_compose_filter_enum)) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":227 + /* "pywrapfst.pyx":228 * cdef fst.ComposeFilter compose_filter_enum * if not fst.GetComposeFilter(compose_filter, addr(compose_filter_enum)): * raise FstArgError("Unknown compose filter type: {!r}".format( # <<<<<<<<<<<<<< * compose_filter)) * return compose_filter_enum */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_compose_filter_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_compose_filter_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "pywrapfst.pyx":228 + /* "pywrapfst.pyx":229 * if not fst.GetComposeFilter(compose_filter, addr(compose_filter_enum)): * raise FstArgError("Unknown compose filter type: {!r}".format( * compose_filter)) # <<<<<<<<<<<<<< * return compose_filter_enum * */ - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -4619,7 +4626,7 @@ static enum fst::ComposeFilter __pyx_f_9pywrapfst__get_compose_filter(std::strin __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -4635,14 +4642,14 @@ static enum fst::ComposeFilter __pyx_f_9pywrapfst__get_compose_filter(std::strin __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 227, __pyx_L1_error) + __PYX_ERR(0, 228, __pyx_L1_error) - /* "pywrapfst.pyx":226 + /* "pywrapfst.pyx":227 * """ * cdef fst.ComposeFilter compose_filter_enum * if not fst.GetComposeFilter(compose_filter, addr(compose_filter_enum)): # <<<<<<<<<<<<<< @@ -4651,7 +4658,7 @@ static enum fst::ComposeFilter __pyx_f_9pywrapfst__get_compose_filter(std::strin */ } - /* "pywrapfst.pyx":229 + /* "pywrapfst.pyx":230 * raise FstArgError("Unknown compose filter type: {!r}".format( * compose_filter)) * return compose_filter_enum # <<<<<<<<<<<<<< @@ -4684,7 +4691,7 @@ static enum fst::ComposeFilter __pyx_f_9pywrapfst__get_compose_filter(std::strin return __pyx_r; } -/* "pywrapfst.pyx":232 +/* "pywrapfst.pyx":233 * * * cdef fst.DeterminizeType _get_determinize_type(const string &det_type) except *: # <<<<<<<<<<<<<< @@ -4705,7 +4712,7 @@ static enum fst::DeterminizeType __pyx_f_9pywrapfst__get_determinize_type(std::s PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_get_determinize_type", 0); - /* "pywrapfst.pyx":248 + /* "pywrapfst.pyx":249 * """ * cdef fst.DeterminizeType det_type_enum * if not fst.GetDeterminizeType(det_type, addr(det_type_enum)): # <<<<<<<<<<<<<< @@ -4715,18 +4722,18 @@ static enum fst::DeterminizeType __pyx_f_9pywrapfst__get_determinize_type(std::s __pyx_t_1 = ((!(fst::script::GetDeterminizeType(__pyx_v_det_type, (&__pyx_v_det_type_enum)) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":249 + /* "pywrapfst.pyx":250 * cdef fst.DeterminizeType det_type_enum * if not fst.GetDeterminizeType(det_type, addr(det_type_enum)): * raise FstArgError("Unknown determinization type: {!r}".format(det_type)) # <<<<<<<<<<<<<< * return det_type_enum * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_determinization_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_determinization_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_det_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_det_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -4741,7 +4748,7 @@ static enum fst::DeterminizeType __pyx_f_9pywrapfst__get_determinize_type(std::s __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -4757,14 +4764,14 @@ static enum fst::DeterminizeType __pyx_f_9pywrapfst__get_determinize_type(std::s __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 249, __pyx_L1_error) + __PYX_ERR(0, 250, __pyx_L1_error) - /* "pywrapfst.pyx":248 + /* "pywrapfst.pyx":249 * """ * cdef fst.DeterminizeType det_type_enum * if not fst.GetDeterminizeType(det_type, addr(det_type_enum)): # <<<<<<<<<<<<<< @@ -4773,7 +4780,7 @@ static enum fst::DeterminizeType __pyx_f_9pywrapfst__get_determinize_type(std::s */ } - /* "pywrapfst.pyx":250 + /* "pywrapfst.pyx":251 * if not fst.GetDeterminizeType(det_type, addr(det_type_enum)): * raise FstArgError("Unknown determinization type: {!r}".format(det_type)) * return det_type_enum # <<<<<<<<<<<<<< @@ -4783,7 +4790,7 @@ static enum fst::DeterminizeType __pyx_f_9pywrapfst__get_determinize_type(std::s __pyx_r = __pyx_v_det_type_enum; goto __pyx_L0; - /* "pywrapfst.pyx":232 + /* "pywrapfst.pyx":233 * * * cdef fst.DeterminizeType _get_determinize_type(const string &det_type) except *: # <<<<<<<<<<<<<< @@ -4806,7 +4813,7 @@ static enum fst::DeterminizeType __pyx_f_9pywrapfst__get_determinize_type(std::s return __pyx_r; } -/* "pywrapfst.pyx":253 +/* "pywrapfst.pyx":254 * * * cdef fst.QueueType _get_queue_type(const string &queue_type) except *: # <<<<<<<<<<<<<< @@ -4827,7 +4834,7 @@ static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_get_queue_type", 0); - /* "pywrapfst.pyx":272 + /* "pywrapfst.pyx":273 * """ * cdef fst.QueueType queue_type_enum * if not fst.GetQueueType(queue_type, addr(queue_type_enum)): # <<<<<<<<<<<<<< @@ -4837,18 +4844,18 @@ static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const __pyx_t_1 = ((!(fst::script::GetQueueType(__pyx_v_queue_type, (&__pyx_v_queue_type_enum)) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":273 + /* "pywrapfst.pyx":274 * cdef fst.QueueType queue_type_enum * if not fst.GetQueueType(queue_type, addr(queue_type_enum)): * raise FstArgError("Unknown queue type: {!r}".format(queue_type)) # <<<<<<<<<<<<<< * return queue_type_enum * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_queue_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_queue_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_queue_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_queue_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -4863,7 +4870,7 @@ static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -4879,14 +4886,14 @@ static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 273, __pyx_L1_error) + __PYX_ERR(0, 274, __pyx_L1_error) - /* "pywrapfst.pyx":272 + /* "pywrapfst.pyx":273 * """ * cdef fst.QueueType queue_type_enum * if not fst.GetQueueType(queue_type, addr(queue_type_enum)): # <<<<<<<<<<<<<< @@ -4895,7 +4902,7 @@ static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const */ } - /* "pywrapfst.pyx":274 + /* "pywrapfst.pyx":275 * if not fst.GetQueueType(queue_type, addr(queue_type_enum)): * raise FstArgError("Unknown queue type: {!r}".format(queue_type)) * return queue_type_enum # <<<<<<<<<<<<<< @@ -4905,7 +4912,7 @@ static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const __pyx_r = __pyx_v_queue_type_enum; goto __pyx_L0; - /* "pywrapfst.pyx":253 + /* "pywrapfst.pyx":254 * * * cdef fst.QueueType _get_queue_type(const string &queue_type) except *: # <<<<<<<<<<<<<< @@ -4928,7 +4935,7 @@ static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const return __pyx_r; } -/* "pywrapfst.pyx":277 +/* "pywrapfst.pyx":278 * * * cdef fst.RandArcSelection _get_rand_arc_selection( # <<<<<<<<<<<<<< @@ -4949,7 +4956,7 @@ static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selec PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_get_rand_arc_selection", 0); - /* "pywrapfst.pyx":297 + /* "pywrapfst.pyx":298 * """ * cdef fst.RandArcSelection select_enum * if not fst.GetRandArcSelection(select, addr(select_enum)): # <<<<<<<<<<<<<< @@ -4959,18 +4966,18 @@ static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selec __pyx_t_1 = ((!(fst::script::GetRandArcSelection(__pyx_v_select, (&__pyx_v_select_enum)) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":298 + /* "pywrapfst.pyx":299 * cdef fst.RandArcSelection select_enum * if not fst.GetRandArcSelection(select, addr(select_enum)): * raise FstArgError("Unknown random arc selection type: {!r}".format(select)) # <<<<<<<<<<<<<< * return select_enum * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_random_arc_selection_typ, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_random_arc_selection_typ, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_select); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_select); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -4985,7 +4992,7 @@ static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selec __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -5001,14 +5008,14 @@ static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selec __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 298, __pyx_L1_error) + __PYX_ERR(0, 299, __pyx_L1_error) - /* "pywrapfst.pyx":297 + /* "pywrapfst.pyx":298 * """ * cdef fst.RandArcSelection select_enum * if not fst.GetRandArcSelection(select, addr(select_enum)): # <<<<<<<<<<<<<< @@ -5017,7 +5024,7 @@ static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selec */ } - /* "pywrapfst.pyx":299 + /* "pywrapfst.pyx":300 * if not fst.GetRandArcSelection(select, addr(select_enum)): * raise FstArgError("Unknown random arc selection type: {!r}".format(select)) * return select_enum # <<<<<<<<<<<<<< @@ -5027,7 +5034,7 @@ static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selec __pyx_r = __pyx_v_select_enum; goto __pyx_L0; - /* "pywrapfst.pyx":277 + /* "pywrapfst.pyx":278 * * * cdef fst.RandArcSelection _get_rand_arc_selection( # <<<<<<<<<<<<<< @@ -5050,7 +5057,7 @@ static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selec return __pyx_r; } -/* "pywrapfst.pyx":302 +/* "pywrapfst.pyx":303 * * * cdef fst.ReplaceLabelType _get_replace_label_type( # <<<<<<<<<<<<<< @@ -5071,7 +5078,7 @@ static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_get_replace_label_type", 0); - /* "pywrapfst.pyx":323 + /* "pywrapfst.pyx":324 * """ * cdef fst.ReplaceLabelType replace_label_type_enum * if not fst.GetReplaceLabelType(replace_label_type, epsilon_on_replace, # <<<<<<<<<<<<<< @@ -5081,26 +5088,26 @@ static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std __pyx_t_1 = ((!(fst::script::GetReplaceLabelType(__pyx_v_replace_label_type, __pyx_v_epsilon_on_replace, (&__pyx_v_replace_label_type_enum)) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":325 + /* "pywrapfst.pyx":326 * if not fst.GetReplaceLabelType(replace_label_type, epsilon_on_replace, * addr(replace_label_type_enum)): * raise FstArgError("Unknown replace label type: {!r}".format( # <<<<<<<<<<<<<< * replace_label_type)) * return replace_label_type_enum */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_replace_label_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_replace_label_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "pywrapfst.pyx":326 + /* "pywrapfst.pyx":327 * addr(replace_label_type_enum)): * raise FstArgError("Unknown replace label type: {!r}".format( * replace_label_type)) # <<<<<<<<<<<<<< * return replace_label_type_enum * */ - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_replace_label_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_replace_label_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -5115,7 +5122,7 @@ static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -5131,14 +5138,14 @@ static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 325, __pyx_L1_error) + __PYX_ERR(0, 326, __pyx_L1_error) - /* "pywrapfst.pyx":323 + /* "pywrapfst.pyx":324 * """ * cdef fst.ReplaceLabelType replace_label_type_enum * if not fst.GetReplaceLabelType(replace_label_type, epsilon_on_replace, # <<<<<<<<<<<<<< @@ -5147,7 +5154,7 @@ static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std */ } - /* "pywrapfst.pyx":327 + /* "pywrapfst.pyx":328 * raise FstArgError("Unknown replace label type: {!r}".format( * replace_label_type)) * return replace_label_type_enum # <<<<<<<<<<<<<< @@ -5157,7 +5164,7 @@ static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std __pyx_r = __pyx_v_replace_label_type_enum; goto __pyx_L0; - /* "pywrapfst.pyx":302 + /* "pywrapfst.pyx":303 * * * cdef fst.ReplaceLabelType _get_replace_label_type( # <<<<<<<<<<<<<< @@ -5180,7 +5187,7 @@ static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std return __pyx_r; } -/* "pywrapfst.pyx":353 +/* "pywrapfst.pyx":354 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -5214,7 +5221,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":354 + /* "pywrapfst.pyx":355 * * def __repr__(self): * return "<{} Weight {} at 0x{:x}>".format(self.type(), self.to_string(), # <<<<<<<<<<<<<< @@ -5222,29 +5229,29 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Weight_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Weight_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type"); - __PYX_ERR(0, 354, __pyx_L1_error) + __PYX_ERR(0, 355, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string"); - __PYX_ERR(0, 354, __pyx_L1_error) + __PYX_ERR(0, 355, __pyx_L1_error) } - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "pywrapfst.pyx":355 + /* "pywrapfst.pyx":356 * def __repr__(self): * return "<{} Weight {} at 0x{:x}>".format(self.type(), self.to_string(), * id(self)) # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -5261,7 +5268,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -5272,7 +5279,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -5281,7 +5288,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -5295,7 +5302,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -5304,7 +5311,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":353 + /* "pywrapfst.pyx":354 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -5329,7 +5336,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight___repr__(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":357 +/* "pywrapfst.pyx":358 * id(self)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -5356,7 +5363,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_2__str__(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "pywrapfst.pyx":358 + /* "pywrapfst.pyx":359 * * def __str__(self): * return self.to_string() # <<<<<<<<<<<<<< @@ -5366,15 +5373,15 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_2__str__(struct __pyx_obj_9pywrapfs __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string"); - __PYX_ERR(0, 358, __pyx_L1_error) + __PYX_ERR(0, 359, __pyx_L1_error) } - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":357 + /* "pywrapfst.pyx":358 * id(self)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -5393,7 +5400,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_2__str__(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":363 +/* "pywrapfst.pyx":364 * # ValueError when that is not appropriate. * * def __float__(self): # <<<<<<<<<<<<<< @@ -5421,7 +5428,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_4__float__(struct __pyx_obj_9pywrap PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__float__", 0); - /* "pywrapfst.pyx":364 + /* "pywrapfst.pyx":365 * * def __float__(self): * return float(self.to_string()) # <<<<<<<<<<<<<< @@ -5431,18 +5438,18 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_4__float__(struct __pyx_obj_9pywrap __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string"); - __PYX_ERR(0, 364, __pyx_L1_error) + __PYX_ERR(0, 365, __pyx_L1_error) } - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":363 + /* "pywrapfst.pyx":364 * # ValueError when that is not appropriate. * * def __float__(self): # <<<<<<<<<<<<<< @@ -5462,7 +5469,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_4__float__(struct __pyx_obj_9pywrap return __pyx_r; } -/* "pywrapfst.pyx":366 +/* "pywrapfst.pyx":367 * return float(self.to_string()) * * def __init__(self, weight_type, weight): # <<<<<<<<<<<<<< @@ -5501,11 +5508,11 @@ static int __pyx_pw_9pywrapfst_6Weight_7__init__(PyObject *__pyx_v_self, PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 366, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 367, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 366, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 367, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5518,7 +5525,7 @@ static int __pyx_pw_9pywrapfst_6Weight_7__init__(PyObject *__pyx_v_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 366, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 367, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.Weight.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5538,7 +5545,7 @@ static int __pyx_pf_9pywrapfst_6Weight_6__init__(struct __pyx_obj_9pywrapfst_Wei std::string __pyx_t_2; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":367 + /* "pywrapfst.pyx":368 * * def __init__(self, weight_type, weight): * self._weight.reset(new fst.WeightClass(tostring(weight_type), # <<<<<<<<<<<<<< @@ -5547,20 +5554,20 @@ static int __pyx_pf_9pywrapfst_6Weight_6__init__(struct __pyx_obj_9pywrapfst_Wei */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 367, __pyx_L1_error) + __PYX_ERR(0, 368, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error) - /* "pywrapfst.pyx":368 + /* "pywrapfst.pyx":369 * def __init__(self, weight_type, weight): * self._weight.reset(new fst.WeightClass(tostring(weight_type), * weight_tostring(weight))) # <<<<<<<<<<<<<< * self._check_weight() * */ - __pyx_t_2 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L1_error) - /* "pywrapfst.pyx":367 + /* "pywrapfst.pyx":368 * * def __init__(self, weight_type, weight): * self._weight.reset(new fst.WeightClass(tostring(weight_type), # <<<<<<<<<<<<<< @@ -5569,7 +5576,7 @@ static int __pyx_pf_9pywrapfst_6Weight_6__init__(struct __pyx_obj_9pywrapfst_Wei */ __pyx_v_self->_weight.reset(new fst::script::WeightClass(__pyx_t_1, __pyx_t_2)); - /* "pywrapfst.pyx":369 + /* "pywrapfst.pyx":370 * self._weight.reset(new fst.WeightClass(tostring(weight_type), * weight_tostring(weight))) * self._check_weight() # <<<<<<<<<<<<<< @@ -5578,11 +5585,11 @@ static int __pyx_pf_9pywrapfst_6Weight_6__init__(struct __pyx_obj_9pywrapfst_Wei */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 369, __pyx_L1_error) + __PYX_ERR(0, 370, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->_check_weight(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->_check_weight(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 370, __pyx_L1_error) - /* "pywrapfst.pyx":366 + /* "pywrapfst.pyx":367 * return float(self.to_string()) * * def __init__(self, weight_type, weight): # <<<<<<<<<<<<<< @@ -5601,7 +5608,7 @@ static int __pyx_pf_9pywrapfst_6Weight_6__init__(struct __pyx_obj_9pywrapfst_Wei return __pyx_r; } -/* "pywrapfst.pyx":371 +/* "pywrapfst.pyx":372 * self._check_weight() * * cdef void _check_weight(self) except *: # <<<<<<<<<<<<<< @@ -5617,7 +5624,7 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_check_weight", 0); - /* "pywrapfst.pyx":372 + /* "pywrapfst.pyx":373 * * cdef void _check_weight(self) except *: * if self.type() == b"none": # <<<<<<<<<<<<<< @@ -5626,19 +5633,19 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type"); - __PYX_ERR(0, 372, __pyx_L1_error) + __PYX_ERR(0, 373, __pyx_L1_error) } __pyx_t_1 = ((((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0) == ((char const *)"none")) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":373 + /* "pywrapfst.pyx":374 * cdef void _check_weight(self) except *: * if self.type() == b"none": * raise FstArgError("Weight type not found") # <<<<<<<<<<<<<< * if not self.member(): * raise FstBadWeightError("Invalid weight") */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -5652,14 +5659,14 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Weight_type_not_found) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Weight_type_not_found); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 373, __pyx_L1_error) + __PYX_ERR(0, 374, __pyx_L1_error) - /* "pywrapfst.pyx":372 + /* "pywrapfst.pyx":373 * * cdef void _check_weight(self) except *: * if self.type() == b"none": # <<<<<<<<<<<<<< @@ -5668,7 +5675,7 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst */ } - /* "pywrapfst.pyx":374 + /* "pywrapfst.pyx":375 * if self.type() == b"none": * raise FstArgError("Weight type not found") * if not self.member(): # <<<<<<<<<<<<<< @@ -5677,19 +5684,19 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "member"); - __PYX_ERR(0, 374, __pyx_L1_error) + __PYX_ERR(0, 375, __pyx_L1_error) } __pyx_t_1 = ((!(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->member(__pyx_v_self, 0) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":375 + /* "pywrapfst.pyx":376 * raise FstArgError("Weight type not found") * if not self.member(): * raise FstBadWeightError("Invalid weight") # <<<<<<<<<<<<<< * * cpdef Weight copy(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -5703,14 +5710,14 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Invalid_weight) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Invalid_weight); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 375, __pyx_L1_error) + __PYX_ERR(0, 376, __pyx_L1_error) - /* "pywrapfst.pyx":374 + /* "pywrapfst.pyx":375 * if self.type() == b"none": * raise FstArgError("Weight type not found") * if not self.member(): # <<<<<<<<<<<<<< @@ -5719,7 +5726,7 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst */ } - /* "pywrapfst.pyx":371 + /* "pywrapfst.pyx":372 * self._check_weight() * * cdef void _check_weight(self) except *: # <<<<<<<<<<<<<< @@ -5738,7 +5745,7 @@ static void __pyx_f_9pywrapfst_6Weight__check_weight(struct __pyx_obj_9pywrapfst __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":377 +/* "pywrapfst.pyx":378 * raise FstBadWeightError("Invalid weight") * * cpdef Weight copy(self): # <<<<<<<<<<<<<< @@ -5760,13 +5767,12 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_6Weight_copy(struc if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_9copy)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -5783,41 +5789,41 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_6Weight_copy(struc } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 377, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 378, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":383 + /* "pywrapfst.pyx":384 * Returns a copy of the Weight. * """ * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass(deref(self._weight))) * return result */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":384 + /* "pywrapfst.pyx":385 * """ * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(deref(self._weight))) # <<<<<<<<<<<<<< @@ -5826,15 +5832,15 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_6Weight_copy(struc */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 384, __pyx_L1_error) + __PYX_ERR(0, 385, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 384, __pyx_L1_error) + __PYX_ERR(0, 385, __pyx_L1_error) } __pyx_v_result->_weight.reset(new fst::script::WeightClass((*__pyx_v_self->_weight))); - /* "pywrapfst.pyx":385 + /* "pywrapfst.pyx":386 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(deref(self._weight))) * return result # <<<<<<<<<<<<<< @@ -5846,7 +5852,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_6Weight_copy(struc __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":377 + /* "pywrapfst.pyx":378 * raise FstBadWeightError("Invalid weight") * * cpdef Weight copy(self): # <<<<<<<<<<<<<< @@ -5889,7 +5895,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_8copy(struct __pyx_obj_9pywrapfst_W PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_6Weight_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_6Weight_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5906,7 +5912,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_8copy(struct __pyx_obj_9pywrapfst_W return __pyx_r; } -/* "pywrapfst.pyx":391 +/* "pywrapfst.pyx":392 * * @classmethod * def Zero(cls, weight_type): # <<<<<<<<<<<<<< @@ -5934,7 +5940,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_10Zero(CYTHON_UNUSED PyTypeObject * PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Zero", 0); - /* "pywrapfst.pyx":397 + /* "pywrapfst.pyx":398 * Constructs semiring zero. * """ * return _Zero(weight_type) # <<<<<<<<<<<<<< @@ -5942,13 +5948,13 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_10Zero(CYTHON_UNUSED PyTypeObject * * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__Zero(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__Zero(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":391 + /* "pywrapfst.pyx":392 * * @classmethod * def Zero(cls, weight_type): # <<<<<<<<<<<<<< @@ -5967,7 +5973,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_10Zero(CYTHON_UNUSED PyTypeObject * return __pyx_r; } -/* "pywrapfst.pyx":400 +/* "pywrapfst.pyx":401 * * @classmethod * def One(cls, weight_type): # <<<<<<<<<<<<<< @@ -5995,7 +6001,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_12One(CYTHON_UNUSED PyTypeObject *_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("One", 0); - /* "pywrapfst.pyx":406 + /* "pywrapfst.pyx":407 * Constructs semiring One. * """ * return _One(weight_type) # <<<<<<<<<<<<<< @@ -6003,13 +6009,13 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_12One(CYTHON_UNUSED PyTypeObject *_ * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__One(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__One(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":400 + /* "pywrapfst.pyx":401 * * @classmethod * def One(cls, weight_type): # <<<<<<<<<<<<<< @@ -6028,7 +6034,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_12One(CYTHON_UNUSED PyTypeObject *_ return __pyx_r; } -/* "pywrapfst.pyx":409 +/* "pywrapfst.pyx":410 * * @classmethod * def NoWeight(cls, weight_type): # <<<<<<<<<<<<<< @@ -6056,7 +6062,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_14NoWeight(CYTHON_UNUSED PyTypeObje PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("NoWeight", 0); - /* "pywrapfst.pyx":415 + /* "pywrapfst.pyx":416 * Constructs a non-member weight in the semiring. * """ * return _NoWeight(weight_type) # <<<<<<<<<<<<<< @@ -6064,13 +6070,13 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_14NoWeight(CYTHON_UNUSED PyTypeObje * def __eq__(Weight w1, Weight w2): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__NoWeight(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__NoWeight(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":409 + /* "pywrapfst.pyx":410 * * @classmethod * def NoWeight(cls, weight_type): # <<<<<<<<<<<<<< @@ -6089,7 +6095,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_14NoWeight(CYTHON_UNUSED PyTypeObje return __pyx_r; } -/* "pywrapfst.pyx":417 +/* "pywrapfst.pyx":418 * return _NoWeight(weight_type) * * def __eq__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -6103,7 +6109,7 @@ static PyObject *__pyx_pw_9pywrapfst_6Weight_17__eq__(PyObject *__pyx_v_w1, PyOb PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 417, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 418, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_6Weight_16__eq__(((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w1), ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w2)); /* function exit code */ @@ -6121,7 +6127,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_16__eq__(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__eq__", 0); - /* "pywrapfst.pyx":418 + /* "pywrapfst.pyx":419 * * def __eq__(Weight w1, Weight w2): * return fst.Eq(deref(w1._weight), deref(w2._weight)) # <<<<<<<<<<<<<< @@ -6131,19 +6137,19 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_16__eq__(struct __pyx_obj_9pywrapfs __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_w1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 418, __pyx_L1_error) + __PYX_ERR(0, 419, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_w2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 418, __pyx_L1_error) + __PYX_ERR(0, 419, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBool_FromLong(operator==((*__pyx_v_w1->_weight), (*__pyx_v_w2->_weight))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(operator==((*__pyx_v_w1->_weight), (*__pyx_v_w2->_weight))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":417 + /* "pywrapfst.pyx":418 * return _NoWeight(weight_type) * * def __eq__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -6162,7 +6168,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_16__eq__(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":420 +/* "pywrapfst.pyx":421 * return fst.Eq(deref(w1._weight), deref(w2._weight)) * * def __ne__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -6176,7 +6182,7 @@ static PyObject *__pyx_pw_9pywrapfst_6Weight_19__ne__(PyObject *__pyx_v_w1, PyOb PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 420, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 421, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_6Weight_18__ne__(((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w1), ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w2)); /* function exit code */ @@ -6195,7 +6201,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_18__ne__(struct __pyx_obj_9pywrapfs int __pyx_t_2; __Pyx_RefNannySetupContext("__ne__", 0); - /* "pywrapfst.pyx":421 + /* "pywrapfst.pyx":422 * * def __ne__(Weight w1, Weight w2): * return not w1 == w2 # <<<<<<<<<<<<<< @@ -6203,16 +6209,16 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_18__ne__(struct __pyx_obj_9pywrapfs * cpdef string to_string(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_w1), ((PyObject *)__pyx_v_w2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_w1), ((PyObject *)__pyx_v_w2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":420 + /* "pywrapfst.pyx":421 * return fst.Eq(deref(w1._weight), deref(w2._weight)) * * def __ne__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -6231,7 +6237,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_18__ne__(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":423 +/* "pywrapfst.pyx":424 * return not w1 == w2 * * cpdef string to_string(self): # <<<<<<<<<<<<<< @@ -6253,13 +6259,12 @@ static std::string __pyx_f_9pywrapfst_6Weight_to_string(struct __pyx_obj_9pywrap if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_21to_string)) { __Pyx_INCREF(__pyx_t_1); @@ -6275,29 +6280,29 @@ static std::string __pyx_f_9pywrapfst_6Weight_to_string(struct __pyx_obj_9pywrap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":424 + /* "pywrapfst.pyx":425 * * cpdef string to_string(self): * return self._weight.get().ToString() # <<<<<<<<<<<<<< @@ -6306,12 +6311,12 @@ static std::string __pyx_f_9pywrapfst_6Weight_to_string(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 424, __pyx_L1_error) + __PYX_ERR(0, 425, __pyx_L1_error) } __pyx_r = __pyx_v_self->_weight.get()->ToString(); goto __pyx_L0; - /* "pywrapfst.pyx":423 + /* "pywrapfst.pyx":424 * return not w1 == w2 * * cpdef string to_string(self): # <<<<<<<<<<<<<< @@ -6351,7 +6356,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_20to_string(struct __pyx_obj_9pywra PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("to_string", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_to_string(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_to_string(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6368,7 +6373,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_20to_string(struct __pyx_obj_9pywra return __pyx_r; } -/* "pywrapfst.pyx":426 +/* "pywrapfst.pyx":427 * return self._weight.get().ToString() * * cpdef string type(self): # <<<<<<<<<<<<<< @@ -6390,13 +6395,12 @@ static std::string __pyx_f_9pywrapfst_6Weight_type(struct __pyx_obj_9pywrapfst_W if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_23type)) { __Pyx_INCREF(__pyx_t_1); @@ -6412,29 +6416,29 @@ static std::string __pyx_f_9pywrapfst_6Weight_type(struct __pyx_obj_9pywrapfst_W } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":431 + /* "pywrapfst.pyx":432 * Returns a string indicating the weight type. * """ * return self._weight.get().Type() # <<<<<<<<<<<<<< @@ -6443,12 +6447,12 @@ static std::string __pyx_f_9pywrapfst_6Weight_type(struct __pyx_obj_9pywrapfst_W */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 431, __pyx_L1_error) + __PYX_ERR(0, 432, __pyx_L1_error) } __pyx_r = __pyx_v_self->_weight.get()->Type(); goto __pyx_L0; - /* "pywrapfst.pyx":426 + /* "pywrapfst.pyx":427 * return self._weight.get().ToString() * * cpdef string type(self): # <<<<<<<<<<<<<< @@ -6489,7 +6493,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_22type(struct __pyx_obj_9pywrapfst_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6506,7 +6510,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_22type(struct __pyx_obj_9pywrapfst_ return __pyx_r; } -/* "pywrapfst.pyx":433 +/* "pywrapfst.pyx":434 * return self._weight.get().Type() * * cpdef bool member(self): # <<<<<<<<<<<<<< @@ -6528,13 +6532,12 @@ static bool __pyx_f_9pywrapfst_6Weight_member(struct __pyx_obj_9pywrapfst_Weight if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_25member)) { __Pyx_INCREF(__pyx_t_1); @@ -6550,29 +6553,29 @@ static bool __pyx_f_9pywrapfst_6Weight_member(struct __pyx_obj_9pywrapfst_Weight } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":434 + /* "pywrapfst.pyx":435 * * cpdef bool member(self): * return self._weight.get().Member() # <<<<<<<<<<<<<< @@ -6581,12 +6584,12 @@ static bool __pyx_f_9pywrapfst_6Weight_member(struct __pyx_obj_9pywrapfst_Weight */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 434, __pyx_L1_error) + __PYX_ERR(0, 435, __pyx_L1_error) } __pyx_r = __pyx_v_self->_weight.get()->Member(); goto __pyx_L0; - /* "pywrapfst.pyx":433 + /* "pywrapfst.pyx":434 * return self._weight.get().Type() * * cpdef bool member(self): # <<<<<<<<<<<<<< @@ -6626,7 +6629,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_24member(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("member", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_6Weight_member(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_6Weight_member(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6750,7 +6753,7 @@ static PyObject *__pyx_pf_9pywrapfst_6Weight_28__setstate_cython__(CYTHON_UNUSED return __pyx_r; } -/* "pywrapfst.pyx":437 +/* "pywrapfst.pyx":438 * * * cdef Weight _plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -6765,19 +6768,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__plus(struct __pyx PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_plus", 0); - /* "pywrapfst.pyx":438 + /* "pywrapfst.pyx":439 * * cdef Weight _plus(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), * deref(rhs._weight)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":439 + /* "pywrapfst.pyx":440 * cdef Weight _plus(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -6786,14 +6789,14 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__plus(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 439, __pyx_L1_error) + __PYX_ERR(0, 440, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 439, __pyx_L1_error) + __PYX_ERR(0, 440, __pyx_L1_error) } - /* "pywrapfst.pyx":440 + /* "pywrapfst.pyx":441 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), * deref(rhs._weight)))) # <<<<<<<<<<<<<< @@ -6802,10 +6805,10 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__plus(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 440, __pyx_L1_error) + __PYX_ERR(0, 441, __pyx_L1_error) } - /* "pywrapfst.pyx":439 + /* "pywrapfst.pyx":440 * cdef Weight _plus(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -6814,7 +6817,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__plus(struct __pyx */ __pyx_v_result->_weight.reset(new fst::script::WeightClass(fst::script::Plus((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight)))); - /* "pywrapfst.pyx":441 + /* "pywrapfst.pyx":442 * result._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), * deref(rhs._weight)))) * return result # <<<<<<<<<<<<<< @@ -6826,7 +6829,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__plus(struct __pyx __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":437 + /* "pywrapfst.pyx":438 * * * cdef Weight _plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -6846,7 +6849,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__plus(struct __pyx return __pyx_r; } -/* "pywrapfst.pyx":444 +/* "pywrapfst.pyx":445 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -6887,11 +6890,11 @@ static PyObject *__pyx_pw_9pywrapfst_1plus(PyObject *__pyx_self, PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, 1); __PYX_ERR(0, 444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, 1); __PYX_ERR(0, 445, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "plus") < 0)) __PYX_ERR(0, 444, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "plus") < 0)) __PYX_ERR(0, 445, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6904,14 +6907,14 @@ static PyObject *__pyx_pw_9pywrapfst_1plus(PyObject *__pyx_self, PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 445, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.plus", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 444, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 444, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 445, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 445, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_plus(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -6930,19 +6933,19 @@ static PyObject *__pyx_pf_9pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, st PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("plus", 0); - /* "pywrapfst.pyx":464 + /* "pywrapfst.pyx":465 * FstBadWeightError: invalid weight. * """ * cdef Weight result = _plus(lhs, rhs) # <<<<<<<<<<<<<< * result._check_weight() * return result */ - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__plus(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__plus(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":465 + /* "pywrapfst.pyx":466 * """ * cdef Weight result = _plus(lhs, rhs) * result._check_weight() # <<<<<<<<<<<<<< @@ -6951,11 +6954,11 @@ static PyObject *__pyx_pf_9pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, st */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 465, __pyx_L1_error) + __PYX_ERR(0, 466, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 466, __pyx_L1_error) - /* "pywrapfst.pyx":466 + /* "pywrapfst.pyx":467 * cdef Weight result = _plus(lhs, rhs) * result._check_weight() * return result # <<<<<<<<<<<<<< @@ -6967,7 +6970,7 @@ static PyObject *__pyx_pf_9pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, st __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "pywrapfst.pyx":444 + /* "pywrapfst.pyx":445 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -6987,7 +6990,7 @@ static PyObject *__pyx_pf_9pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, st return __pyx_r; } -/* "pywrapfst.pyx":469 +/* "pywrapfst.pyx":470 * * * cdef Weight _times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7002,19 +7005,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__times(struct __py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_times", 0); - /* "pywrapfst.pyx":470 + /* "pywrapfst.pyx":471 * * cdef Weight _times(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), * deref(rhs._weight)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":471 + /* "pywrapfst.pyx":472 * cdef Weight _times(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -7023,14 +7026,14 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__times(struct __py */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 471, __pyx_L1_error) + __PYX_ERR(0, 472, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 471, __pyx_L1_error) + __PYX_ERR(0, 472, __pyx_L1_error) } - /* "pywrapfst.pyx":472 + /* "pywrapfst.pyx":473 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), * deref(rhs._weight)))) # <<<<<<<<<<<<<< @@ -7039,10 +7042,10 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__times(struct __py */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 472, __pyx_L1_error) + __PYX_ERR(0, 473, __pyx_L1_error) } - /* "pywrapfst.pyx":471 + /* "pywrapfst.pyx":472 * cdef Weight _times(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -7051,7 +7054,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__times(struct __py */ __pyx_v_result->_weight.reset(new fst::script::WeightClass(fst::script::Times((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight)))); - /* "pywrapfst.pyx":473 + /* "pywrapfst.pyx":474 * result._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), * deref(rhs._weight)))) * return result # <<<<<<<<<<<<<< @@ -7063,7 +7066,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__times(struct __py __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":469 + /* "pywrapfst.pyx":470 * * * cdef Weight _times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7083,7 +7086,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__times(struct __py return __pyx_r; } -/* "pywrapfst.pyx":476 +/* "pywrapfst.pyx":477 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7124,11 +7127,11 @@ static PyObject *__pyx_pw_9pywrapfst_3times(PyObject *__pyx_self, PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, 1); __PYX_ERR(0, 476, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, 1); __PYX_ERR(0, 477, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "times") < 0)) __PYX_ERR(0, 476, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "times") < 0)) __PYX_ERR(0, 477, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7141,14 +7144,14 @@ static PyObject *__pyx_pw_9pywrapfst_3times(PyObject *__pyx_self, PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 476, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 477, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.times", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 476, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 476, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 477, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 477, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_2times(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -7167,19 +7170,19 @@ static PyObject *__pyx_pf_9pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("times", 0); - /* "pywrapfst.pyx":496 + /* "pywrapfst.pyx":497 * FstBadWeightError: Invalid weight. * """ * cdef Weight result = _times(lhs, rhs) # <<<<<<<<<<<<<< * result._check_weight() * return result */ - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__times(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__times(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":497 + /* "pywrapfst.pyx":498 * """ * cdef Weight result = _times(lhs, rhs) * result._check_weight() # <<<<<<<<<<<<<< @@ -7188,11 +7191,11 @@ static PyObject *__pyx_pf_9pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self, */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 497, __pyx_L1_error) + __PYX_ERR(0, 498, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error) - /* "pywrapfst.pyx":498 + /* "pywrapfst.pyx":499 * cdef Weight result = _times(lhs, rhs) * result._check_weight() * return result # <<<<<<<<<<<<<< @@ -7204,7 +7207,7 @@ static PyObject *__pyx_pf_9pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self, __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "pywrapfst.pyx":476 + /* "pywrapfst.pyx":477 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7224,7 +7227,7 @@ static PyObject *__pyx_pf_9pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "pywrapfst.pyx":501 +/* "pywrapfst.pyx":502 * * * cdef Weight _divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7239,19 +7242,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__divide(struct __p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_divide", 0); - /* "pywrapfst.pyx":502 + /* "pywrapfst.pyx":503 * * cdef Weight _divide(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), * deref(rhs._weight)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":503 + /* "pywrapfst.pyx":504 * cdef Weight _divide(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -7260,14 +7263,14 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__divide(struct __p */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 503, __pyx_L1_error) + __PYX_ERR(0, 504, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 503, __pyx_L1_error) + __PYX_ERR(0, 504, __pyx_L1_error) } - /* "pywrapfst.pyx":504 + /* "pywrapfst.pyx":505 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), * deref(rhs._weight)))) # <<<<<<<<<<<<<< @@ -7276,10 +7279,10 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__divide(struct __p */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 504, __pyx_L1_error) + __PYX_ERR(0, 505, __pyx_L1_error) } - /* "pywrapfst.pyx":503 + /* "pywrapfst.pyx":504 * cdef Weight _divide(Weight lhs, Weight rhs): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -7288,7 +7291,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__divide(struct __p */ __pyx_v_result->_weight.reset(new fst::script::WeightClass(fst::script::Divide((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight)))); - /* "pywrapfst.pyx":505 + /* "pywrapfst.pyx":506 * result._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), * deref(rhs._weight)))) * return result # <<<<<<<<<<<<<< @@ -7300,7 +7303,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__divide(struct __p __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":501 + /* "pywrapfst.pyx":502 * * * cdef Weight _divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7320,7 +7323,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__divide(struct __p return __pyx_r; } -/* "pywrapfst.pyx":508 +/* "pywrapfst.pyx":509 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7361,11 +7364,11 @@ static PyObject *__pyx_pw_9pywrapfst_5divide(PyObject *__pyx_self, PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, 1); __PYX_ERR(0, 508, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, 1); __PYX_ERR(0, 509, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "divide") < 0)) __PYX_ERR(0, 508, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "divide") < 0)) __PYX_ERR(0, 509, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7378,14 +7381,14 @@ static PyObject *__pyx_pw_9pywrapfst_5divide(PyObject *__pyx_self, PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 508, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 509, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.divide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 508, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 508, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 509, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 509, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_4divide(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -7404,19 +7407,19 @@ static PyObject *__pyx_pf_9pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("divide", 0); - /* "pywrapfst.pyx":530 + /* "pywrapfst.pyx":531 * FstBadWeightError: Invalid weight. * """ * cdef Weight result = _divide(lhs, rhs) # <<<<<<<<<<<<<< * result._check_weight() * return result */ - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__divide(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__divide(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":531 + /* "pywrapfst.pyx":532 * """ * cdef Weight result = _divide(lhs, rhs) * result._check_weight() # <<<<<<<<<<<<<< @@ -7425,11 +7428,11 @@ static PyObject *__pyx_pf_9pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_self, */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 531, __pyx_L1_error) + __PYX_ERR(0, 532, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 531, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error) - /* "pywrapfst.pyx":532 + /* "pywrapfst.pyx":533 * cdef Weight result = _divide(lhs, rhs) * result._check_weight() * return result # <<<<<<<<<<<<<< @@ -7441,7 +7444,7 @@ static PyObject *__pyx_pf_9pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_self, __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "pywrapfst.pyx":508 + /* "pywrapfst.pyx":509 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -7461,7 +7464,7 @@ static PyObject *__pyx_pf_9pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "pywrapfst.pyx":535 +/* "pywrapfst.pyx":536 * * * cdef Weight _power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -7476,19 +7479,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__power(struct __py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_power", 0); - /* "pywrapfst.pyx":536 + /* "pywrapfst.pyx":537 * * cdef Weight _power(Weight w, size_t n): * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n))) * return result */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":537 + /* "pywrapfst.pyx":538 * cdef Weight _power(Weight w, size_t n): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n))) # <<<<<<<<<<<<<< @@ -7497,15 +7500,15 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__power(struct __py */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 537, __pyx_L1_error) + __PYX_ERR(0, 538, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_w) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 537, __pyx_L1_error) + __PYX_ERR(0, 538, __pyx_L1_error) } __pyx_v_result->_weight.reset(new fst::script::WeightClass(fst::script::Power((*__pyx_v_w->_weight), __pyx_v_n))); - /* "pywrapfst.pyx":538 + /* "pywrapfst.pyx":539 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n))) * return result # <<<<<<<<<<<<<< @@ -7517,7 +7520,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__power(struct __py __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":535 + /* "pywrapfst.pyx":536 * * * cdef Weight _power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -7537,7 +7540,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__power(struct __py return __pyx_r; } -/* "pywrapfst.pyx":541 +/* "pywrapfst.pyx":542 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -7578,11 +7581,11 @@ static PyObject *__pyx_pw_9pywrapfst_7power(PyObject *__pyx_self, PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, 1); __PYX_ERR(0, 541, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, 1); __PYX_ERR(0, 542, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "power") < 0)) __PYX_ERR(0, 541, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "power") < 0)) __PYX_ERR(0, 542, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7591,17 +7594,17 @@ static PyObject *__pyx_pw_9pywrapfst_7power(PyObject *__pyx_self, PyObject *__py values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_w = ((struct __pyx_obj_9pywrapfst_Weight *)values[0]); - __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 541, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 542, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.power", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_9pywrapfst_Weight, 1, "w", 0))) __PYX_ERR(0, 541, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_9pywrapfst_Weight, 1, "w", 0))) __PYX_ERR(0, 542, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_6power(__pyx_self, __pyx_v_w, __pyx_v_n); /* function exit code */ @@ -7620,19 +7623,19 @@ static PyObject *__pyx_pf_9pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("power", 0); - /* "pywrapfst.pyx":558 + /* "pywrapfst.pyx":559 * FstBadWeightError: Invalid weight. * """ * cdef Weight result = _power(w, n) # <<<<<<<<<<<<<< * result._check_weight() * return result */ - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__power(__pyx_v_w, __pyx_v_n)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__power(__pyx_v_w, __pyx_v_n)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":559 + /* "pywrapfst.pyx":560 * """ * cdef Weight result = _power(w, n) * result._check_weight() # <<<<<<<<<<<<<< @@ -7641,11 +7644,11 @@ static PyObject *__pyx_pf_9pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self, */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 559, __pyx_L1_error) + __PYX_ERR(0, 560, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 559, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_result->__pyx_vtab)->_check_weight(__pyx_v_result); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 560, __pyx_L1_error) - /* "pywrapfst.pyx":560 + /* "pywrapfst.pyx":561 * cdef Weight result = _power(w, n) * result._check_weight() * return result # <<<<<<<<<<<<<< @@ -7657,7 +7660,7 @@ static PyObject *__pyx_pf_9pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self, __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "pywrapfst.pyx":541 + /* "pywrapfst.pyx":542 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -7677,7 +7680,7 @@ static PyObject *__pyx_pf_9pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "pywrapfst.pyx":563 +/* "pywrapfst.pyx":564 * * * cdef fst.WeightClass _get_WeightClass_or_Zero(const string &weight_type, # <<<<<<<<<<<<<< @@ -7698,7 +7701,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_get_WeightClass_or_Zero", 0); - /* "pywrapfst.pyx":581 + /* "pywrapfst.pyx":582 * """ * cdef fst.WeightClass result * if weight is None: # <<<<<<<<<<<<<< @@ -7709,7 +7712,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pywrapfst.pyx":582 + /* "pywrapfst.pyx":583 * cdef fst.WeightClass result * if weight is None: * result = fst.WeightClass.Zero(weight_type) # <<<<<<<<<<<<<< @@ -7718,7 +7721,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: */ __pyx_v_result = fst::script::WeightClass::Zero(__pyx_v_weight_type); - /* "pywrapfst.pyx":581 + /* "pywrapfst.pyx":582 * """ * cdef fst.WeightClass result * if weight is None: # <<<<<<<<<<<<<< @@ -7728,7 +7731,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: goto __pyx_L3; } - /* "pywrapfst.pyx":583 + /* "pywrapfst.pyx":584 * if weight is None: * result = fst.WeightClass.Zero(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -7739,7 +7742,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pywrapfst.pyx":584 + /* "pywrapfst.pyx":585 * result = fst.WeightClass.Zero(weight_type) * elif isinstance(weight, Weight): * result = deref( ( weight)._weight.get()) # <<<<<<<<<<<<<< @@ -7748,11 +7751,11 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: */ if (unlikely(__pyx_v_weight == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 584, __pyx_L1_error) + __PYX_ERR(0, 585, __pyx_L1_error) } __pyx_v_result = (*((fst::script::WeightClass *)((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_weight)->_weight.get())); - /* "pywrapfst.pyx":583 + /* "pywrapfst.pyx":584 * if weight is None: * result = fst.WeightClass.Zero(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -7762,7 +7765,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: goto __pyx_L3; } - /* "pywrapfst.pyx":586 + /* "pywrapfst.pyx":587 * result = deref( ( weight)._weight.get()) * else: * result = fst.WeightClass(weight_type, weight_tostring(weight)) # <<<<<<<<<<<<<< @@ -7770,10 +7773,10 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: * raise FstBadWeightError(weight_tostring(weight)) */ /*else*/ { - __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 587, __pyx_L1_error) __pyx_v_result = fst::script::WeightClass(__pyx_v_weight_type, __pyx_t_3); - /* "pywrapfst.pyx":587 + /* "pywrapfst.pyx":588 * else: * result = fst.WeightClass(weight_type, weight_tostring(weight)) * if not result.Member(): # <<<<<<<<<<<<<< @@ -7783,17 +7786,17 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: __pyx_t_1 = ((!(__pyx_v_result.Member() != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":588 + /* "pywrapfst.pyx":589 * result = fst.WeightClass(weight_type, weight_tostring(weight)) * if not result.Member(): * raise FstBadWeightError(weight_tostring(weight)) # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L1_error) - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 589, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -7808,14 +7811,14 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 588, __pyx_L1_error) + __PYX_ERR(0, 589, __pyx_L1_error) - /* "pywrapfst.pyx":587 + /* "pywrapfst.pyx":588 * else: * result = fst.WeightClass(weight_type, weight_tostring(weight)) * if not result.Member(): # <<<<<<<<<<<<<< @@ -7826,7 +7829,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: } __pyx_L3:; - /* "pywrapfst.pyx":589 + /* "pywrapfst.pyx":590 * if not result.Member(): * raise FstBadWeightError(weight_tostring(weight)) * return result # <<<<<<<<<<<<<< @@ -7836,7 +7839,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":563 + /* "pywrapfst.pyx":564 * * * cdef fst.WeightClass _get_WeightClass_or_Zero(const string &weight_type, # <<<<<<<<<<<<<< @@ -7857,7 +7860,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_Zero(std: return __pyx_r; } -/* "pywrapfst.pyx":592 +/* "pywrapfst.pyx":593 * * * cdef fst.WeightClass _get_WeightClass_or_One(const string &weight_type, # <<<<<<<<<<<<<< @@ -7878,7 +7881,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_get_WeightClass_or_One", 0); - /* "pywrapfst.pyx":610 + /* "pywrapfst.pyx":611 * """ * cdef fst.WeightClass result * if weight is None: # <<<<<<<<<<<<<< @@ -7889,7 +7892,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pywrapfst.pyx":611 + /* "pywrapfst.pyx":612 * cdef fst.WeightClass result * if weight is None: * result = fst.WeightClass.One(weight_type) # <<<<<<<<<<<<<< @@ -7898,7 +7901,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: */ __pyx_v_result = fst::script::WeightClass::One(__pyx_v_weight_type); - /* "pywrapfst.pyx":610 + /* "pywrapfst.pyx":611 * """ * cdef fst.WeightClass result * if weight is None: # <<<<<<<<<<<<<< @@ -7908,7 +7911,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: goto __pyx_L3; } - /* "pywrapfst.pyx":612 + /* "pywrapfst.pyx":613 * if weight is None: * result = fst.WeightClass.One(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -7919,7 +7922,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pywrapfst.pyx":613 + /* "pywrapfst.pyx":614 * result = fst.WeightClass.One(weight_type) * elif isinstance(weight, Weight): * result = deref( ( weight)._weight.get()) # <<<<<<<<<<<<<< @@ -7928,11 +7931,11 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: */ if (unlikely(__pyx_v_weight == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 613, __pyx_L1_error) + __PYX_ERR(0, 614, __pyx_L1_error) } __pyx_v_result = (*((fst::script::WeightClass *)((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_weight)->_weight.get())); - /* "pywrapfst.pyx":612 + /* "pywrapfst.pyx":613 * if weight is None: * result = fst.WeightClass.One(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -7942,7 +7945,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: goto __pyx_L3; } - /* "pywrapfst.pyx":615 + /* "pywrapfst.pyx":616 * result = deref( ( weight)._weight.get()) * else: * result = fst.WeightClass(weight_type, weight_tostring(weight)) # <<<<<<<<<<<<<< @@ -7950,10 +7953,10 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: * raise FstBadWeightError(weight_tostring(weight)) */ /*else*/ { - __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 616, __pyx_L1_error) __pyx_v_result = fst::script::WeightClass(__pyx_v_weight_type, __pyx_t_3); - /* "pywrapfst.pyx":616 + /* "pywrapfst.pyx":617 * else: * result = fst.WeightClass(weight_type, weight_tostring(weight)) * if not result.Member(): # <<<<<<<<<<<<<< @@ -7963,17 +7966,17 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: __pyx_t_1 = ((!(__pyx_v_result.Member() != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":617 + /* "pywrapfst.pyx":618 * result = fst.WeightClass(weight_type, weight_tostring(weight)) * if not result.Member(): * raise FstBadWeightError(weight_tostring(weight)) # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error) - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -7988,14 +7991,14 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 617, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) - /* "pywrapfst.pyx":616 + /* "pywrapfst.pyx":617 * else: * result = fst.WeightClass(weight_type, weight_tostring(weight)) * if not result.Member(): # <<<<<<<<<<<<<< @@ -8006,7 +8009,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: } __pyx_L3:; - /* "pywrapfst.pyx":618 + /* "pywrapfst.pyx":619 * if not result.Member(): * raise FstBadWeightError(weight_tostring(weight)) * return result # <<<<<<<<<<<<<< @@ -8016,7 +8019,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":592 + /* "pywrapfst.pyx":593 * * * cdef fst.WeightClass _get_WeightClass_or_One(const string &weight_type, # <<<<<<<<<<<<<< @@ -8037,7 +8040,7 @@ static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_One(std:: return __pyx_r; } -/* "pywrapfst.pyx":621 +/* "pywrapfst.pyx":622 * * * cdef Weight _Zero(weight_type): # <<<<<<<<<<<<<< @@ -8056,19 +8059,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_Zero", 0); - /* "pywrapfst.pyx":622 + /* "pywrapfst.pyx":623 * * cdef Weight _Zero(weight_type): * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass(fst.WeightClass.Zero( * tostring(weight_type)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":623 + /* "pywrapfst.pyx":624 * cdef Weight _Zero(weight_type): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.WeightClass.Zero( # <<<<<<<<<<<<<< @@ -8077,19 +8080,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 623, __pyx_L1_error) + __PYX_ERR(0, 624, __pyx_L1_error) } - /* "pywrapfst.pyx":624 + /* "pywrapfst.pyx":625 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.WeightClass.Zero( * tostring(weight_type)))) # <<<<<<<<<<<<<< * if result._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") */ - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L1_error) - /* "pywrapfst.pyx":623 + /* "pywrapfst.pyx":624 * cdef Weight _Zero(weight_type): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass(fst.WeightClass.Zero( # <<<<<<<<<<<<<< @@ -8098,7 +8101,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ */ __pyx_v_result->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::Zero(__pyx_t_2))); - /* "pywrapfst.pyx":625 + /* "pywrapfst.pyx":626 * result._weight.reset(new fst.WeightClass(fst.WeightClass.Zero( * tostring(weight_type)))) * if result._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -8107,19 +8110,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 625, __pyx_L1_error) + __PYX_ERR(0, 626, __pyx_L1_error) } __pyx_t_3 = ((__pyx_v_result->_weight.get()->Type() == ((char const *)"none")) != 0); if (unlikely(__pyx_t_3)) { - /* "pywrapfst.pyx":626 + /* "pywrapfst.pyx":627 * tostring(weight_type)))) * if result._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -8133,14 +8136,14 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Weight_type_not_found) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Weight_type_not_found); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 626, __pyx_L1_error) + __PYX_ERR(0, 627, __pyx_L1_error) - /* "pywrapfst.pyx":625 + /* "pywrapfst.pyx":626 * result._weight.reset(new fst.WeightClass(fst.WeightClass.Zero( * tostring(weight_type)))) * if result._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -8149,7 +8152,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ */ } - /* "pywrapfst.pyx":627 + /* "pywrapfst.pyx":628 * if result._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") * return result # <<<<<<<<<<<<<< @@ -8161,7 +8164,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":621 + /* "pywrapfst.pyx":622 * * * cdef Weight _Zero(weight_type): # <<<<<<<<<<<<<< @@ -8183,7 +8186,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__Zero(PyObject *__ return __pyx_r; } -/* "pywrapfst.pyx":630 +/* "pywrapfst.pyx":631 * * * cdef Weight _One(weight_type): # <<<<<<<<<<<<<< @@ -8202,19 +8205,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_One", 0); - /* "pywrapfst.pyx":631 + /* "pywrapfst.pyx":632 * * cdef Weight _One(weight_type): * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass( * fst.WeightClass.One(tostring(weight_type)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":632 + /* "pywrapfst.pyx":633 * cdef Weight _One(weight_type): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass( # <<<<<<<<<<<<<< @@ -8223,19 +8226,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 632, __pyx_L1_error) + __PYX_ERR(0, 633, __pyx_L1_error) } - /* "pywrapfst.pyx":633 + /* "pywrapfst.pyx":634 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass( * fst.WeightClass.One(tostring(weight_type)))) # <<<<<<<<<<<<<< * if result._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") */ - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L1_error) - /* "pywrapfst.pyx":632 + /* "pywrapfst.pyx":633 * cdef Weight _One(weight_type): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass( # <<<<<<<<<<<<<< @@ -8244,7 +8247,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p */ __pyx_v_result->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::One(__pyx_t_2))); - /* "pywrapfst.pyx":634 + /* "pywrapfst.pyx":635 * result._weight.reset(new fst.WeightClass( * fst.WeightClass.One(tostring(weight_type)))) * if result._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -8253,19 +8256,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 634, __pyx_L1_error) + __PYX_ERR(0, 635, __pyx_L1_error) } __pyx_t_3 = ((__pyx_v_result->_weight.get()->Type() == ((char const *)"none")) != 0); if (unlikely(__pyx_t_3)) { - /* "pywrapfst.pyx":635 + /* "pywrapfst.pyx":636 * fst.WeightClass.One(tostring(weight_type)))) * if result._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -8279,14 +8282,14 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Weight_type_not_found) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Weight_type_not_found); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 635, __pyx_L1_error) + __PYX_ERR(0, 636, __pyx_L1_error) - /* "pywrapfst.pyx":634 + /* "pywrapfst.pyx":635 * result._weight.reset(new fst.WeightClass( * fst.WeightClass.One(tostring(weight_type)))) * if result._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -8295,7 +8298,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p */ } - /* "pywrapfst.pyx":636 + /* "pywrapfst.pyx":637 * if result._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") * return result # <<<<<<<<<<<<<< @@ -8307,7 +8310,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":630 + /* "pywrapfst.pyx":631 * * * cdef Weight _One(weight_type): # <<<<<<<<<<<<<< @@ -8329,7 +8332,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__One(PyObject *__p return __pyx_r; } -/* "pywrapfst.pyx":639 +/* "pywrapfst.pyx":640 * * * cdef Weight _NoWeight(weight_type): # <<<<<<<<<<<<<< @@ -8345,19 +8348,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__NoWeight(PyObject std::string __pyx_t_2; __Pyx_RefNannySetupContext("_NoWeight", 0); - /* "pywrapfst.pyx":640 + /* "pywrapfst.pyx":641 * * cdef Weight _NoWeight(weight_type): * cdef Weight result = Weight.__new__(Weight) # <<<<<<<<<<<<<< * result._weight.reset(new fst.WeightClass( * fst.WeightClass.NoWeight(tostring(weight_type)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":641 + /* "pywrapfst.pyx":642 * cdef Weight _NoWeight(weight_type): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass( # <<<<<<<<<<<<<< @@ -8366,19 +8369,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__NoWeight(PyObject */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 641, __pyx_L1_error) + __PYX_ERR(0, 642, __pyx_L1_error) } - /* "pywrapfst.pyx":642 + /* "pywrapfst.pyx":643 * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass( * fst.WeightClass.NoWeight(tostring(weight_type)))) # <<<<<<<<<<<<<< * return result * */ - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L1_error) - /* "pywrapfst.pyx":641 + /* "pywrapfst.pyx":642 * cdef Weight _NoWeight(weight_type): * cdef Weight result = Weight.__new__(Weight) * result._weight.reset(new fst.WeightClass( # <<<<<<<<<<<<<< @@ -8387,7 +8390,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__NoWeight(PyObject */ __pyx_v_result->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::NoWeight(__pyx_t_2))); - /* "pywrapfst.pyx":643 + /* "pywrapfst.pyx":644 * result._weight.reset(new fst.WeightClass( * fst.WeightClass.NoWeight(tostring(weight_type)))) * return result # <<<<<<<<<<<<<< @@ -8399,7 +8402,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__NoWeight(PyObject __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":639 + /* "pywrapfst.pyx":640 * * * cdef Weight _NoWeight(weight_type): # <<<<<<<<<<<<<< @@ -8419,7 +8422,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst__NoWeight(PyObject return __pyx_r; } -/* "pywrapfst.pyx":677 +/* "pywrapfst.pyx":678 * # Doing so will allow undefined behavior. * * def __init__(self): # <<<<<<<<<<<<<< @@ -8454,28 +8457,28 @@ static int __pyx_pf_9pywrapfst_12_SymbolTable___init__(struct __pyx_obj_9pywrapf PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":678 + /* "pywrapfst.pyx":679 * * def __init__(self): * raise FstDeletedConstructorError( # <<<<<<<<<<<<<< * "Cannot construct {}".format(self.__class__.__name__)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":679 + /* "pywrapfst.pyx":680 * def __init__(self): * raise FstDeletedConstructorError( * "Cannot construct {}".format(self.__class__.__name__)) # <<<<<<<<<<<<<< * * def __iter__(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -8491,7 +8494,7 @@ static int __pyx_pf_9pywrapfst_12_SymbolTable___init__(struct __pyx_obj_9pywrapf __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 679, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -8507,14 +8510,14 @@ static int __pyx_pf_9pywrapfst_12_SymbolTable___init__(struct __pyx_obj_9pywrapf __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 678, __pyx_L1_error) + __PYX_ERR(0, 679, __pyx_L1_error) - /* "pywrapfst.pyx":677 + /* "pywrapfst.pyx":678 * # Doing so will allow undefined behavior. * * def __init__(self): # <<<<<<<<<<<<<< @@ -8536,7 +8539,7 @@ static int __pyx_pf_9pywrapfst_12_SymbolTable___init__(struct __pyx_obj_9pywrapf return __pyx_r; } -/* "pywrapfst.pyx":681 +/* "pywrapfst.pyx":682 * "Cannot construct {}".format(self.__class__.__name__)) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -8563,7 +8566,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_2__iter__(struct __pyx_obj_9 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - /* "pywrapfst.pyx":682 + /* "pywrapfst.pyx":683 * * def __iter__(self): * return SymbolTableIterator(self) # <<<<<<<<<<<<<< @@ -8571,13 +8574,13 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_2__iter__(struct __pyx_obj_9 * # Registers the class for pickling. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst_SymbolTableIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst_SymbolTableIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":681 + /* "pywrapfst.pyx":682 * "Cannot construct {}".format(self.__class__.__name__)) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -8596,7 +8599,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_2__iter__(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":686 +/* "pywrapfst.pyx":687 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -8625,7 +8628,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_4__reduce__(struct __pyx_obj PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "pywrapfst.pyx":687 + /* "pywrapfst.pyx":688 * * def __reduce__(self): * return (_read_SymbolTable_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<< @@ -8633,20 +8636,20 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_4__reduce__(struct __pyx_obj * cpdef int64 available_key(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_SymbolTable_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_SymbolTable_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string"); - __PYX_ERR(0, 687, __pyx_L1_error) + __PYX_ERR(0, 688, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst__SymbolTable *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst__SymbolTable *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -8658,7 +8661,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_4__reduce__(struct __pyx_obj __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":686 + /* "pywrapfst.pyx":687 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -8679,7 +8682,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_4__reduce__(struct __pyx_obj return __pyx_r; } -/* "pywrapfst.pyx":689 +/* "pywrapfst.pyx":690 * return (_read_SymbolTable_from_string, (self.write_to_string(),)) * * cpdef int64 available_key(self): # <<<<<<<<<<<<<< @@ -8701,13 +8704,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_12_SymbolTable_available_ke if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_available_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_available_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_7available_key)) { __Pyx_INCREF(__pyx_t_1); @@ -8723,29 +8725,29 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_12_SymbolTable_available_ke } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":695 + /* "pywrapfst.pyx":696 * Returns an integer indicating the next available key index in the table. * """ * return self._table.AvailableKey() # <<<<<<<<<<<<<< @@ -8754,12 +8756,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_12_SymbolTable_available_ke */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 695, __pyx_L1_error) + __PYX_ERR(0, 696, __pyx_L1_error) } __pyx_r = __pyx_v_self->_table->AvailableKey(); goto __pyx_L0; - /* "pywrapfst.pyx":689 + /* "pywrapfst.pyx":690 * return (_read_SymbolTable_from_string, (self.write_to_string(),)) * * cpdef int64 available_key(self): # <<<<<<<<<<<<<< @@ -8800,7 +8802,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_6available_key(struct __pyx_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("available_key", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_12_SymbolTable_available_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_12_SymbolTable_available_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -8817,7 +8819,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_6available_key(struct __pyx_ return __pyx_r; } -/* "pywrapfst.pyx":697 +/* "pywrapfst.pyx":698 * return self._table.AvailableKey() * * cpdef bytes checksum(self): # <<<<<<<<<<<<<< @@ -8838,13 +8840,12 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_checksum(struct __pyx_obj_9py if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_9checksum)) { __Pyx_XDECREF(__pyx_r); @@ -8861,29 +8862,29 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_checksum(struct __pyx_obj_9py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 697, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 698, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":703 + /* "pywrapfst.pyx":704 * Returns a bytestring indicating the label-independent MD5 checksum. * """ * return self._table.CheckSum() # <<<<<<<<<<<<<< @@ -8893,15 +8894,15 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_checksum(struct __pyx_obj_9py __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 703, __pyx_L1_error) + __PYX_ERR(0, 704, __pyx_L1_error) } - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->_table->CheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->_table->CheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":697 + /* "pywrapfst.pyx":698 * return self._table.AvailableKey() * * cpdef bytes checksum(self): # <<<<<<<<<<<<<< @@ -8943,7 +8944,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_8checksum(struct __pyx_obj_9 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("checksum", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -8960,7 +8961,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_8checksum(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":705 +/* "pywrapfst.pyx":706 * return self._table.CheckSum() * * cpdef SymbolTable copy(self): # <<<<<<<<<<<<<< @@ -8981,13 +8982,12 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_12_SymbolTabl if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_11copy)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -9004,29 +9004,29 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_12_SymbolTabl } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_SymbolTable))))) __PYX_ERR(0, 705, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_SymbolTable))))) __PYX_ERR(0, 706, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":711 + /* "pywrapfst.pyx":712 * Returns a mutable copy of the SymbolTable. * """ * return _init_SymbolTable(self._table.Copy()) # <<<<<<<<<<<<<< @@ -9036,15 +9036,15 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_12_SymbolTabl __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 711, __pyx_L1_error) + __PYX_ERR(0, 712, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_self->_table->Copy())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_self->_table->Copy())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":705 + /* "pywrapfst.pyx":706 * return self._table.CheckSum() * * cpdef SymbolTable copy(self): # <<<<<<<<<<<<<< @@ -9086,7 +9086,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_10copy(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12_SymbolTable_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12_SymbolTable_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9103,7 +9103,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_10copy(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":713 +/* "pywrapfst.pyx":714 * return _init_SymbolTable(self._table.Copy()) * * def find(self, key): # <<<<<<<<<<<<<< @@ -9140,7 +9140,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw __pyx_t_10basictypes_int64 __pyx_t_10; __Pyx_RefNannySetupContext("find", 0); - /* "pywrapfst.pyx":730 + /* "pywrapfst.pyx":731 * not found. * """ * try: # <<<<<<<<<<<<<< @@ -9156,7 +9156,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "pywrapfst.pyx":731 + /* "pywrapfst.pyx":732 * """ * try: * return self._table.FindIndex(tostring(key)) # <<<<<<<<<<<<<< @@ -9166,16 +9166,16 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 731, __pyx_L3_error) + __PYX_ERR(0, 732, __pyx_L3_error) } - __pyx_t_4 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error) - __pyx_t_5 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_table->Find(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L3_error) + __pyx_t_4 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 732, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_table->Find(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 732, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L7_try_return; - /* "pywrapfst.pyx":730 + /* "pywrapfst.pyx":731 * not found. * """ * try: # <<<<<<<<<<<<<< @@ -9186,7 +9186,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pywrapfst.pyx":732 + /* "pywrapfst.pyx":733 * try: * return self._table.FindIndex(tostring(key)) * except FstArgError: # <<<<<<<<<<<<<< @@ -9194,7 +9194,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw * */ __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 733, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_5, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -9202,12 +9202,12 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; if (__pyx_t_9) { __Pyx_AddTraceback("pywrapfst._SymbolTable.find", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 732, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 733, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); - /* "pywrapfst.pyx":733 + /* "pywrapfst.pyx":734 * return self._table.FindIndex(tostring(key)) * except FstArgError: * return self._table.FindSymbol(key) # <<<<<<<<<<<<<< @@ -9217,10 +9217,10 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 733, __pyx_L5_except_error) + __PYX_ERR(0, 734, __pyx_L5_except_error) } - __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L5_except_error) - __pyx_t_8 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_table->Find(__pyx_t_10)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 733, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 734, __pyx_L5_except_error) + __pyx_t_8 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_table->Find(__pyx_t_10)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 734, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; @@ -9232,7 +9232,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "pywrapfst.pyx":730 + /* "pywrapfst.pyx":731 * not found. * """ * try: # <<<<<<<<<<<<<< @@ -9258,7 +9258,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw goto __pyx_L0; } - /* "pywrapfst.pyx":713 + /* "pywrapfst.pyx":714 * return _init_SymbolTable(self._table.Copy()) * * def find(self, key): # <<<<<<<<<<<<<< @@ -9280,7 +9280,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_12find(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":735 +/* "pywrapfst.pyx":736 * return self._table.FindSymbol(key) * * cpdef int64 get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<< @@ -9303,16 +9303,15 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_12_SymbolTable_get_nth_key( if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nth_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nth_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_15get_nth_key)) { - __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -9328,29 +9327,29 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_12_SymbolTable_get_nth_key( __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":747 + /* "pywrapfst.pyx":748 * The integer index of the n-th key, or NO_LABEL if not found. * """ * return self._table.GetNthKey(pos) # <<<<<<<<<<<<<< @@ -9359,12 +9358,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_12_SymbolTable_get_nth_key( */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 747, __pyx_L1_error) + __PYX_ERR(0, 748, __pyx_L1_error) } __pyx_r = __pyx_v_self->_table->GetNthKey(__pyx_v_pos); goto __pyx_L0; - /* "pywrapfst.pyx":735 + /* "pywrapfst.pyx":736 * return self._table.FindSymbol(key) * * cpdef int64 get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<< @@ -9395,7 +9394,7 @@ static PyObject *__pyx_pw_9pywrapfst_12_SymbolTable_15get_nth_key(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_nth_key (wrapper)", 0); assert(__pyx_arg_pos); { - __pyx_v_pos = PyInt_AsSsize_t(__pyx_arg_pos); if (unlikely((__pyx_v_pos == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 735, __pyx_L3_error) + __pyx_v_pos = PyInt_AsSsize_t(__pyx_arg_pos); if (unlikely((__pyx_v_pos == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9417,8 +9416,8 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_14get_nth_key(struct __pyx_o PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_nth_key", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_get_nth_key(__pyx_v_self, __pyx_v_pos, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 735, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_get_nth_key(__pyx_v_self, __pyx_v_pos, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -9435,7 +9434,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_14get_nth_key(struct __pyx_o return __pyx_r; } -/* "pywrapfst.pyx":749 +/* "pywrapfst.pyx":750 * return self._table.GetNthKey(pos) * * cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<< @@ -9456,13 +9455,12 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_labeled_checksum(struct __pyx if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_labeled_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_labeled_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_17labeled_checksum)) { __Pyx_XDECREF(__pyx_r); @@ -9479,29 +9477,29 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_labeled_checksum(struct __pyx } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 749, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 750, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":755 + /* "pywrapfst.pyx":756 * Returns a bytestring indicating the label-dependent MD5 checksum. * """ * return self._table.LabeledCheckSum() # <<<<<<<<<<<<<< @@ -9511,15 +9509,15 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_labeled_checksum(struct __pyx __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 755, __pyx_L1_error) + __PYX_ERR(0, 756, __pyx_L1_error) } - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->_table->LabeledCheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->_table->LabeledCheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":749 + /* "pywrapfst.pyx":750 * return self._table.GetNthKey(pos) * * cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<< @@ -9561,7 +9559,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_16labeled_checksum(struct __ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("labeled_checksum", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_labeled_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_labeled_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9578,7 +9576,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_16labeled_checksum(struct __ return __pyx_r; } -/* "pywrapfst.pyx":757 +/* "pywrapfst.pyx":758 * return self._table.LabeledCheckSum() * * cpdef bool member(self, key): # <<<<<<<<<<<<<< @@ -9606,13 +9604,12 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_19member)) { __Pyx_INCREF(__pyx_t_1); @@ -9628,29 +9625,29 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":773 + /* "pywrapfst.pyx":774 * Whether or not the key is present (as a string or a index) in the table. * """ * try: # <<<<<<<<<<<<<< @@ -9666,7 +9663,7 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "pywrapfst.pyx":774 + /* "pywrapfst.pyx":775 * """ * try: * return self._table.MemberSymbol(tostring(key)) # <<<<<<<<<<<<<< @@ -9675,13 +9672,13 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 774, __pyx_L3_error) + __PYX_ERR(0, 775, __pyx_L3_error) } - __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L3_error) + __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L3_error) __pyx_r = __pyx_v_self->_table->Member(__pyx_t_9); goto __pyx_L7_try_return; - /* "pywrapfst.pyx":773 + /* "pywrapfst.pyx":774 * Whether or not the key is present (as a string or a index) in the table. * """ * try: # <<<<<<<<<<<<<< @@ -9690,12 +9687,12 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst */ } __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pywrapfst.pyx":775 + /* "pywrapfst.pyx":776 * try: * return self._table.MemberSymbol(tostring(key)) * except FstArgError: # <<<<<<<<<<<<<< @@ -9703,7 +9700,7 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst * */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 776, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -9711,12 +9708,12 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("pywrapfst._SymbolTable.member", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 775, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 776, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); - /* "pywrapfst.pyx":776 + /* "pywrapfst.pyx":777 * return self._table.MemberSymbol(tostring(key)) * except FstArgError: * return self._table.MemberIndex(key) # <<<<<<<<<<<<<< @@ -9725,9 +9722,9 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 776, __pyx_L5_except_error) + __PYX_ERR(0, 777, __pyx_L5_except_error) } - __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 776, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 777, __pyx_L5_except_error) __pyx_r = __pyx_v_self->_table->Member(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -9737,7 +9734,7 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "pywrapfst.pyx":773 + /* "pywrapfst.pyx":774 * Whether or not the key is present (as a string or a index) in the table. * """ * try: # <<<<<<<<<<<<<< @@ -9763,7 +9760,7 @@ static bool __pyx_f_9pywrapfst_12_SymbolTable_member(struct __pyx_obj_9pywrapfst goto __pyx_L0; } - /* "pywrapfst.pyx":757 + /* "pywrapfst.pyx":758 * return self._table.LabeledCheckSum() * * cpdef bool member(self, key): # <<<<<<<<<<<<<< @@ -9804,7 +9801,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_18member(struct __pyx_obj_9p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("member", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_12_SymbolTable_member(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_12_SymbolTable_member(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9821,7 +9818,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_18member(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":778 +/* "pywrapfst.pyx":779 * return self._table.MemberIndex(key) * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -9847,7 +9844,7 @@ static int __pyx_pf_9pywrapfst_12_SymbolTable_20__contains__(struct __pyx_obj_9p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__", 0); - /* "pywrapfst.pyx":779 + /* "pywrapfst.pyx":780 * * def __contains__(self, key): * return self.member(key) # <<<<<<<<<<<<<< @@ -9856,12 +9853,12 @@ static int __pyx_pf_9pywrapfst_12_SymbolTable_20__contains__(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "member"); - __PYX_ERR(0, 779, __pyx_L1_error) + __PYX_ERR(0, 780, __pyx_L1_error) } __pyx_r = ((struct __pyx_vtabstruct_9pywrapfst__SymbolTable *)__pyx_v_self->__pyx_vtab)->member(__pyx_v_self, __pyx_v_key, 0); goto __pyx_L0; - /* "pywrapfst.pyx":778 + /* "pywrapfst.pyx":779 * return self._table.MemberIndex(key) * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -9878,7 +9875,7 @@ static int __pyx_pf_9pywrapfst_12_SymbolTable_20__contains__(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":781 +/* "pywrapfst.pyx":782 * return self.member(key) * * cpdef string name(self): # <<<<<<<<<<<<<< @@ -9900,13 +9897,12 @@ static std::string __pyx_f_9pywrapfst_12_SymbolTable_name(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_23name)) { __Pyx_INCREF(__pyx_t_1); @@ -9922,29 +9918,29 @@ static std::string __pyx_f_9pywrapfst_12_SymbolTable_name(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":787 + /* "pywrapfst.pyx":788 * Returns the symbol table's name. * """ * return self._table.Name() # <<<<<<<<<<<<<< @@ -9953,12 +9949,12 @@ static std::string __pyx_f_9pywrapfst_12_SymbolTable_name(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 787, __pyx_L1_error) + __PYX_ERR(0, 788, __pyx_L1_error) } __pyx_r = __pyx_v_self->_table->Name(); goto __pyx_L0; - /* "pywrapfst.pyx":781 + /* "pywrapfst.pyx":782 * return self.member(key) * * cpdef string name(self): # <<<<<<<<<<<<<< @@ -9999,7 +9995,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_22name(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("name", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12_SymbolTable_name(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12_SymbolTable_name(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10016,7 +10012,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_22name(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":789 +/* "pywrapfst.pyx":790 * return self._table.Name() * * cpdef size_t num_symbols(self): # <<<<<<<<<<<<<< @@ -10038,13 +10034,12 @@ static size_t __pyx_f_9pywrapfst_12_SymbolTable_num_symbols(struct __pyx_obj_9py if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_25num_symbols)) { __Pyx_INCREF(__pyx_t_1); @@ -10060,29 +10055,29 @@ static size_t __pyx_f_9pywrapfst_12_SymbolTable_num_symbols(struct __pyx_obj_9py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 789, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":795 + /* "pywrapfst.pyx":796 * Returns the number of symbols in the symbol table. * """ * return self._table.NumSymbols() # <<<<<<<<<<<<<< @@ -10091,12 +10086,12 @@ static size_t __pyx_f_9pywrapfst_12_SymbolTable_num_symbols(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 795, __pyx_L1_error) + __PYX_ERR(0, 796, __pyx_L1_error) } __pyx_r = __pyx_v_self->_table->NumSymbols(); goto __pyx_L0; - /* "pywrapfst.pyx":789 + /* "pywrapfst.pyx":790 * return self._table.Name() * * cpdef size_t num_symbols(self): # <<<<<<<<<<<<<< @@ -10137,7 +10132,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_24num_symbols(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("num_symbols", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_12_SymbolTable_num_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_12_SymbolTable_num_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10154,7 +10149,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_24num_symbols(struct __pyx_o return __pyx_r; } -/* "pywrapfst.pyx":797 +/* "pywrapfst.pyx":798 * return self._table.NumSymbols() * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -10177,13 +10172,12 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write(struct __pyx_obj_9pywrapfst_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_27write)) { __Pyx_INCREF(__pyx_t_1); @@ -10199,27 +10193,27 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write(struct __pyx_obj_9pywrapfst_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":811 + /* "pywrapfst.pyx":812 * FstIOError: Write failed. * """ * if not self._table.Write(tostring(filename)): # <<<<<<<<<<<<<< @@ -10228,22 +10222,22 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 811, __pyx_L1_error) + __PYX_ERR(0, 812, __pyx_L1_error) } - __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L1_error) __pyx_t_6 = ((!(__pyx_v_self->_table->Write(__pyx_t_5) != 0)) != 0); if (unlikely(__pyx_t_6)) { - /* "pywrapfst.pyx":812 + /* "pywrapfst.pyx":813 * """ * if not self._table.Write(tostring(filename)): * raise FstIOError("Write failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * * cpdef void write_text(self, filename) except *: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -10257,7 +10251,7 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write(struct __pyx_obj_9pywrapfst_ } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 812, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -10273,14 +10267,14 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write(struct __pyx_obj_9pywrapfst_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 812, __pyx_L1_error) + __PYX_ERR(0, 813, __pyx_L1_error) - /* "pywrapfst.pyx":811 + /* "pywrapfst.pyx":812 * FstIOError: Write failed. * """ * if not self._table.Write(tostring(filename)): # <<<<<<<<<<<<<< @@ -10289,7 +10283,7 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write(struct __pyx_obj_9pywrapfst_ */ } - /* "pywrapfst.pyx":797 + /* "pywrapfst.pyx":798 * return self._table.NumSymbols() * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -10330,8 +10324,8 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_26write(struct __pyx_obj_9py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("write", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_9pywrapfst_12_SymbolTable_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_f_9pywrapfst_12_SymbolTable_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10348,7 +10342,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_26write(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":814 +/* "pywrapfst.pyx":815 * raise FstIOError("Write failed: {!r}".format(filename)) * * cpdef void write_text(self, filename) except *: # <<<<<<<<<<<<<< @@ -10371,13 +10365,12 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write_text(struct __pyx_obj_9pywra if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_29write_text)) { __Pyx_INCREF(__pyx_t_1); @@ -10393,27 +10386,27 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write_text(struct __pyx_obj_9pywra } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":828 + /* "pywrapfst.pyx":829 * FstIOError: Write failed. * """ * if not self._table.WriteText(tostring(filename)): # <<<<<<<<<<<<<< @@ -10422,22 +10415,22 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write_text(struct __pyx_obj_9pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 828, __pyx_L1_error) + __PYX_ERR(0, 829, __pyx_L1_error) } - __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L1_error) __pyx_t_6 = ((!(__pyx_v_self->_table->WriteText(__pyx_t_5) != 0)) != 0); if (unlikely(__pyx_t_6)) { - /* "pywrapfst.pyx":829 + /* "pywrapfst.pyx":830 * """ * if not self._table.WriteText(tostring(filename)): * raise FstIOError("Write failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * * cpdef bytes write_to_string(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -10451,7 +10444,7 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write_text(struct __pyx_obj_9pywra } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -10467,14 +10460,14 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write_text(struct __pyx_obj_9pywra __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 829, __pyx_L1_error) + __PYX_ERR(0, 830, __pyx_L1_error) - /* "pywrapfst.pyx":828 + /* "pywrapfst.pyx":829 * FstIOError: Write failed. * """ * if not self._table.WriteText(tostring(filename)): # <<<<<<<<<<<<<< @@ -10483,7 +10476,7 @@ static void __pyx_f_9pywrapfst_12_SymbolTable_write_text(struct __pyx_obj_9pywra */ } - /* "pywrapfst.pyx":814 + /* "pywrapfst.pyx":815 * raise FstIOError("Write failed: {!r}".format(filename)) * * cpdef void write_text(self, filename) except *: # <<<<<<<<<<<<<< @@ -10524,8 +10517,8 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_28write_text(struct __pyx_ob PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("write_text", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_9pywrapfst_12_SymbolTable_write_text(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 814, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error) + __pyx_f_9pywrapfst_12_SymbolTable_write_text(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10542,7 +10535,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_28write_text(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":831 +/* "pywrapfst.pyx":832 * raise FstIOError("Write failed: {!r}".format(filename)) * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -10565,13 +10558,12 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_write_to_string(struct __pyx_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_SymbolTable_31write_to_string)) { __Pyx_XDECREF(__pyx_r); @@ -10588,29 +10580,29 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_write_to_string(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 831, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 832, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":846 + /* "pywrapfst.pyx":847 * """ * cdef stringstream sstrm * if not self._table.Write(sstrm): # <<<<<<<<<<<<<< @@ -10619,19 +10611,19 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_write_to_string(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 846, __pyx_L1_error) + __PYX_ERR(0, 847, __pyx_L1_error) } __pyx_t_5 = ((!(__pyx_v_self->_table->Write(__pyx_v_sstrm) != 0)) != 0); if (unlikely(__pyx_t_5)) { - /* "pywrapfst.pyx":847 + /* "pywrapfst.pyx":848 * cdef stringstream sstrm * if not self._table.Write(sstrm): * raise FstIOError("Write to string failed") # <<<<<<<<<<<<<< * return sstrm.str() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -10645,14 +10637,14 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_write_to_string(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Write_to_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Write_to_string_failed); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 847, __pyx_L1_error) + __PYX_ERR(0, 848, __pyx_L1_error) - /* "pywrapfst.pyx":846 + /* "pywrapfst.pyx":847 * """ * cdef stringstream sstrm * if not self._table.Write(sstrm): # <<<<<<<<<<<<<< @@ -10661,7 +10653,7 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_write_to_string(struct __pyx_ */ } - /* "pywrapfst.pyx":848 + /* "pywrapfst.pyx":849 * if not self._table.Write(sstrm): * raise FstIOError("Write to string failed") * return sstrm.str() # <<<<<<<<<<<<<< @@ -10669,13 +10661,13 @@ static PyObject *__pyx_f_9pywrapfst_12_SymbolTable_write_to_string(struct __pyx_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":831 + /* "pywrapfst.pyx":832 * raise FstIOError("Write failed: {!r}".format(filename)) * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -10717,7 +10709,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_30write_to_string(struct __p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("write_to_string", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_12_SymbolTable_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10734,7 +10726,7 @@ static PyObject *__pyx_pf_9pywrapfst_12_SymbolTable_30write_to_string(struct __p return __pyx_r; } -/* "pywrapfst.pyx":866 +/* "pywrapfst.pyx":867 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -10767,7 +10759,7 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":867 + /* "pywrapfst.pyx":868 * * def __repr__(self): * return "".format(self.name(), # <<<<<<<<<<<<<< @@ -10775,23 +10767,23 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_const_EncodeMapper_SymbolTable, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_const_EncodeMapper_SymbolTable, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name"); - __PYX_ERR(0, 867, __pyx_L1_error) + __PYX_ERR(0, 868, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__EncodeMapperSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__EncodeMapperSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "pywrapfst.pyx":868 + /* "pywrapfst.pyx":869 * def __repr__(self): * return "".format(self.name(), * id(self)) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -10808,7 +10800,7 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10818,7 +10810,7 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10826,7 +10818,7 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -10837,7 +10829,7 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -10846,7 +10838,7 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":866 + /* "pywrapfst.pyx":867 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -10870,7 +10862,7 @@ static PyObject *__pyx_pf_9pywrapfst_24_EncodeMapperSymbolTable___repr__(struct return __pyx_r; } -/* "pywrapfst.pyx":885 +/* "pywrapfst.pyx":886 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -10903,7 +10895,7 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":886 + /* "pywrapfst.pyx":887 * * def __repr__(self): * return "".format(self.name(), # <<<<<<<<<<<<<< @@ -10911,23 +10903,23 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_const_Fst_SymbolTable_r_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_const_Fst_SymbolTable_r_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name"); - __PYX_ERR(0, 886, __pyx_L1_error) + __PYX_ERR(0, 887, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__FstSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__FstSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "pywrapfst.pyx":887 + /* "pywrapfst.pyx":888 * def __repr__(self): * return "".format(self.name(), * id(self)) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -10944,7 +10936,7 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10954,7 +10946,7 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10962,7 +10954,7 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -10973,7 +10965,7 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -10982,7 +10974,7 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":885 + /* "pywrapfst.pyx":886 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -11006,7 +10998,7 @@ static PyObject *__pyx_pf_9pywrapfst_15_FstSymbolTable___repr__(struct __pyx_obj return __pyx_r; } -/* "pywrapfst.pyx":901 +/* "pywrapfst.pyx":902 * """ * * cpdef int64 add_symbol(self, symbol, int64 key=fst.kNoSymbol): # <<<<<<<<<<<<<< @@ -11040,16 +11032,15 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableSymbolTable_1add_symbol)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -11067,7 +11058,7 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_symbol, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -11076,14 +11067,14 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_symbol, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -11094,41 +11085,41 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":918 + /* "pywrapfst.pyx":919 * The integer key of the new symbol. * """ * cdef string symbol_string = tostring(symbol) # <<<<<<<<<<<<<< * if key != fst.kNoSymbol: * return self._table.AddSymbol(symbol_string, key) */ - __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_symbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 918, __pyx_L1_error) + __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_symbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 919, __pyx_L1_error) __pyx_v_symbol_string = __pyx_t_9; - /* "pywrapfst.pyx":919 + /* "pywrapfst.pyx":920 * """ * cdef string symbol_string = tostring(symbol) * if key != fst.kNoSymbol: # <<<<<<<<<<<<<< @@ -11138,7 +11129,7 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s __pyx_t_10 = ((__pyx_v_key != fst::kNoSymbol) != 0); if (__pyx_t_10) { - /* "pywrapfst.pyx":920 + /* "pywrapfst.pyx":921 * cdef string symbol_string = tostring(symbol) * if key != fst.kNoSymbol: * return self._table.AddSymbol(symbol_string, key) # <<<<<<<<<<<<<< @@ -11147,12 +11138,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 920, __pyx_L1_error) + __PYX_ERR(0, 921, __pyx_L1_error) } __pyx_r = __pyx_v_self->__pyx_base._table->AddSymbol(__pyx_v_symbol_string, __pyx_v_key); goto __pyx_L0; - /* "pywrapfst.pyx":919 + /* "pywrapfst.pyx":920 * """ * cdef string symbol_string = tostring(symbol) * if key != fst.kNoSymbol: # <<<<<<<<<<<<<< @@ -11161,7 +11152,7 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s */ } - /* "pywrapfst.pyx":922 + /* "pywrapfst.pyx":923 * return self._table.AddSymbol(symbol_string, key) * else: * return self._table.AddSymbol(symbol_string) # <<<<<<<<<<<<<< @@ -11171,13 +11162,13 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19_MutableSymbolTable_add_s /*else*/ { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 922, __pyx_L1_error) + __PYX_ERR(0, 923, __pyx_L1_error) } __pyx_r = __pyx_v_self->__pyx_base._table->AddSymbol(__pyx_v_symbol_string); goto __pyx_L0; } - /* "pywrapfst.pyx":901 + /* "pywrapfst.pyx":902 * """ * * cpdef int64 add_symbol(self, symbol, int64 key=fst.kNoSymbol): # <<<<<<<<<<<<<< @@ -11236,7 +11227,7 @@ static PyObject *__pyx_pw_9pywrapfst_19_MutableSymbolTable_1add_symbol(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_symbol") < 0)) __PYX_ERR(0, 901, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_symbol") < 0)) __PYX_ERR(0, 902, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11249,14 +11240,14 @@ static PyObject *__pyx_pw_9pywrapfst_19_MutableSymbolTable_1add_symbol(PyObject } __pyx_v_symbol = values[0]; if (values[1]) { - __pyx_v_key = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_key == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L3_error) + __pyx_v_key = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_key == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L3_error) } else { __pyx_v_key = __pyx_k__3; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_symbol", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 901, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_symbol", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 902, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableSymbolTable.add_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11280,7 +11271,7 @@ static PyObject *__pyx_pf_9pywrapfst_19_MutableSymbolTable_add_symbol(struct __p __pyx_t_2.__pyx_n = 1; __pyx_t_2.key = __pyx_v_key; __pyx_t_1 = __pyx_vtabptr_9pywrapfst__MutableSymbolTable->add_symbol(__pyx_v_self, __pyx_v_symbol, 1, &__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -11297,7 +11288,7 @@ static PyObject *__pyx_pf_9pywrapfst_19_MutableSymbolTable_add_symbol(struct __p return __pyx_r; } -/* "pywrapfst.pyx":924 +/* "pywrapfst.pyx":925 * return self._table.AddSymbol(symbol_string) * * cpdef void add_table(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -11317,13 +11308,12 @@ static void __pyx_f_9pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_obj_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableSymbolTable_3add_table)) { __Pyx_INCREF(__pyx_t_1); @@ -11339,27 +11329,27 @@ static void __pyx_f_9pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_obj_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_syms)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_syms)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":936 + /* "pywrapfst.pyx":937 * syms: A SymbolTable to be merged with the current table. * """ * self._table.AddTable(deref(syms._table)) # <<<<<<<<<<<<<< @@ -11368,15 +11358,15 @@ static void __pyx_f_9pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 936, __pyx_L1_error) + __PYX_ERR(0, 937, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 936, __pyx_L1_error) + __PYX_ERR(0, 937, __pyx_L1_error) } __pyx_v_self->__pyx_base._table->AddTable((*__pyx_v_syms->_table)); - /* "pywrapfst.pyx":924 + /* "pywrapfst.pyx":925 * return self._table.AddSymbol(symbol_string) * * cpdef void add_table(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -11403,7 +11393,7 @@ static PyObject *__pyx_pw_9pywrapfst_19_MutableSymbolTable_3add_table(PyObject * PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_table (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 924, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 925, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_19_MutableSymbolTable_2add_table(((struct __pyx_obj_9pywrapfst__MutableSymbolTable *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms)); /* function exit code */ @@ -11421,7 +11411,7 @@ static PyObject *__pyx_pf_9pywrapfst_19_MutableSymbolTable_2add_table(struct __p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("add_table", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19_MutableSymbolTable_add_table(__pyx_v_self, __pyx_v_syms, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19_MutableSymbolTable_add_table(__pyx_v_self, __pyx_v_syms, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11438,7 +11428,7 @@ static PyObject *__pyx_pf_9pywrapfst_19_MutableSymbolTable_2add_table(struct __p return __pyx_r; } -/* "pywrapfst.pyx":938 +/* "pywrapfst.pyx":939 * self._table.AddTable(deref(syms._table)) * * cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<< @@ -11459,13 +11449,12 @@ static void __pyx_f_9pywrapfst_19_MutableSymbolTable_set_name(struct __pyx_obj_9 if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableSymbolTable_5set_name)) { __Pyx_INCREF(__pyx_t_1); @@ -11481,27 +11470,27 @@ static void __pyx_f_9pywrapfst_19_MutableSymbolTable_set_name(struct __pyx_obj_9 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_new_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_name); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":939 + /* "pywrapfst.pyx":940 * * cpdef void set_name(self, new_name) except *: * self._table.SetName(tostring(new_name)) # <<<<<<<<<<<<<< @@ -11510,12 +11499,12 @@ static void __pyx_f_9pywrapfst_19_MutableSymbolTable_set_name(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 939, __pyx_L1_error) + __PYX_ERR(0, 940, __pyx_L1_error) } - __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 940, __pyx_L1_error) __pyx_v_self->__pyx_base._table->SetName(__pyx_t_5); - /* "pywrapfst.pyx":938 + /* "pywrapfst.pyx":939 * self._table.AddTable(deref(syms._table)) * * cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<< @@ -11554,8 +11543,8 @@ static PyObject *__pyx_pf_9pywrapfst_19_MutableSymbolTable_4set_name(struct __py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_name", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_9pywrapfst_19_MutableSymbolTable_set_name(__pyx_v_self, __pyx_v_new_name, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 938, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_f_9pywrapfst_19_MutableSymbolTable_set_name(__pyx_v_self, __pyx_v_new_name, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11572,7 +11561,7 @@ static PyObject *__pyx_pf_9pywrapfst_19_MutableSymbolTable_4set_name(struct __py return __pyx_r; } -/* "pywrapfst.pyx":949 +/* "pywrapfst.pyx":950 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -11605,7 +11594,7 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":950 + /* "pywrapfst.pyx":951 * * def __repr__(self): * return "".format(self.name(), id(self)) # <<<<<<<<<<<<<< @@ -11613,15 +11602,15 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Fst_SymbolTable_r_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Fst_SymbolTable_r_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name"); - __PYX_ERR(0, 950, __pyx_L1_error) + __PYX_ERR(0, 951, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__MutableFstSymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__MutableFstSymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -11638,7 +11627,7 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -11648,7 +11637,7 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -11656,7 +11645,7 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -11667,7 +11656,7 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -11676,7 +11665,7 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":949 + /* "pywrapfst.pyx":950 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -11700,7 +11689,7 @@ static PyObject *__pyx_pf_9pywrapfst_22_MutableFstSymbolTable___repr__(struct __ return __pyx_r; } -/* "pywrapfst.pyx":970 +/* "pywrapfst.pyx":971 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -11733,7 +11722,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":971 + /* "pywrapfst.pyx":972 * * def __repr__(self): * return "".format(self.name(), id(self)) # <<<<<<<<<<<<<< @@ -11741,15 +11730,15 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py * def __init__(self, name=""): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_SymbolTable_r_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_SymbolTable_r_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name"); - __PYX_ERR(0, 971, __pyx_L1_error) + __PYX_ERR(0, 972, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -11766,7 +11755,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -11776,7 +11765,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -11784,7 +11773,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -11795,7 +11784,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -11804,7 +11793,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":970 + /* "pywrapfst.pyx":971 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -11828,7 +11817,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable___repr__(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":973 +/* "pywrapfst.pyx":974 * return "".format(self.name(), id(self)) * * def __init__(self, name=""): # <<<<<<<<<<<<<< @@ -11865,7 +11854,7 @@ static int __pyx_pw_9pywrapfst_11SymbolTable_3__init__(PyObject *__pyx_v_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 973, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 974, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11879,7 +11868,7 @@ static int __pyx_pw_9pywrapfst_11SymbolTable_3__init__(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 973, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 974, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.SymbolTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11898,21 +11887,21 @@ static int __pyx_pf_9pywrapfst_11SymbolTable_2__init__(struct __pyx_obj_9pywrapf std::string __pyx_t_1; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":974 + /* "pywrapfst.pyx":975 * * def __init__(self, name=""): * self._table = new fst.SymbolTable(tostring(name)) # <<<<<<<<<<<<<< * self._smart_table.reset(self._table) * */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 975, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 974, __pyx_L1_error) + __PYX_ERR(0, 975, __pyx_L1_error) } __pyx_v_self->__pyx_base.__pyx_base._table = new fst::SymbolTable(__pyx_t_1); - /* "pywrapfst.pyx":975 + /* "pywrapfst.pyx":976 * def __init__(self, name=""): * self._table = new fst.SymbolTable(tostring(name)) * self._smart_table.reset(self._table) # <<<<<<<<<<<<<< @@ -11921,15 +11910,15 @@ static int __pyx_pf_9pywrapfst_11SymbolTable_2__init__(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_smart_table"); - __PYX_ERR(0, 975, __pyx_L1_error) + __PYX_ERR(0, 976, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 975, __pyx_L1_error) + __PYX_ERR(0, 976, __pyx_L1_error) } __pyx_v_self->_smart_table.reset(__pyx_v_self->__pyx_base.__pyx_base._table); - /* "pywrapfst.pyx":973 + /* "pywrapfst.pyx":974 * return "".format(self.name(), id(self)) * * def __init__(self, name=""): # <<<<<<<<<<<<<< @@ -11948,7 +11937,7 @@ static int __pyx_pf_9pywrapfst_11SymbolTable_2__init__(struct __pyx_obj_9pywrapf return __pyx_r; } -/* "pywrapfst.pyx":978 +/* "pywrapfst.pyx":979 * * @classmethod * def read(cls, filename): # <<<<<<<<<<<<<< @@ -11983,17 +11972,17 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObj PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("read", 0); - /* "pywrapfst.pyx":995 + /* "pywrapfst.pyx":996 * """ * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.Read(tostring(filename))) # <<<<<<<<<<<<<< * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error) __pyx_v_syms.reset(fst::SymbolTable::Read(__pyx_t_1)); - /* "pywrapfst.pyx":996 + /* "pywrapfst.pyx":997 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.Read(tostring(filename))) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12003,16 +11992,16 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObj __pyx_t_2 = ((__pyx_v_syms.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":997 + /* "pywrapfst.pyx":998 * syms.reset(fst.SymbolTable.Read(tostring(filename))) * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * return _init_SymbolTable(syms.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 997, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -12026,7 +12015,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObj } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -12042,14 +12031,14 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObj __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 997, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 997, __pyx_L1_error) + __PYX_ERR(0, 998, __pyx_L1_error) - /* "pywrapfst.pyx":996 + /* "pywrapfst.pyx":997 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.Read(tostring(filename))) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12058,7 +12047,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObj */ } - /* "pywrapfst.pyx":998 + /* "pywrapfst.pyx":999 * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) * return _init_SymbolTable(syms.release()) # <<<<<<<<<<<<<< @@ -12066,13 +12055,13 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObj * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":978 + /* "pywrapfst.pyx":979 * * @classmethod * def read(cls, filename): # <<<<<<<<<<<<<< @@ -12095,7 +12084,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObj return __pyx_r; } -/* "pywrapfst.pyx":1001 +/* "pywrapfst.pyx":1002 * * @classmethod * def read_text(cls, filename, bool allow_negative_labels=False): # <<<<<<<<<<<<<< @@ -12139,7 +12128,7 @@ static PyObject *__pyx_pw_9pywrapfst_11SymbolTable_7read_text(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_text") < 0)) __PYX_ERR(0, 1001, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_text") < 0)) __PYX_ERR(0, 1002, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -12152,14 +12141,14 @@ static PyObject *__pyx_pw_9pywrapfst_11SymbolTable_7read_text(PyObject *__pyx_v_ } __pyx_v_filename = values[0]; if (values[1]) { - __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L3_error) + __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1002, __pyx_L3_error) } else { __pyx_v_allow_negative_labels = ((bool)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_text", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1001, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_text", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1002, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.SymbolTable.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12186,7 +12175,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("read_text", 0); - /* "pywrapfst.pyx":1020 + /* "pywrapfst.pyx":1021 * """ * cdef unique_ptr[fst.SymbolTableTextOptions] opts * opts.reset(new fst.SymbolTableTextOptions(allow_negative_labels)) # <<<<<<<<<<<<<< @@ -12195,17 +12184,17 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy */ __pyx_v_opts.reset(new fst::SymbolTableTextOptions(__pyx_v_allow_negative_labels)); - /* "pywrapfst.pyx":1022 + /* "pywrapfst.pyx":1023 * opts.reset(new fst.SymbolTableTextOptions(allow_negative_labels)) * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.ReadText(tostring(filename), deref(opts))) # <<<<<<<<<<<<<< * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error) __pyx_v_syms.reset(fst::SymbolTable::ReadText(__pyx_t_1, (*__pyx_v_opts))); - /* "pywrapfst.pyx":1023 + /* "pywrapfst.pyx":1024 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.ReadText(tostring(filename), deref(opts))) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12215,16 +12204,16 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy __pyx_t_2 = ((__pyx_v_syms.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":1024 + /* "pywrapfst.pyx":1025 * syms.reset(fst.SymbolTable.ReadText(tostring(filename), deref(opts))) * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * return _init_SymbolTable(syms.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -12238,7 +12227,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -12254,14 +12243,14 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1024, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1024, __pyx_L1_error) + __PYX_ERR(0, 1025, __pyx_L1_error) - /* "pywrapfst.pyx":1023 + /* "pywrapfst.pyx":1024 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.ReadText(tostring(filename), deref(opts))) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12270,7 +12259,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy */ } - /* "pywrapfst.pyx":1025 + /* "pywrapfst.pyx":1026 * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) * return _init_SymbolTable(syms.release()) # <<<<<<<<<<<<<< @@ -12278,13 +12267,13 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1025, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1001 + /* "pywrapfst.pyx":1002 * * @classmethod * def read_text(cls, filename, bool allow_negative_labels=False): # <<<<<<<<<<<<<< @@ -12307,7 +12296,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTy return __pyx_r; } -/* "pywrapfst.pyx":1028 +/* "pywrapfst.pyx":1029 * * @classmethod * def read_fst(cls, filename, bool input_table): # <<<<<<<<<<<<<< @@ -12347,11 +12336,11 @@ static PyObject *__pyx_pw_9pywrapfst_11SymbolTable_9read_fst(PyObject *__pyx_v_c case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_table)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, 1); __PYX_ERR(0, 1028, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, 1); __PYX_ERR(0, 1029, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_fst") < 0)) __PYX_ERR(0, 1028, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_fst") < 0)) __PYX_ERR(0, 1029, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -12360,11 +12349,11 @@ static PyObject *__pyx_pw_9pywrapfst_11SymbolTable_9read_fst(PyObject *__pyx_v_c values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_filename = values[0]; - __pyx_v_input_table = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_input_table == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1028, __pyx_L3_error) + __pyx_v_input_table = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_input_table == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1028, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1029, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.SymbolTable.read_fst", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12390,17 +12379,17 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTyp PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("read_fst", 0); - /* "pywrapfst.pyx":1051 + /* "pywrapfst.pyx":1052 * """ * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.FstReadSymbols(tostring(filename), input_table)) # <<<<<<<<<<<<<< * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L1_error) __pyx_v_syms.reset(fst::FstReadSymbols(__pyx_t_1, __pyx_v_input_table)); - /* "pywrapfst.pyx":1052 + /* "pywrapfst.pyx":1053 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.FstReadSymbols(tostring(filename), input_table)) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12410,16 +12399,16 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTyp __pyx_t_2 = ((__pyx_v_syms.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":1053 + /* "pywrapfst.pyx":1054 * syms.reset(fst.FstReadSymbols(tostring(filename), input_table)) * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * return _init_SymbolTable(syms.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1053, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -12433,7 +12422,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTyp } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1053, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -12449,14 +12438,14 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTyp __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1053, __pyx_L1_error) + __PYX_ERR(0, 1054, __pyx_L1_error) - /* "pywrapfst.pyx":1052 + /* "pywrapfst.pyx":1053 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.FstReadSymbols(tostring(filename), input_table)) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12465,7 +12454,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTyp */ } - /* "pywrapfst.pyx":1054 + /* "pywrapfst.pyx":1055 * if syms.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) * return _init_SymbolTable(syms.release()) # <<<<<<<<<<<<<< @@ -12473,13 +12462,13 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTyp * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1054, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1028 + /* "pywrapfst.pyx":1029 * * @classmethod * def read_fst(cls, filename, bool input_table): # <<<<<<<<<<<<<< @@ -12502,7 +12491,7 @@ static PyObject *__pyx_pf_9pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTyp return __pyx_r; } -/* "pywrapfst.pyx":1057 +/* "pywrapfst.pyx":1058 * * * cdef _EncodeMapperSymbolTable _init_EncodeMapperSymbolTable( # <<<<<<<<<<<<<< @@ -12517,19 +12506,19 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_init_EncodeMapperSymbolTable", 0); - /* "pywrapfst.pyx":1060 + /* "pywrapfst.pyx":1061 * fst.SymbolTable *table, shared_ptr[fst.EncodeMapperClass] encoder): * cdef _EncodeMapperSymbolTable result = ( * _EncodeMapperSymbolTable.__new__(_EncodeMapperSymbolTable)) # <<<<<<<<<<<<<< * result._table = table * result._encoder = encoder */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__EncodeMapperSymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst__EncodeMapperSymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__EncodeMapperSymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst__EncodeMapperSymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":1061 + /* "pywrapfst.pyx":1062 * cdef _EncodeMapperSymbolTable result = ( * _EncodeMapperSymbolTable.__new__(_EncodeMapperSymbolTable)) * result._table = table # <<<<<<<<<<<<<< @@ -12538,11 +12527,11 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1061, __pyx_L1_error) + __PYX_ERR(0, 1062, __pyx_L1_error) } __pyx_v_result->__pyx_base._table = __pyx_v_table; - /* "pywrapfst.pyx":1062 + /* "pywrapfst.pyx":1063 * _EncodeMapperSymbolTable.__new__(_EncodeMapperSymbolTable)) * result._table = table * result._encoder = encoder # <<<<<<<<<<<<<< @@ -12551,11 +12540,11 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1062, __pyx_L1_error) + __PYX_ERR(0, 1063, __pyx_L1_error) } __pyx_v_result->_encoder = __pyx_v_encoder; - /* "pywrapfst.pyx":1063 + /* "pywrapfst.pyx":1064 * result._table = table * result._encoder = encoder * return result # <<<<<<<<<<<<<< @@ -12567,7 +12556,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1057 + /* "pywrapfst.pyx":1058 * * * cdef _EncodeMapperSymbolTable _init_EncodeMapperSymbolTable( # <<<<<<<<<<<<<< @@ -12587,7 +12576,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ return __pyx_r; } -/* "pywrapfst.pyx":1066 +/* "pywrapfst.pyx":1067 * * * cdef _FstSymbolTable _init_FstSymbolTable(fst.SymbolTable *table, # <<<<<<<<<<<<<< @@ -12602,19 +12591,19 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst__init_Fst PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_init_FstSymbolTable", 0); - /* "pywrapfst.pyx":1068 + /* "pywrapfst.pyx":1069 * cdef _FstSymbolTable _init_FstSymbolTable(fst.SymbolTable *table, * shared_ptr[fst.FstClass] ifst): * cdef _FstSymbolTable result = _FstSymbolTable.__new__(_FstSymbolTable) # <<<<<<<<<<<<<< * result._table = table * result._fst = ifst */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__FstSymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst__FstSymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__FstSymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst__FstSymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":1069 + /* "pywrapfst.pyx":1070 * shared_ptr[fst.FstClass] ifst): * cdef _FstSymbolTable result = _FstSymbolTable.__new__(_FstSymbolTable) * result._table = table # <<<<<<<<<<<<<< @@ -12623,11 +12612,11 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst__init_Fst */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1069, __pyx_L1_error) + __PYX_ERR(0, 1070, __pyx_L1_error) } __pyx_v_result->__pyx_base._table = __pyx_v_table; - /* "pywrapfst.pyx":1070 + /* "pywrapfst.pyx":1071 * cdef _FstSymbolTable result = _FstSymbolTable.__new__(_FstSymbolTable) * result._table = table * result._fst = ifst # <<<<<<<<<<<<<< @@ -12636,11 +12625,11 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst__init_Fst */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1070, __pyx_L1_error) + __PYX_ERR(0, 1071, __pyx_L1_error) } __pyx_v_result->_fst = __pyx_v_ifst; - /* "pywrapfst.pyx":1071 + /* "pywrapfst.pyx":1072 * result._table = table * result._fst = ifst * return result # <<<<<<<<<<<<<< @@ -12652,7 +12641,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst__init_Fst __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1066 + /* "pywrapfst.pyx":1067 * * * cdef _FstSymbolTable _init_FstSymbolTable(fst.SymbolTable *table, # <<<<<<<<<<<<<< @@ -12672,7 +12661,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst__init_Fst return __pyx_r; } -/* "pywrapfst.pyx":1074 +/* "pywrapfst.pyx":1075 * * * cdef _MutableFstSymbolTable _init_MutableFstSymbolTable(fst.SymbolTable *table, # <<<<<<<<<<<<<< @@ -12687,19 +12676,19 @@ static struct __pyx_obj_9pywrapfst__MutableFstSymbolTable *__pyx_f_9pywrapfst__i PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_init_MutableFstSymbolTable", 0); - /* "pywrapfst.pyx":1077 + /* "pywrapfst.pyx":1078 * shared_ptr[fst.MutableFstClass] ifst): * cdef _MutableFstSymbolTable result = ( * _MutableFstSymbolTable.__new__(_MutableFstSymbolTable)) # <<<<<<<<<<<<<< * result._table = table * result._mfst = ifst */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__MutableFstSymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFstSymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__MutableFstSymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFstSymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst__MutableFstSymbolTable *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":1078 + /* "pywrapfst.pyx":1079 * cdef _MutableFstSymbolTable result = ( * _MutableFstSymbolTable.__new__(_MutableFstSymbolTable)) * result._table = table # <<<<<<<<<<<<<< @@ -12708,11 +12697,11 @@ static struct __pyx_obj_9pywrapfst__MutableFstSymbolTable *__pyx_f_9pywrapfst__i */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1078, __pyx_L1_error) + __PYX_ERR(0, 1079, __pyx_L1_error) } __pyx_v_result->__pyx_base.__pyx_base._table = __pyx_v_table; - /* "pywrapfst.pyx":1079 + /* "pywrapfst.pyx":1080 * _MutableFstSymbolTable.__new__(_MutableFstSymbolTable)) * result._table = table * result._mfst = ifst # <<<<<<<<<<<<<< @@ -12721,11 +12710,11 @@ static struct __pyx_obj_9pywrapfst__MutableFstSymbolTable *__pyx_f_9pywrapfst__i */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1079, __pyx_L1_error) + __PYX_ERR(0, 1080, __pyx_L1_error) } __pyx_v_result->_mfst = __pyx_v_ifst; - /* "pywrapfst.pyx":1080 + /* "pywrapfst.pyx":1081 * result._table = table * result._mfst = ifst * return result # <<<<<<<<<<<<<< @@ -12737,7 +12726,7 @@ static struct __pyx_obj_9pywrapfst__MutableFstSymbolTable *__pyx_f_9pywrapfst__i __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1074 + /* "pywrapfst.pyx":1075 * * * cdef _MutableFstSymbolTable _init_MutableFstSymbolTable(fst.SymbolTable *table, # <<<<<<<<<<<<<< @@ -12757,7 +12746,7 @@ static struct __pyx_obj_9pywrapfst__MutableFstSymbolTable *__pyx_f_9pywrapfst__i return __pyx_r; } -/* "pywrapfst.pyx":1083 +/* "pywrapfst.pyx":1084 * * * cdef SymbolTable _init_SymbolTable(fst.SymbolTable *table): # <<<<<<<<<<<<<< @@ -12772,19 +12761,19 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__init_SymbolT PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_init_SymbolTable", 0); - /* "pywrapfst.pyx":1084 + /* "pywrapfst.pyx":1085 * * cdef SymbolTable _init_SymbolTable(fst.SymbolTable *table): * cdef SymbolTable result = SymbolTable.__new__(SymbolTable) # <<<<<<<<<<<<<< * result._table = table * return result */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_SymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst_SymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_SymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst_SymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":1085 + /* "pywrapfst.pyx":1086 * cdef SymbolTable _init_SymbolTable(fst.SymbolTable *table): * cdef SymbolTable result = SymbolTable.__new__(SymbolTable) * result._table = table # <<<<<<<<<<<<<< @@ -12793,11 +12782,11 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__init_SymbolT */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1085, __pyx_L1_error) + __PYX_ERR(0, 1086, __pyx_L1_error) } __pyx_v_result->__pyx_base.__pyx_base._table = __pyx_v_table; - /* "pywrapfst.pyx":1086 + /* "pywrapfst.pyx":1087 * cdef SymbolTable result = SymbolTable.__new__(SymbolTable) * result._table = table * return result # <<<<<<<<<<<<<< @@ -12809,7 +12798,7 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__init_SymbolT __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1083 + /* "pywrapfst.pyx":1084 * * * cdef SymbolTable _init_SymbolTable(fst.SymbolTable *table): # <<<<<<<<<<<<<< @@ -12829,7 +12818,7 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__init_SymbolT return __pyx_r; } -/* "pywrapfst.pyx":1089 +/* "pywrapfst.pyx":1090 * * * cpdef SymbolTable _read_SymbolTable_from_string(state): # <<<<<<<<<<<<<< @@ -12850,17 +12839,17 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__read_SymbolT PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_read_SymbolTable_from_string", 0); - /* "pywrapfst.pyx":1091 + /* "pywrapfst.pyx":1092 * cpdef SymbolTable _read_SymbolTable_from_string(state): * cdef stringstream sstrm * sstrm << tostring(state) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.ReadStream(sstrm, b"")) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1092, __pyx_L1_error) (void)((__pyx_v_sstrm << __pyx_t_1)); - /* "pywrapfst.pyx":1093 + /* "pywrapfst.pyx":1094 * sstrm << tostring(state) * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.ReadStream(sstrm, b"")) # <<<<<<<<<<<<<< @@ -12869,7 +12858,7 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__read_SymbolT */ __pyx_v_syms.reset(fst::SymbolTable::Read(__pyx_v_sstrm, __pyx_k_pywrapfst)); - /* "pywrapfst.pyx":1094 + /* "pywrapfst.pyx":1095 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.ReadStream(sstrm, b"")) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12879,14 +12868,14 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__read_SymbolT __pyx_t_2 = ((__pyx_v_syms.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":1095 + /* "pywrapfst.pyx":1096 * syms.reset(fst.SymbolTable.ReadStream(sstrm, b"")) * if syms.get() == NULL: * raise FstIOError("Read failed") # <<<<<<<<<<<<<< * return _init_SymbolTable(syms.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -12900,14 +12889,14 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__read_SymbolT } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Read_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Read_failed); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1095, __pyx_L1_error) + __PYX_ERR(0, 1096, __pyx_L1_error) - /* "pywrapfst.pyx":1094 + /* "pywrapfst.pyx":1095 * cdef unique_ptr[fst.SymbolTable] syms * syms.reset(fst.SymbolTable.ReadStream(sstrm, b"")) * if syms.get() == NULL: # <<<<<<<<<<<<<< @@ -12916,7 +12905,7 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__read_SymbolT */ } - /* "pywrapfst.pyx":1096 + /* "pywrapfst.pyx":1097 * if syms.get() == NULL: * raise FstIOError("Read failed") * return _init_SymbolTable(syms.release()) # <<<<<<<<<<<<<< @@ -12924,13 +12913,13 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst__read_SymbolT * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(__pyx_v_syms.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1089 + /* "pywrapfst.pyx":1090 * * * cpdef SymbolTable _read_SymbolTable_from_string(state): # <<<<<<<<<<<<<< @@ -12970,7 +12959,7 @@ static PyObject *__pyx_pf_9pywrapfst_8_read_SymbolTable_from_string(CYTHON_UNUSE PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_read_SymbolTable_from_string", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_SymbolTable_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_SymbolTable_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -12987,7 +12976,7 @@ static PyObject *__pyx_pf_9pywrapfst_8_read_SymbolTable_from_string(CYTHON_UNUSE return __pyx_r; } -/* "pywrapfst.pyx":1102 +/* "pywrapfst.pyx":1103 * * * cpdef SymbolTable compact_symbol_table(_SymbolTable syms): # <<<<<<<<<<<<<< @@ -13002,7 +12991,7 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_compact_symbo PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("compact_symbol_table", 0); - /* "pywrapfst.pyx":1114 + /* "pywrapfst.pyx":1115 * A new compacted SymbolTable. * """ * return _init_SymbolTable(fst.CompactSymbolTable(deref(syms._table))) # <<<<<<<<<<<<<< @@ -13012,15 +13001,15 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_compact_symbo __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1114, __pyx_L1_error) + __PYX_ERR(0, 1115, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::CompactSymbolTable((*__pyx_v_syms->_table)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::CompactSymbolTable((*__pyx_v_syms->_table)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1102 + /* "pywrapfst.pyx":1103 * * * cpdef SymbolTable compact_symbol_table(_SymbolTable syms): # <<<<<<<<<<<<<< @@ -13046,7 +13035,7 @@ static PyObject *__pyx_pw_9pywrapfst_11compact_symbol_table(PyObject *__pyx_self PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("compact_symbol_table (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1102, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1103, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_10compact_symbol_table(__pyx_self, ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms)); /* function exit code */ @@ -13064,7 +13053,7 @@ static PyObject *__pyx_pf_9pywrapfst_10compact_symbol_table(CYTHON_UNUSED PyObje PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("compact_symbol_table", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compact_symbol_table(__pyx_v_syms, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compact_symbol_table(__pyx_v_syms, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13081,7 +13070,7 @@ static PyObject *__pyx_pf_9pywrapfst_10compact_symbol_table(CYTHON_UNUSED PyObje return __pyx_r; } -/* "pywrapfst.pyx":1117 +/* "pywrapfst.pyx":1118 * * * cpdef SymbolTable merge_symbol_table(_SymbolTable lhs, _SymbolTable rhs): # <<<<<<<<<<<<<< @@ -13096,7 +13085,7 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_merge_symbol_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("merge_symbol_table", 0); - /* "pywrapfst.pyx":1141 + /* "pywrapfst.pyx":1142 * See also: `relabel_symbols`. * """ * return _init_SymbolTable(fst.MergeSymbolTable(deref(lhs._table), # <<<<<<<<<<<<<< @@ -13106,10 +13095,10 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_merge_symbol_ __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1141, __pyx_L1_error) + __PYX_ERR(0, 1142, __pyx_L1_error) } - /* "pywrapfst.pyx":1142 + /* "pywrapfst.pyx":1143 * """ * return _init_SymbolTable(fst.MergeSymbolTable(deref(lhs._table), * deref(rhs._table), NULL)) # <<<<<<<<<<<<<< @@ -13118,23 +13107,23 @@ static struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_f_9pywrapfst_merge_symbol_ */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1142, __pyx_L1_error) + __PYX_ERR(0, 1143, __pyx_L1_error) } - /* "pywrapfst.pyx":1141 + /* "pywrapfst.pyx":1142 * See also: `relabel_symbols`. * """ * return _init_SymbolTable(fst.MergeSymbolTable(deref(lhs._table), # <<<<<<<<<<<<<< * deref(rhs._table), NULL)) * */ - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::MergeSymbolTable((*__pyx_v_lhs->_table), (*__pyx_v_rhs->_table), NULL))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::MergeSymbolTable((*__pyx_v_lhs->_table), (*__pyx_v_rhs->_table), NULL))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1117 + /* "pywrapfst.pyx":1118 * * * cpdef SymbolTable merge_symbol_table(_SymbolTable lhs, _SymbolTable rhs): # <<<<<<<<<<<<<< @@ -13185,11 +13174,11 @@ static PyObject *__pyx_pw_9pywrapfst_13merge_symbol_table(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, 1); __PYX_ERR(0, 1117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, 1); __PYX_ERR(0, 1118, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_symbol_table") < 0)) __PYX_ERR(0, 1117, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_symbol_table") < 0)) __PYX_ERR(0, 1118, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -13202,14 +13191,14 @@ static PyObject *__pyx_pw_9pywrapfst_13merge_symbol_table(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1118, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.merge_symbol_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst__SymbolTable, 1, "lhs", 0))) __PYX_ERR(0, 1117, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst__SymbolTable, 1, "rhs", 0))) __PYX_ERR(0, 1117, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst__SymbolTable, 1, "lhs", 0))) __PYX_ERR(0, 1118, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst__SymbolTable, 1, "rhs", 0))) __PYX_ERR(0, 1118, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_12merge_symbol_table(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -13227,7 +13216,7 @@ static PyObject *__pyx_pf_9pywrapfst_12merge_symbol_table(CYTHON_UNUSED PyObject PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("merge_symbol_table", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_merge_symbol_table(__pyx_v_lhs, __pyx_v_rhs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_merge_symbol_table(__pyx_v_lhs, __pyx_v_rhs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13244,7 +13233,7 @@ static PyObject *__pyx_pf_9pywrapfst_12merge_symbol_table(CYTHON_UNUSED PyObject return __pyx_r; } -/* "pywrapfst.pyx":1156 +/* "pywrapfst.pyx":1157 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -13274,7 +13263,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator___repr__(struct __pyx PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":1157 + /* "pywrapfst.pyx":1158 * * def __repr__(self): * return "".format(id(self)) # <<<<<<<<<<<<<< @@ -13282,9 +13271,9 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator___repr__(struct __pyx * def __init__(self, _SymbolTable syms): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_SymbolTableIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_SymbolTableIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13299,14 +13288,14 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator___repr__(struct __pyx __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1156 + /* "pywrapfst.pyx":1157 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -13328,7 +13317,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator___repr__(struct __pyx return __pyx_r; } -/* "pywrapfst.pyx":1159 +/* "pywrapfst.pyx":1160 * return "".format(id(self)) * * def __init__(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -13362,7 +13351,7 @@ static int __pyx_pw_9pywrapfst_19SymbolTableIterator_3__init__(PyObject *__pyx_v else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1159, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1160, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -13373,13 +13362,13 @@ static int __pyx_pw_9pywrapfst_19SymbolTableIterator_3__init__(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1159, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1160, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.SymbolTableIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1159, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1160, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_19SymbolTableIterator_2__init__(((struct __pyx_obj_9pywrapfst_SymbolTableIterator *)__pyx_v_self), __pyx_v_syms); /* function exit code */ @@ -13396,7 +13385,7 @@ static int __pyx_pf_9pywrapfst_19SymbolTableIterator_2__init__(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":1160 + /* "pywrapfst.pyx":1161 * * def __init__(self, _SymbolTable syms): * self._siter.reset(new fst.SymbolTableIterator(deref(syms._table))) # <<<<<<<<<<<<<< @@ -13405,15 +13394,15 @@ static int __pyx_pf_9pywrapfst_19SymbolTableIterator_2__init__(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1160, __pyx_L1_error) + __PYX_ERR(0, 1161, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1160, __pyx_L1_error) + __PYX_ERR(0, 1161, __pyx_L1_error) } __pyx_v_self->_siter.reset(new fst::SymbolTableIterator((*__pyx_v_syms->_table))); - /* "pywrapfst.pyx":1159 + /* "pywrapfst.pyx":1160 * return "".format(id(self)) * * def __init__(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -13432,7 +13421,7 @@ static int __pyx_pf_9pywrapfst_19SymbolTableIterator_2__init__(struct __pyx_obj_ return __pyx_r; } -/* "pywrapfst.pyx":1163 +/* "pywrapfst.pyx":1164 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -13458,7 +13447,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_4__iter__(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "pywrapfst.pyx":1164 + /* "pywrapfst.pyx":1165 * # This just registers this class as a possible iterator. * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -13470,7 +13459,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_4__iter__(struct __py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1163 + /* "pywrapfst.pyx":1164 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -13485,7 +13474,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_4__iter__(struct __py return __pyx_r; } -/* "pywrapfst.pyx":1167 +/* "pywrapfst.pyx":1168 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -13517,7 +13506,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - /* "pywrapfst.pyx":1168 + /* "pywrapfst.pyx":1169 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -13526,12 +13515,12 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 1168, __pyx_L1_error) + __PYX_ERR(0, 1169, __pyx_L1_error) } __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_SymbolTableIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":1169 + /* "pywrapfst.pyx":1170 * def __next__(self): * if self.done(): * raise StopIteration # <<<<<<<<<<<<<< @@ -13539,9 +13528,9 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py * cdef string symbol = self.symbol() */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 1169, __pyx_L1_error) + __PYX_ERR(0, 1170, __pyx_L1_error) - /* "pywrapfst.pyx":1168 + /* "pywrapfst.pyx":1169 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -13550,7 +13539,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py */ } - /* "pywrapfst.pyx":1170 + /* "pywrapfst.pyx":1171 * if self.done(): * raise StopIteration * cdef int64 value = self.value() # <<<<<<<<<<<<<< @@ -13559,11 +13548,11 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value"); - __PYX_ERR(0, 1170, __pyx_L1_error) + __PYX_ERR(0, 1171, __pyx_L1_error) } __pyx_v_value = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0); - /* "pywrapfst.pyx":1171 + /* "pywrapfst.pyx":1172 * raise StopIteration * cdef int64 value = self.value() * cdef string symbol = self.symbol() # <<<<<<<<<<<<<< @@ -13572,11 +13561,11 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "symbol"); - __PYX_ERR(0, 1171, __pyx_L1_error) + __PYX_ERR(0, 1172, __pyx_L1_error) } __pyx_v_symbol = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableIterator *)__pyx_v_self->__pyx_vtab)->symbol(__pyx_v_self, 0); - /* "pywrapfst.pyx":1172 + /* "pywrapfst.pyx":1173 * cdef int64 value = self.value() * cdef string symbol = self.symbol() * self.next() # <<<<<<<<<<<<<< @@ -13585,11 +13574,11 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 1172, __pyx_L1_error) + __PYX_ERR(0, 1173, __pyx_L1_error) } ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); - /* "pywrapfst.pyx":1173 + /* "pywrapfst.pyx":1174 * cdef string symbol = self.symbol() * self.next() * return (value, symbol) # <<<<<<<<<<<<<< @@ -13597,11 +13586,11 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py * cpdef bool done(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_symbol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_symbol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -13613,7 +13602,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py __pyx_t_4 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1167 + /* "pywrapfst.pyx":1168 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -13634,7 +13623,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_6__next__(struct __py return __pyx_r; } -/* "pywrapfst.pyx":1175 +/* "pywrapfst.pyx":1176 * return (value, symbol) * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -13656,13 +13645,12 @@ static bool __pyx_f_9pywrapfst_19SymbolTableIterator_done(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19SymbolTableIterator_9done)) { __Pyx_INCREF(__pyx_t_1); @@ -13678,29 +13666,29 @@ static bool __pyx_f_9pywrapfst_19SymbolTableIterator_done(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1184 + /* "pywrapfst.pyx":1185 * True if the iterator is exhausted, False otherwise. * """ * return self._siter.get().Done() # <<<<<<<<<<<<<< @@ -13709,12 +13697,12 @@ static bool __pyx_f_9pywrapfst_19SymbolTableIterator_done(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1184, __pyx_L1_error) + __PYX_ERR(0, 1185, __pyx_L1_error) } __pyx_r = __pyx_v_self->_siter.get()->Done(); goto __pyx_L0; - /* "pywrapfst.pyx":1175 + /* "pywrapfst.pyx":1176 * return (value, symbol) * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -13755,7 +13743,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_8done(struct __pyx_ob PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("done", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_19SymbolTableIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_19SymbolTableIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13772,7 +13760,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_8done(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":1186 +/* "pywrapfst.pyx":1187 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -13792,13 +13780,12 @@ static void __pyx_f_9pywrapfst_19SymbolTableIterator_next(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19SymbolTableIterator_11next)) { __Pyx_INCREF(__pyx_t_1); @@ -13814,27 +13801,27 @@ static void __pyx_f_9pywrapfst_19SymbolTableIterator_next(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1192 + /* "pywrapfst.pyx":1193 * Advances the iterator. * """ * self._siter.get().Next() # <<<<<<<<<<<<<< @@ -13843,11 +13830,11 @@ static void __pyx_f_9pywrapfst_19SymbolTableIterator_next(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1192, __pyx_L1_error) + __PYX_ERR(0, 1193, __pyx_L1_error) } __pyx_v_self->_siter.get()->Next(); - /* "pywrapfst.pyx":1186 + /* "pywrapfst.pyx":1187 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -13887,7 +13874,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_10next(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("next", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19SymbolTableIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19SymbolTableIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13904,7 +13891,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_10next(struct __pyx_o return __pyx_r; } -/* "pywrapfst.pyx":1194 +/* "pywrapfst.pyx":1195 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -13924,13 +13911,12 @@ static void __pyx_f_9pywrapfst_19SymbolTableIterator_reset(struct __pyx_obj_9pyw if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19SymbolTableIterator_13reset)) { __Pyx_INCREF(__pyx_t_1); @@ -13946,27 +13932,27 @@ static void __pyx_f_9pywrapfst_19SymbolTableIterator_reset(struct __pyx_obj_9pyw } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1200 + /* "pywrapfst.pyx":1201 * Resets the iterator to the initial position. * """ * self._siter.get().Reset() # <<<<<<<<<<<<<< @@ -13975,11 +13961,11 @@ static void __pyx_f_9pywrapfst_19SymbolTableIterator_reset(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1200, __pyx_L1_error) + __PYX_ERR(0, 1201, __pyx_L1_error) } __pyx_v_self->_siter.get()->Reset(); - /* "pywrapfst.pyx":1194 + /* "pywrapfst.pyx":1195 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -14019,7 +14005,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_12reset(struct __pyx_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reset", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19SymbolTableIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19SymbolTableIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14036,7 +14022,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_12reset(struct __pyx_ return __pyx_r; } -/* "pywrapfst.pyx":1202 +/* "pywrapfst.pyx":1203 * self._siter.get().Reset() * * cpdef string symbol(self): # <<<<<<<<<<<<<< @@ -14058,13 +14044,12 @@ static std::string __pyx_f_9pywrapfst_19SymbolTableIterator_symbol(struct __pyx_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19SymbolTableIterator_15symbol)) { __Pyx_INCREF(__pyx_t_1); @@ -14080,29 +14065,29 @@ static std::string __pyx_f_9pywrapfst_19SymbolTableIterator_symbol(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1213 + /* "pywrapfst.pyx":1214 * A symbol string. * """ * return self._siter.get().Symbol() # <<<<<<<<<<<<<< @@ -14111,12 +14096,12 @@ static std::string __pyx_f_9pywrapfst_19SymbolTableIterator_symbol(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1213, __pyx_L1_error) + __PYX_ERR(0, 1214, __pyx_L1_error) } __pyx_r = __pyx_v_self->_siter.get()->Symbol(); goto __pyx_L0; - /* "pywrapfst.pyx":1202 + /* "pywrapfst.pyx":1203 * self._siter.get().Reset() * * cpdef string symbol(self): # <<<<<<<<<<<<<< @@ -14157,7 +14142,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_14symbol(struct __pyx PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("symbol", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_19SymbolTableIterator_symbol(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_19SymbolTableIterator_symbol(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14174,7 +14159,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_14symbol(struct __pyx return __pyx_r; } -/* "pywrapfst.pyx":1215 +/* "pywrapfst.pyx":1216 * return self._siter.get().Symbol() * * cpdef int64 value(self): # <<<<<<<<<<<<<< @@ -14196,13 +14181,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19SymbolTableIterator_value if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19SymbolTableIterator_17value)) { __Pyx_INCREF(__pyx_t_1); @@ -14218,29 +14202,29 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19SymbolTableIterator_value } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1224 + /* "pywrapfst.pyx":1225 * An integer index. * """ * return self._siter.get().Value() # <<<<<<<<<<<<<< @@ -14249,12 +14233,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_19SymbolTableIterator_value */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1224, __pyx_L1_error) + __PYX_ERR(0, 1225, __pyx_L1_error) } __pyx_r = __pyx_v_self->_siter.get()->Value(); goto __pyx_L0; - /* "pywrapfst.pyx":1215 + /* "pywrapfst.pyx":1216 * return self._siter.get().Symbol() * * cpdef int64 value(self): # <<<<<<<<<<<<<< @@ -14295,7 +14279,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_16value(struct __pyx_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("value", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_19SymbolTableIterator_value(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_19SymbolTableIterator_value(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14419,7 +14403,7 @@ static PyObject *__pyx_pf_9pywrapfst_19SymbolTableIterator_20__setstate_cython__ return __pyx_r; } -/* "pywrapfst.pyx":1253 +/* "pywrapfst.pyx":1254 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -14449,7 +14433,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_9p PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":1254 + /* "pywrapfst.pyx":1255 * * def __repr__(self): * return "".format(id(self)) # <<<<<<<<<<<<<< @@ -14457,9 +14441,9 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_9p * def __init__(self, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_EncodeMapper_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_EncodeMapper_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14474,14 +14458,14 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_9p __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1253 + /* "pywrapfst.pyx":1254 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -14503,7 +14487,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":1256 +/* "pywrapfst.pyx":1257 * return "".format(id(self)) * * def __init__(self, # <<<<<<<<<<<<<< @@ -14558,7 +14542,7 @@ static int __pyx_pw_9pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1256, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1257, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -14574,10 +14558,10 @@ static int __pyx_pw_9pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self, } __pyx_v_arc_type = values[0]; if (values[1]) { - __pyx_v_encode_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_encode_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L3_error) + __pyx_v_encode_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_encode_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L3_error) } else { - /* "pywrapfst.pyx":1258 + /* "pywrapfst.pyx":1259 * def __init__(self, * arc_type=b"standard", * bool encode_labels=False, # <<<<<<<<<<<<<< @@ -14587,10 +14571,10 @@ static int __pyx_pw_9pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self, __pyx_v_encode_labels = ((bool)0); } if (values[2]) { - __pyx_v_encode_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_encode_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L3_error) + __pyx_v_encode_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_encode_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L3_error) } else { - /* "pywrapfst.pyx":1259 + /* "pywrapfst.pyx":1260 * arc_type=b"standard", * bool encode_labels=False, * bool encode_weights=False): # <<<<<<<<<<<<<< @@ -14602,7 +14586,7 @@ static int __pyx_pw_9pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1256, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1257, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.EncodeMapper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14610,7 +14594,7 @@ static int __pyx_pw_9pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self, __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_arc_type, __pyx_v_encode_labels, __pyx_v_encode_weights); - /* "pywrapfst.pyx":1256 + /* "pywrapfst.pyx":1257 * return "".format(id(self)) * * def __init__(self, # <<<<<<<<<<<<<< @@ -14636,7 +14620,7 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":1260 + /* "pywrapfst.pyx":1261 * bool encode_labels=False, * bool encode_weights=False): * cdef uint32 flags = fst.GetEncodeFlags(encode_labels, encode_weights) # <<<<<<<<<<<<<< @@ -14645,7 +14629,7 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap */ __pyx_v_flags = fst::script::GetEncodeFlags(__pyx_v_encode_labels, __pyx_v_encode_weights); - /* "pywrapfst.pyx":1261 + /* "pywrapfst.pyx":1262 * bool encode_weights=False): * cdef uint32 flags = fst.GetEncodeFlags(encode_labels, encode_weights) * self._encoder.reset(new fst.EncodeMapperClass(tostring(arc_type), flags, # <<<<<<<<<<<<<< @@ -14654,11 +14638,11 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1261, __pyx_L1_error) + __PYX_ERR(0, 1262, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error) - /* "pywrapfst.pyx":1262 + /* "pywrapfst.pyx":1263 * cdef uint32 flags = fst.GetEncodeFlags(encode_labels, encode_weights) * self._encoder.reset(new fst.EncodeMapperClass(tostring(arc_type), flags, * fst.ENCODE)) # <<<<<<<<<<<<<< @@ -14667,7 +14651,7 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap */ __pyx_v_self->_encoder.reset(new fst::script::EncodeMapperClass(__pyx_t_1, __pyx_v_flags, fst::ENCODE)); - /* "pywrapfst.pyx":1263 + /* "pywrapfst.pyx":1264 * self._encoder.reset(new fst.EncodeMapperClass(tostring(arc_type), flags, * fst.ENCODE)) * if not self._encoder: # <<<<<<<<<<<<<< @@ -14676,21 +14660,21 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1263, __pyx_L1_error) + __PYX_ERR(0, 1264, __pyx_L1_error) } __pyx_t_2 = ((!__pyx_v_self->_encoder) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":1264 + /* "pywrapfst.pyx":1265 * fst.ENCODE)) * if not self._encoder: * raise FstOpError("Unknown arc type: {!r}".format(arc_type)) # <<<<<<<<<<<<<< * * cpdef string arc_type(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1264, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_arc_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_arc_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -14704,7 +14688,7 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_arc_type) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_arc_type); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1264, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -14720,14 +14704,14 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1264, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1264, __pyx_L1_error) + __PYX_ERR(0, 1265, __pyx_L1_error) - /* "pywrapfst.pyx":1263 + /* "pywrapfst.pyx":1264 * self._encoder.reset(new fst.EncodeMapperClass(tostring(arc_type), flags, * fst.ENCODE)) * if not self._encoder: # <<<<<<<<<<<<<< @@ -14736,7 +14720,7 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap */ } - /* "pywrapfst.pyx":1256 + /* "pywrapfst.pyx":1257 * return "".format(id(self)) * * def __init__(self, # <<<<<<<<<<<<<< @@ -14760,7 +14744,7 @@ static int __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_9pywrap return __pyx_r; } -/* "pywrapfst.pyx":1266 +/* "pywrapfst.pyx":1267 * raise FstOpError("Unknown arc type: {!r}".format(arc_type)) * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -14782,13 +14766,12 @@ static std::string __pyx_f_9pywrapfst_12EncodeMapper_arc_type(struct __pyx_obj_9 if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_5arc_type)) { __Pyx_INCREF(__pyx_t_1); @@ -14804,29 +14787,29 @@ static std::string __pyx_f_9pywrapfst_12EncodeMapper_arc_type(struct __pyx_obj_9 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1272 + /* "pywrapfst.pyx":1273 * Returns a string indicating the arc type. * """ * return self._encoder.get().ArcType() # <<<<<<<<<<<<<< @@ -14835,12 +14818,12 @@ static std::string __pyx_f_9pywrapfst_12EncodeMapper_arc_type(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1272, __pyx_L1_error) + __PYX_ERR(0, 1273, __pyx_L1_error) } __pyx_r = __pyx_v_self->_encoder.get()->ArcType(); goto __pyx_L0; - /* "pywrapfst.pyx":1266 + /* "pywrapfst.pyx":1267 * raise FstOpError("Unknown arc type: {!r}".format(arc_type)) * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -14881,7 +14864,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_4arc_type(struct __pyx_obj_9 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("arc_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14898,7 +14881,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_4arc_type(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":1276 +/* "pywrapfst.pyx":1277 * # Python's equivalent to operator(). * * def __call__(self, Arc arc): # <<<<<<<<<<<<<< @@ -14936,7 +14919,7 @@ static PyObject *__pyx_pw_9pywrapfst_12EncodeMapper_7__call__(PyObject *__pyx_v_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1276, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1277, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -14947,13 +14930,13 @@ static PyObject *__pyx_pw_9pywrapfst_12EncodeMapper_7__call__(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1277, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.EncodeMapper.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1277, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_6__call__(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_arc); /* function exit code */ @@ -14971,7 +14954,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_6__call__(struct __pyx_obj_9 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "pywrapfst.pyx":1292 + /* "pywrapfst.pyx":1293 * FstOpError: Incompatible or invalid weight. * """ * return _init_Arc(self._encoder.get().__call__(deref(arc._arc))) # <<<<<<<<<<<<<< @@ -14981,19 +14964,19 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_6__call__(struct __pyx_obj_9 __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1292, __pyx_L1_error) + __PYX_ERR(0, 1293, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 1292, __pyx_L1_error) + __PYX_ERR(0, 1293, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_encoder.get()->operator()((*__pyx_v_arc->_arc)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_encoder.get()->operator()((*__pyx_v_arc->_arc)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1276 + /* "pywrapfst.pyx":1277 * # Python's equivalent to operator(). * * def __call__(self, Arc arc): # <<<<<<<<<<<<<< @@ -15012,7 +14995,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_6__call__(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":1294 +/* "pywrapfst.pyx":1295 * return _init_Arc(self._encoder.get().__call__(deref(arc._arc))) * * cpdef uint32 flags(self): # <<<<<<<<<<<<<< @@ -15034,13 +15017,12 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_12EncodeMapper_flags(struc if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_9flags)) { __Pyx_INCREF(__pyx_t_1); @@ -15056,29 +15038,29 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_12EncodeMapper_flags(struc } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1300 + /* "pywrapfst.pyx":1301 * Returns the encoder's flags. * """ * return self._encoder.get().Flags() # <<<<<<<<<<<<<< @@ -15087,12 +15069,12 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_12EncodeMapper_flags(struc */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1300, __pyx_L1_error) + __PYX_ERR(0, 1301, __pyx_L1_error) } __pyx_r = __pyx_v_self->_encoder.get()->Flags(); goto __pyx_L0; - /* "pywrapfst.pyx":1294 + /* "pywrapfst.pyx":1295 * return _init_Arc(self._encoder.get().__call__(deref(arc._arc))) * * cpdef uint32 flags(self): # <<<<<<<<<<<<<< @@ -15133,7 +15115,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_8flags(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("flags", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_12EncodeMapper_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_12EncodeMapper_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15150,7 +15132,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_8flags(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":1302 +/* "pywrapfst.pyx":1303 * return self._encoder.get().Flags() * * cpdef _EncodeMapperSymbolTable input_symbols(self): # <<<<<<<<<<<<<< @@ -15173,13 +15155,12 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_11input_symbols)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -15196,29 +15177,29 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTable))))) __PYX_ERR(0, 1302, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTable))))) __PYX_ERR(0, 1303, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1309 + /* "pywrapfst.pyx":1310 * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._encoder.get().InputSymbols()) # <<<<<<<<<<<<<< @@ -15227,10 +15208,10 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1309, __pyx_L1_error) + __PYX_ERR(0, 1310, __pyx_L1_error) } - /* "pywrapfst.pyx":1308 + /* "pywrapfst.pyx":1309 * Returns the encoder's input symbol table, or None if none is present. * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<< @@ -15239,7 +15220,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ __pyx_v_syms = const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_encoder.get()->InputSymbols()); - /* "pywrapfst.pyx":1310 + /* "pywrapfst.pyx":1311 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._encoder.get().InputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -15249,7 +15230,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ __pyx_t_5 = ((__pyx_v_syms == NULL) != 0); if (__pyx_t_5) { - /* "pywrapfst.pyx":1311 + /* "pywrapfst.pyx":1312 * self._encoder.get().InputSymbols()) * if syms == NULL: * return # <<<<<<<<<<<<<< @@ -15260,7 +15241,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ __pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pywrapfst.pyx":1310 + /* "pywrapfst.pyx":1311 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._encoder.get().InputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -15269,7 +15250,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ } - /* "pywrapfst.pyx":1312 + /* "pywrapfst.pyx":1313 * if syms == NULL: * return * return _init_EncodeMapperSymbolTable(syms, self._encoder) # <<<<<<<<<<<<<< @@ -15279,15 +15260,15 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1312, __pyx_L1_error) + __PYX_ERR(0, 1313, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTable(__pyx_v_syms, __pyx_v_self->_encoder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTable(__pyx_v_syms, __pyx_v_self->_encoder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1302 + /* "pywrapfst.pyx":1303 * return self._encoder.get().Flags() * * cpdef _EncodeMapperSymbolTable input_symbols(self): # <<<<<<<<<<<<<< @@ -15329,7 +15310,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_10input_symbols(struct __pyx PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("input_symbols", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15346,7 +15327,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_10input_symbols(struct __pyx return __pyx_r; } -/* "pywrapfst.pyx":1314 +/* "pywrapfst.pyx":1315 * return _init_EncodeMapperSymbolTable(syms, self._encoder) * * cpdef _EncodeMapperSymbolTable output_symbols(self): # <<<<<<<<<<<<<< @@ -15369,13 +15350,12 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_13output_symbols)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -15392,29 +15372,29 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTable))))) __PYX_ERR(0, 1314, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTable))))) __PYX_ERR(0, 1315, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1321 + /* "pywrapfst.pyx":1322 * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._encoder.get().OutputSymbols()) # <<<<<<<<<<<<<< @@ -15423,10 +15403,10 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1321, __pyx_L1_error) + __PYX_ERR(0, 1322, __pyx_L1_error) } - /* "pywrapfst.pyx":1320 + /* "pywrapfst.pyx":1321 * Returns the encoder's output symbol table, or None if none is present. * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<< @@ -15435,7 +15415,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ __pyx_v_syms = const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_encoder.get()->OutputSymbols()); - /* "pywrapfst.pyx":1322 + /* "pywrapfst.pyx":1323 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._encoder.get().OutputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -15445,7 +15425,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ __pyx_t_5 = ((__pyx_v_syms == NULL) != 0); if (__pyx_t_5) { - /* "pywrapfst.pyx":1323 + /* "pywrapfst.pyx":1324 * self._encoder.get().OutputSymbols()) * if syms == NULL: * return # <<<<<<<<<<<<<< @@ -15456,7 +15436,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ __pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pywrapfst.pyx":1322 + /* "pywrapfst.pyx":1323 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._encoder.get().OutputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -15465,7 +15445,7 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ */ } - /* "pywrapfst.pyx":1324 + /* "pywrapfst.pyx":1325 * if syms == NULL: * return * return _init_EncodeMapperSymbolTable(syms, self._encoder) # <<<<<<<<<<<<<< @@ -15475,15 +15455,15 @@ static struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *__pyx_f_9pywrapfst_ __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1324, __pyx_L1_error) + __PYX_ERR(0, 1325, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTable(__pyx_v_syms, __pyx_v_self->_encoder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTable(__pyx_v_syms, __pyx_v_self->_encoder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1314 + /* "pywrapfst.pyx":1315 * return _init_EncodeMapperSymbolTable(syms, self._encoder) * * cpdef _EncodeMapperSymbolTable output_symbols(self): # <<<<<<<<<<<<<< @@ -15525,7 +15505,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_12output_symbols(struct __py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("output_symbols", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15542,7 +15522,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_12output_symbols(struct __py return __pyx_r; } -/* "pywrapfst.pyx":1326 +/* "pywrapfst.pyx":1327 * return _init_EncodeMapperSymbolTable(syms, self._encoder) * * cpdef uint64 properties(self, uint64 mask): # <<<<<<<<<<<<<< @@ -15565,16 +15545,15 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_12EncodeMapper_properties( if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_15properties)) { - __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -15590,29 +15569,29 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_12EncodeMapper_properties( __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1340 + /* "pywrapfst.pyx":1341 * A 64-bit bitmask representing the requested properties. * """ * return self._encoder.get().Properties(mask) # <<<<<<<<<<<<<< @@ -15621,12 +15600,12 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_12EncodeMapper_properties( */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1340, __pyx_L1_error) + __PYX_ERR(0, 1341, __pyx_L1_error) } __pyx_r = __pyx_v_self->_encoder.get()->Properties(__pyx_v_mask); goto __pyx_L0; - /* "pywrapfst.pyx":1326 + /* "pywrapfst.pyx":1327 * return _init_EncodeMapperSymbolTable(syms, self._encoder) * * cpdef uint64 properties(self, uint64 mask): # <<<<<<<<<<<<<< @@ -15657,7 +15636,7 @@ static PyObject *__pyx_pw_9pywrapfst_12EncodeMapper_15properties(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("properties (wrapper)", 0); assert(__pyx_arg_mask); { - __pyx_v_mask = __Pyx_PyInt_As_uint64_t(__pyx_arg_mask); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L3_error) + __pyx_v_mask = __Pyx_PyInt_As_uint64_t(__pyx_arg_mask); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15678,7 +15657,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_14properties(struct __pyx_ob PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("properties", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9pywrapfst_12EncodeMapper_properties(__pyx_v_self, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9pywrapfst_12EncodeMapper_properties(__pyx_v_self, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15695,7 +15674,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_14properties(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":1342 +/* "pywrapfst.pyx":1343 * return self._encoder.get().Properties(mask) * * cpdef void set_input_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -15715,13 +15694,12 @@ static void __pyx_f_9pywrapfst_12EncodeMapper_set_input_symbols(struct __pyx_obj if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_17set_input_symbols)) { __Pyx_INCREF(__pyx_t_1); @@ -15737,27 +15715,27 @@ static void __pyx_f_9pywrapfst_12EncodeMapper_set_input_symbols(struct __pyx_obj } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_syms)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_syms)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1353 + /* "pywrapfst.pyx":1354 * See also: `set_output_symbols`. * """ * self._encoder.get().SetInputSymbols(syms._table) # <<<<<<<<<<<<<< @@ -15766,15 +15744,15 @@ static void __pyx_f_9pywrapfst_12EncodeMapper_set_input_symbols(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1353, __pyx_L1_error) + __PYX_ERR(0, 1354, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1353, __pyx_L1_error) + __PYX_ERR(0, 1354, __pyx_L1_error) } __pyx_v_self->_encoder.get()->SetInputSymbols(__pyx_v_syms->_table); - /* "pywrapfst.pyx":1342 + /* "pywrapfst.pyx":1343 * return self._encoder.get().Properties(mask) * * cpdef void set_input_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -15801,7 +15779,7 @@ static PyObject *__pyx_pw_9pywrapfst_12EncodeMapper_17set_input_symbols(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_input_symbols (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1342, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1343, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_16set_input_symbols(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms)); /* function exit code */ @@ -15819,8 +15797,8 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_16set_input_symbols(struct _ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_input_symbols", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_9pywrapfst_12EncodeMapper_set_input_symbols(__pyx_v_self, __pyx_v_syms, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1342, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_f_9pywrapfst_12EncodeMapper_set_input_symbols(__pyx_v_self, __pyx_v_syms, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1343, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15837,7 +15815,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_16set_input_symbols(struct _ return __pyx_r; } -/* "pywrapfst.pyx":1355 +/* "pywrapfst.pyx":1356 * self._encoder.get().SetInputSymbols(syms._table) * * cpdef void set_output_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -15857,13 +15835,12 @@ static void __pyx_f_9pywrapfst_12EncodeMapper_set_output_symbols(struct __pyx_ob if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_19set_output_symbols)) { __Pyx_INCREF(__pyx_t_1); @@ -15879,27 +15856,27 @@ static void __pyx_f_9pywrapfst_12EncodeMapper_set_output_symbols(struct __pyx_ob } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_syms)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_syms)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1366 + /* "pywrapfst.pyx":1367 * See also: `set_input_symbols`. * """ * self._encoder.get().SetOutputSymbols(syms._table) # <<<<<<<<<<<<<< @@ -15908,15 +15885,15 @@ static void __pyx_f_9pywrapfst_12EncodeMapper_set_output_symbols(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1366, __pyx_L1_error) + __PYX_ERR(0, 1367, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1366, __pyx_L1_error) + __PYX_ERR(0, 1367, __pyx_L1_error) } __pyx_v_self->_encoder.get()->SetOutputSymbols(__pyx_v_syms->_table); - /* "pywrapfst.pyx":1355 + /* "pywrapfst.pyx":1356 * self._encoder.get().SetInputSymbols(syms._table) * * cpdef void set_output_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -15943,7 +15920,7 @@ static PyObject *__pyx_pw_9pywrapfst_12EncodeMapper_19set_output_symbols(PyObjec PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_output_symbols (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1355, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 1356, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_18set_output_symbols(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms)); /* function exit code */ @@ -15961,8 +15938,8 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_18set_output_symbols(struct PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_output_symbols", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_9pywrapfst_12EncodeMapper_set_output_symbols(__pyx_v_self, __pyx_v_syms, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1355, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error) + __pyx_f_9pywrapfst_12EncodeMapper_set_output_symbols(__pyx_v_self, __pyx_v_syms, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15979,7 +15956,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_18set_output_symbols(struct return __pyx_r; } -/* "pywrapfst.pyx":1368 +/* "pywrapfst.pyx":1369 * self._encoder.get().SetOutputSymbols(syms._table) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -16001,13 +15978,12 @@ static std::string __pyx_f_9pywrapfst_12EncodeMapper_weight_type(struct __pyx_ob if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_21weight_type)) { __Pyx_INCREF(__pyx_t_1); @@ -16023,29 +15999,29 @@ static std::string __pyx_f_9pywrapfst_12EncodeMapper_weight_type(struct __pyx_ob } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1374 + /* "pywrapfst.pyx":1375 * Returns a string indicating the weight type. * """ * return self._encoder.get().WeightType() # <<<<<<<<<<<<<< @@ -16054,12 +16030,12 @@ static std::string __pyx_f_9pywrapfst_12EncodeMapper_weight_type(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1374, __pyx_L1_error) + __PYX_ERR(0, 1375, __pyx_L1_error) } __pyx_r = __pyx_v_self->_encoder.get()->WeightType(); goto __pyx_L0; - /* "pywrapfst.pyx":1368 + /* "pywrapfst.pyx":1369 * self._encoder.get().SetOutputSymbols(syms._table) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -16100,7 +16076,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_20weight_type(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("weight_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16224,7 +16200,7 @@ static PyObject *__pyx_pf_9pywrapfst_12EncodeMapper_24__setstate_cython__(CYTHON return __pyx_r; } -/* "pywrapfst.pyx":1400 +/* "pywrapfst.pyx":1401 * * @staticmethod * cdef string _local_render_svg(const string &dot): # <<<<<<<<<<<<<< @@ -16243,77 +16219,77 @@ static std::string __pyx_f_9pywrapfst_4_Fst__local_render_svg(std::string const std::string __pyx_t_5; __Pyx_RefNannySetupContext("_local_render_svg", 0); - /* "pywrapfst.pyx":1401 + /* "pywrapfst.pyx":1402 * @staticmethod * cdef string _local_render_svg(const string &dot): * proc = subprocess.Popen(("dot", "-Tsvg"), # <<<<<<<<<<<<<< * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Popen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Popen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":1402 + /* "pywrapfst.pyx":1403 * cdef string _local_render_svg(const string &dot): * proc = subprocess.Popen(("dot", "-Tsvg"), * stdin=subprocess.PIPE, # <<<<<<<<<<<<<< * stdout=subprocess.PIPE) * return proc.communicate(dot.encode("utf8"))[0] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdin, __pyx_t_4) < 0) __PYX_ERR(0, 1402, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdin, __pyx_t_4) < 0) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pywrapfst.pyx":1403 + /* "pywrapfst.pyx":1404 * proc = subprocess.Popen(("dot", "-Tsvg"), * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) # <<<<<<<<<<<<<< * return proc.communicate(dot.encode("utf8"))[0] * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdout, __pyx_t_3) < 0) __PYX_ERR(0, 1402, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdout, __pyx_t_3) < 0) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pywrapfst.pyx":1401 + /* "pywrapfst.pyx":1402 * @staticmethod * cdef string _local_render_svg(const string &dot): * proc = subprocess.Popen(("dot", "-Tsvg"), # <<<<<<<<<<<<<< * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_proc = __pyx_t_3; __pyx_t_3 = 0; - /* "pywrapfst.pyx":1404 + /* "pywrapfst.pyx":1405 * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) * return proc.communicate(dot.encode("utf8"))[0] # <<<<<<<<<<<<<< * * def _repr_svg_(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_dot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_dot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -16329,22 +16305,22 @@ static std::string __pyx_f_9pywrapfst_4_Fst__local_render_svg(std::string const __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1404, __pyx_L1_error) + __PYX_ERR(0, 1405, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "pywrapfst.pyx":1400 + /* "pywrapfst.pyx":1401 * * @staticmethod * cdef string _local_render_svg(const string &dot): # <<<<<<<<<<<<<< @@ -16366,7 +16342,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst__local_render_svg(std::string const return __pyx_r; } -/* "pywrapfst.pyx":1406 +/* "pywrapfst.pyx":1407 * return proc.communicate(dot.encode("utf8"))[0] * * def _repr_svg_(self): # <<<<<<<<<<<<<< @@ -16415,7 +16391,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_19 = NULL; __Pyx_RefNannySetupContext("_repr_svg_", 0); - /* "pywrapfst.pyx":1416 + /* "pywrapfst.pyx":1417 * """ * cdef stringstream sstrm * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == # <<<<<<<<<<<<<< @@ -16424,10 +16400,10 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1416, __pyx_L1_error) + __PYX_ERR(0, 1417, __pyx_L1_error) } - /* "pywrapfst.pyx":1417 + /* "pywrapfst.pyx":1418 * cdef stringstream sstrm * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == * fst.kAcceptor) # <<<<<<<<<<<<<< @@ -16436,7 +16412,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs */ __pyx_v_acceptor = (__pyx_v_self->_fst.get()->Properties(fst::kAcceptor, 1) == fst::kAcceptor); - /* "pywrapfst.pyx":1418 + /* "pywrapfst.pyx":1419 * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == * fst.kAcceptor) * fst.DrawFst(deref(self._fst), self._fst.get().InputSymbols(), # <<<<<<<<<<<<<< @@ -16445,14 +16421,14 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1418, __pyx_L1_error) + __PYX_ERR(0, 1419, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1418, __pyx_L1_error) + __PYX_ERR(0, 1419, __pyx_L1_error) } - /* "pywrapfst.pyx":1419 + /* "pywrapfst.pyx":1420 * fst.kAcceptor) * fst.DrawFst(deref(self._fst), self._fst.get().InputSymbols(), * self._fst.get().OutputSymbols(), NULL, acceptor, # <<<<<<<<<<<<<< @@ -16461,10 +16437,10 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1419, __pyx_L1_error) + __PYX_ERR(0, 1420, __pyx_L1_error) } - /* "pywrapfst.pyx":1418 + /* "pywrapfst.pyx":1419 * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == * fst.kAcceptor) * fst.DrawFst(deref(self._fst), self._fst.get().InputSymbols(), # <<<<<<<<<<<<<< @@ -16473,7 +16449,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs */ fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_v_self->_fst.get()->InputSymbols(), __pyx_v_self->_fst.get()->OutputSymbols(), NULL, __pyx_v_acceptor, __pyx_k__10, 8.5, 11.0, 1, 0, 0.4, 0.25, 14, 5, __pyx_k_g, 0, (&__pyx_v_sstrm), __pyx_k_pywrapfst); - /* "pywrapfst.pyx":1422 + /* "pywrapfst.pyx":1423 * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, b"g", False, * addr(sstrm), b"") * try: # <<<<<<<<<<<<<< @@ -16489,7 +16465,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "pywrapfst.pyx":1423 + /* "pywrapfst.pyx":1424 * addr(sstrm), b"") * try: * return _Fst._local_render_svg(sstrm.str()) # <<<<<<<<<<<<<< @@ -16497,13 +16473,13 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs * logging.error("Dot rendering failed: %s", e) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst__local_render_svg(__pyx_v_sstrm.str())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L3_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst__local_render_svg(__pyx_v_sstrm.str())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "pywrapfst.pyx":1422 + /* "pywrapfst.pyx":1423 * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, b"g", False, * addr(sstrm), b"") * try: # <<<<<<<<<<<<<< @@ -16514,7 +16490,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pywrapfst.pyx":1424 + /* "pywrapfst.pyx":1425 * try: * return _Fst._local_render_svg(sstrm.str()) * except Exception as e: # <<<<<<<<<<<<<< @@ -16524,7 +16500,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_5) { __Pyx_AddTraceback("pywrapfst._Fst._repr_svg_", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1424, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1425, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); @@ -16532,16 +16508,16 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __pyx_v_e = __pyx_t_6; /*try:*/ { - /* "pywrapfst.pyx":1425 + /* "pywrapfst.pyx":1426 * return _Fst._local_render_svg(sstrm.str()) * except Exception as e: * logging.error("Dot rendering failed: %s", e) # <<<<<<<<<<<<<< * * def __init__(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_logging); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1425, __pyx_L14_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_logging); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1426, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1425, __pyx_L14_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1426, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -16559,7 +16535,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_u_Dot_rendering_failed_s, __pyx_v_e}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1425, __pyx_L14_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1426, __pyx_L14_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -16567,13 +16543,13 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_u_Dot_rendering_failed_s, __pyx_v_e}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1425, __pyx_L14_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1426, __pyx_L14_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1425, __pyx_L14_error) + __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1426, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -16584,7 +16560,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __Pyx_INCREF(__pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_5, __pyx_v_e); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1425, __pyx_L14_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1426, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -16592,7 +16568,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - /* "pywrapfst.pyx":1424 + /* "pywrapfst.pyx":1425 * try: * return _Fst._local_render_svg(sstrm.str()) * except Exception as e: # <<<<<<<<<<<<<< @@ -16610,10 +16586,10 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); @@ -16651,7 +16627,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "pywrapfst.pyx":1422 + /* "pywrapfst.pyx":1423 * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, b"g", False, * addr(sstrm), b"") * try: # <<<<<<<<<<<<<< @@ -16676,7 +16652,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); } - /* "pywrapfst.pyx":1406 + /* "pywrapfst.pyx":1407 * return proc.communicate(dot.encode("utf8"))[0] * * def _repr_svg_(self): # <<<<<<<<<<<<<< @@ -16704,7 +16680,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst__repr_svg_(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":1427 +/* "pywrapfst.pyx":1428 * logging.error("Dot rendering failed: %s", e) * * def __init__(self): # <<<<<<<<<<<<<< @@ -16739,28 +16715,28 @@ static int __pyx_pf_9pywrapfst_4_Fst_2__init__(struct __pyx_obj_9pywrapfst__Fst PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":1428 + /* "pywrapfst.pyx":1429 * * def __init__(self): * raise FstDeletedConstructorError( # <<<<<<<<<<<<<< * "Cannot construct {}".format(self.__class__.__name__)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":1429 + /* "pywrapfst.pyx":1430 * def __init__(self): * raise FstDeletedConstructorError( * "Cannot construct {}".format(self.__class__.__name__)) # <<<<<<<<<<<<<< * * # Registers the class for pickling; must be repeated in any subclass which */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -16776,7 +16752,7 @@ static int __pyx_pf_9pywrapfst_4_Fst_2__init__(struct __pyx_obj_9pywrapfst__Fst __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -16792,14 +16768,14 @@ static int __pyx_pf_9pywrapfst_4_Fst_2__init__(struct __pyx_obj_9pywrapfst__Fst __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1428, __pyx_L1_error) + __PYX_ERR(0, 1429, __pyx_L1_error) - /* "pywrapfst.pyx":1427 + /* "pywrapfst.pyx":1428 * logging.error("Dot rendering failed: %s", e) * * def __init__(self): # <<<<<<<<<<<<<< @@ -16821,7 +16797,7 @@ static int __pyx_pf_9pywrapfst_4_Fst_2__init__(struct __pyx_obj_9pywrapfst__Fst return __pyx_r; } -/* "pywrapfst.pyx":1434 +/* "pywrapfst.pyx":1435 * # can't be derived by _init_XFst. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -16850,7 +16826,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_4__reduce__(struct __pyx_obj_9pywrapf PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "pywrapfst.pyx":1435 + /* "pywrapfst.pyx":1436 * * def __reduce__(self): * return (_read_Fst_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<< @@ -16858,20 +16834,20 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_4__reduce__(struct __pyx_obj_9pywrapf * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_Fst_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_Fst_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string"); - __PYX_ERR(0, 1435, __pyx_L1_error) + __PYX_ERR(0, 1436, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -16883,7 +16859,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_4__reduce__(struct __pyx_obj_9pywrapf __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1434 + /* "pywrapfst.pyx":1435 * # can't be derived by _init_XFst. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -16904,7 +16880,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_4__reduce__(struct __pyx_obj_9pywrapf return __pyx_r; } -/* "pywrapfst.pyx":1437 +/* "pywrapfst.pyx":1438 * return (_read_Fst_from_string, (self.write_to_string(),)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16937,7 +16913,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":1438 + /* "pywrapfst.pyx":1439 * * def __repr__(self): * return "<{} Fst at 0x{:x}>".format(self.fst_type(), id(self)) # <<<<<<<<<<<<<< @@ -16945,15 +16921,15 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst * def __str__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Fst_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Fst_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "fst_type"); - __PYX_ERR(0, 1438, __pyx_L1_error) + __PYX_ERR(0, 1439, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_self->__pyx_vtab)->fst_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_self->__pyx_vtab)->fst_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -16970,7 +16946,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -16980,7 +16956,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -16988,7 +16964,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -16999,7 +16975,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -17008,7 +16984,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1437 + /* "pywrapfst.pyx":1438 * return (_read_Fst_from_string, (self.write_to_string(),)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -17032,7 +17008,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_6__repr__(struct __pyx_obj_9pywrapfst return __pyx_r; } -/* "pywrapfst.pyx":1440 +/* "pywrapfst.pyx":1441 * return "<{} Fst at 0x{:x}>".format(self.fst_type(), id(self)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -17059,7 +17035,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_8__str__(struct __pyx_obj_9pywrapfst_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "pywrapfst.pyx":1441 + /* "pywrapfst.pyx":1442 * * def __str__(self): * return self.text() # <<<<<<<<<<<<<< @@ -17069,15 +17045,15 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_8__str__(struct __pyx_obj_9pywrapfst_ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "text"); - __PYX_ERR(0, 1441, __pyx_L1_error) + __PYX_ERR(0, 1442, __pyx_L1_error) } - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_self->__pyx_vtab)->text(__pyx_v_self, 0, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_self->__pyx_vtab)->text(__pyx_v_self, 0, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1440 + /* "pywrapfst.pyx":1441 * return "<{} Fst at 0x{:x}>".format(self.fst_type(), id(self)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -17096,7 +17072,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_8__str__(struct __pyx_obj_9pywrapfst_ return __pyx_r; } -/* "pywrapfst.pyx":1443 +/* "pywrapfst.pyx":1444 * return self.text() * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -17118,13 +17094,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_arc_type(struct __pyx_obj_9pywrapfst if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_11arc_type)) { __Pyx_INCREF(__pyx_t_1); @@ -17140,29 +17115,29 @@ static std::string __pyx_f_9pywrapfst_4_Fst_arc_type(struct __pyx_obj_9pywrapfst } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1449 + /* "pywrapfst.pyx":1450 * Returns a string indicating the arc type. * """ * return self._fst.get().ArcType() # <<<<<<<<<<<<<< @@ -17171,12 +17146,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_arc_type(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1449, __pyx_L1_error) + __PYX_ERR(0, 1450, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->ArcType(); goto __pyx_L0; - /* "pywrapfst.pyx":1443 + /* "pywrapfst.pyx":1444 * return self.text() * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -17217,7 +17192,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_10arc_type(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("arc_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17234,7 +17209,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_10arc_type(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":1451 +/* "pywrapfst.pyx":1452 * return self._fst.get().ArcType() * * cpdef ArcIterator arcs(self, int64 state): # <<<<<<<<<<<<<< @@ -17256,17 +17231,16 @@ static struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_f_9pywrapfst_4_Fst_arcs(st if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_13arcs)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -17282,29 +17256,29 @@ static struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_f_9pywrapfst_4_Fst_arcs(st __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_ArcIterator))))) __PYX_ERR(0, 1451, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_ArcIterator))))) __PYX_ERR(0, 1452, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1465 + /* "pywrapfst.pyx":1466 * See also: `mutable_arcs`, `states`. * """ * return ArcIterator(self, state) # <<<<<<<<<<<<<< @@ -17312,9 +17286,9 @@ static struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_f_9pywrapfst_4_Fst_arcs(st * cpdef _Fst copy(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -17322,14 +17296,14 @@ static struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_f_9pywrapfst_4_Fst_arcs(st __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_ArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_ArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1451 + /* "pywrapfst.pyx":1452 * return self._fst.get().ArcType() * * cpdef ArcIterator arcs(self, int64 state): # <<<<<<<<<<<<<< @@ -17361,7 +17335,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_13arcs(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("arcs (wrapper)", 0); assert(__pyx_arg_state); { - __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1452, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17382,7 +17356,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_12arcs(struct __pyx_obj_9pywrapfst__F PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("arcs", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17399,7 +17373,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_12arcs(struct __pyx_obj_9pywrapfst__F return __pyx_r; } -/* "pywrapfst.pyx":1467 +/* "pywrapfst.pyx":1468 * return ArcIterator(self, state) * * cpdef _Fst copy(self): # <<<<<<<<<<<<<< @@ -17420,13 +17394,12 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_4_Fst_copy(struct __ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_15copy)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -17443,29 +17416,29 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_4_Fst_copy(struct __ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1467, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 1467, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 1468, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1473 + /* "pywrapfst.pyx":1474 * Makes a copy of the FST. * """ * return _init_XFst(new fst.FstClass(deref(self._fst))) # <<<<<<<<<<<<<< @@ -17475,15 +17448,15 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_4_Fst_copy(struct __ __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1473, __pyx_L1_error) + __PYX_ERR(0, 1474, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_fst)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_fst)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1467 + /* "pywrapfst.pyx":1468 * return ArcIterator(self, state) * * cpdef _Fst copy(self): # <<<<<<<<<<<<<< @@ -17525,7 +17498,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_14copy(struct __pyx_obj_9pywrapfst__F PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17542,7 +17515,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_14copy(struct __pyx_obj_9pywrapfst__F return __pyx_r; } -/* "pywrapfst.pyx":1475 +/* "pywrapfst.pyx":1476 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -17553,7 +17526,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_14copy(struct __pyx_obj_9pywrapfst__F static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, PyObject *__pyx_v_filename, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_4_Fst_draw *__pyx_optional_args) { - /* "pywrapfst.pyx":1477 + /* "pywrapfst.pyx":1478 * cpdef void draw(self, * filename, * _SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -17562,7 +17535,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":1478 + /* "pywrapfst.pyx":1479 * filename, * _SymbolTable isymbols=None, * _SymbolTable osymbols=None, # <<<<<<<<<<<<<< @@ -17571,7 +17544,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":1479 + /* "pywrapfst.pyx":1480 * _SymbolTable isymbols=None, * _SymbolTable osymbols=None, * SymbolTable ssymbols=None, # <<<<<<<<<<<<<< @@ -17580,7 +17553,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None); - /* "pywrapfst.pyx":1480 + /* "pywrapfst.pyx":1481 * _SymbolTable osymbols=None, * SymbolTable ssymbols=None, * bool acceptor=False, # <<<<<<<<<<<<<< @@ -17592,7 +17565,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py double __pyx_v_width = ((double)8.5); double __pyx_v_height = ((double)11.0); - /* "pywrapfst.pyx":1484 + /* "pywrapfst.pyx":1485 * double width=8.5, * double height=11, * bool portrait=False, # <<<<<<<<<<<<<< @@ -17601,7 +17574,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ bool __pyx_v_portrait = ((bool)0); - /* "pywrapfst.pyx":1485 + /* "pywrapfst.pyx":1486 * double height=11, * bool portrait=False, * bool vertical=False, # <<<<<<<<<<<<<< @@ -17615,7 +17588,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py __pyx_t_10basictypes_int32 __pyx_v_precision = ((__pyx_t_10basictypes_int32)5); PyObject *__pyx_v_float_format = ((PyObject *)__pyx_n_b_g); - /* "pywrapfst.pyx":1491 + /* "pywrapfst.pyx":1492 * int32 precision=5, * float_format=b"g", * bool show_weight_one=False): # <<<<<<<<<<<<<< @@ -17699,7 +17672,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py } } - /* "pywrapfst.pyx":1475 + /* "pywrapfst.pyx":1476 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -17710,34 +17683,33 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_17draw)) { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_portrait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_portrait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_vertical); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_vertical); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_ranksep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_ranksep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyFloat_FromDouble(__pyx_v_nodesep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_nodesep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_fontsize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_fontsize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_precision); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_precision); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = __pyx_t_1; __pyx_t_14 = NULL; @@ -17755,7 +17727,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[17] = {__pyx_t_14, __pyx_v_filename, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_v_title, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_v_float_format, __pyx_t_12}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17773,7 +17745,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[17] = {__pyx_t_14, __pyx_v_filename, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_v_title, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_v_float_format, __pyx_t_12}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17789,7 +17761,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py } else #endif { - __pyx_t_16 = PyTuple_New(16+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(16+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL; @@ -17842,7 +17814,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } @@ -17851,30 +17823,30 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1525 + /* "pywrapfst.pyx":1526 * See also: `text`. * """ * cdef string filename_string = tostring(filename) # <<<<<<<<<<<<<< * cdef unique_ptr[ofstream] ostrm * ostrm.reset(new ofstream(filename_string)) */ - __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1526, __pyx_L1_error) __pyx_v_filename_string = __pyx_t_17; - /* "pywrapfst.pyx":1527 + /* "pywrapfst.pyx":1528 * cdef string filename_string = tostring(filename) * cdef unique_ptr[ofstream] ostrm * ostrm.reset(new ofstream(filename_string)) # <<<<<<<<<<<<<< @@ -17883,7 +17855,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ __pyx_v_ostrm.reset(new std::ofstream(__pyx_v_filename_string)); - /* "pywrapfst.pyx":1528 + /* "pywrapfst.pyx":1529 * cdef unique_ptr[ofstream] ostrm * ostrm.reset(new ofstream(filename_string)) * cdef fst.SymbolTable *ssymbols_ptr = NULL # <<<<<<<<<<<<<< @@ -17892,7 +17864,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ __pyx_v_ssymbols_ptr = NULL; - /* "pywrapfst.pyx":1529 + /* "pywrapfst.pyx":1530 * ostrm.reset(new ofstream(filename_string)) * cdef fst.SymbolTable *ssymbols_ptr = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -17903,7 +17875,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py __pyx_t_19 = (__pyx_t_18 != 0); if (__pyx_t_19) { - /* "pywrapfst.pyx":1530 + /* "pywrapfst.pyx":1531 * cdef fst.SymbolTable *ssymbols_ptr = NULL * if ssymbols is not None: * ssymbols_ptr = ssymbols._table # <<<<<<<<<<<<<< @@ -17912,12 +17884,12 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1530, __pyx_L1_error) + __PYX_ERR(0, 1531, __pyx_L1_error) } __pyx_t_20 = __pyx_v_ssymbols->__pyx_base.__pyx_base._table; __pyx_v_ssymbols_ptr = __pyx_t_20; - /* "pywrapfst.pyx":1529 + /* "pywrapfst.pyx":1530 * ostrm.reset(new ofstream(filename_string)) * cdef fst.SymbolTable *ssymbols_ptr = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -17926,7 +17898,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ } - /* "pywrapfst.pyx":1531 + /* "pywrapfst.pyx":1532 * if ssymbols is not None: * ssymbols_ptr = ssymbols._table * fst.DrawFst(deref(self._fst), # <<<<<<<<<<<<<< @@ -17935,10 +17907,10 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1531, __pyx_L1_error) + __PYX_ERR(0, 1532, __pyx_L1_error) } - /* "pywrapfst.pyx":1532 + /* "pywrapfst.pyx":1533 * ssymbols_ptr = ssymbols._table * fst.DrawFst(deref(self._fst), * self._fst.get().InputSymbols() if isymbols is None # <<<<<<<<<<<<<< @@ -17949,12 +17921,12 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py if ((__pyx_t_19 != 0)) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1532, __pyx_L1_error) + __PYX_ERR(0, 1533, __pyx_L1_error) } __pyx_t_21 = __pyx_v_self->_fst.get()->InputSymbols(); } else { - /* "pywrapfst.pyx":1533 + /* "pywrapfst.pyx":1534 * fst.DrawFst(deref(self._fst), * self._fst.get().InputSymbols() if isymbols is None * else isymbols._table, # <<<<<<<<<<<<<< @@ -17963,12 +17935,12 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1533, __pyx_L1_error) + __PYX_ERR(0, 1534, __pyx_L1_error) } __pyx_t_21 = __pyx_v_isymbols->_table; } - /* "pywrapfst.pyx":1534 + /* "pywrapfst.pyx":1535 * self._fst.get().InputSymbols() if isymbols is None * else isymbols._table, * self._fst.get().OutputSymbols() if osymbols is None # <<<<<<<<<<<<<< @@ -17979,12 +17951,12 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py if ((__pyx_t_19 != 0)) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1534, __pyx_L1_error) + __PYX_ERR(0, 1535, __pyx_L1_error) } __pyx_t_22 = __pyx_v_self->_fst.get()->OutputSymbols(); } else { - /* "pywrapfst.pyx":1535 + /* "pywrapfst.pyx":1536 * else isymbols._table, * self._fst.get().OutputSymbols() if osymbols is None * else osymbols._table, # <<<<<<<<<<<<<< @@ -17993,30 +17965,30 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1535, __pyx_L1_error) + __PYX_ERR(0, 1536, __pyx_L1_error) } __pyx_t_22 = __pyx_v_osymbols->_table; } - /* "pywrapfst.pyx":1536 + /* "pywrapfst.pyx":1537 * self._fst.get().OutputSymbols() if osymbols is None * else osymbols._table, * ssymbols_ptr, acceptor, tostring(title), width, height, portrait, # <<<<<<<<<<<<<< * vertical, ranksep, nodesep, fontsize, precision, * tostring(float_format), show_weight_one, ostrm.get(), */ - __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_title); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1536, __pyx_L1_error) + __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_title); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error) - /* "pywrapfst.pyx":1538 + /* "pywrapfst.pyx":1539 * ssymbols_ptr, acceptor, tostring(title), width, height, portrait, * vertical, ranksep, nodesep, fontsize, precision, * tostring(float_format), show_weight_one, ostrm.get(), # <<<<<<<<<<<<<< * filename_string) * */ - __pyx_t_23 = __pyx_f_9pywrapfst_tostring(__pyx_v_float_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_23 = __pyx_f_9pywrapfst_tostring(__pyx_v_float_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1539, __pyx_L1_error) - /* "pywrapfst.pyx":1531 + /* "pywrapfst.pyx":1532 * if ssymbols is not None: * ssymbols_ptr = ssymbols._table * fst.DrawFst(deref(self._fst), # <<<<<<<<<<<<<< @@ -18025,7 +17997,7 @@ static void __pyx_f_9pywrapfst_4_Fst_draw(struct __pyx_obj_9pywrapfst__Fst *__py */ fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_t_21, __pyx_t_22, __pyx_v_ssymbols_ptr, __pyx_v_acceptor, __pyx_t_17, __pyx_v_width, __pyx_v_height, __pyx_v_portrait, __pyx_v_vertical, __pyx_v_ranksep, __pyx_v_nodesep, __pyx_v_fontsize, __pyx_v_precision, __pyx_t_23, __pyx_v_show_weight_one, __pyx_v_ostrm.get(), __pyx_v_filename_string); - /* "pywrapfst.pyx":1475 + /* "pywrapfst.pyx":1476 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -18083,7 +18055,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_isymbols,&__pyx_n_s_osymbols,&__pyx_n_s_ssymbols,&__pyx_n_s_acceptor,&__pyx_n_s_title,&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_portrait,&__pyx_n_s_vertical,&__pyx_n_s_ranksep,&__pyx_n_s_nodesep,&__pyx_n_s_fontsize,&__pyx_n_s_precision,&__pyx_n_s_float_format,&__pyx_n_s_show_weight_one,0}; PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - /* "pywrapfst.pyx":1477 + /* "pywrapfst.pyx":1478 * cpdef void draw(self, * filename, * _SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -18092,7 +18064,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje */ values[1] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":1478 + /* "pywrapfst.pyx":1479 * filename, * _SymbolTable isymbols=None, * _SymbolTable osymbols=None, # <<<<<<<<<<<<<< @@ -18101,7 +18073,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje */ values[2] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":1479 + /* "pywrapfst.pyx":1480 * _SymbolTable isymbols=None, * _SymbolTable osymbols=None, * SymbolTable ssymbols=None, # <<<<<<<<<<<<<< @@ -18247,7 +18219,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1475, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1476, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -18291,10 +18263,10 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje __pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[2]); __pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTable *)values[3]); if (values[4]) { - __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1480, __pyx_L3_error) + __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1481, __pyx_L3_error) } else { - /* "pywrapfst.pyx":1480 + /* "pywrapfst.pyx":1481 * _SymbolTable osymbols=None, * SymbolTable ssymbols=None, * bool acceptor=False, # <<<<<<<<<<<<<< @@ -18305,20 +18277,20 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje } __pyx_v_title = values[5]; if (values[6]) { - __pyx_v_width = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_width == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1482, __pyx_L3_error) + __pyx_v_width = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_width == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L3_error) } else { __pyx_v_width = ((double)8.5); } if (values[7]) { - __pyx_v_height = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_height == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L3_error) + __pyx_v_height = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_height == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1484, __pyx_L3_error) } else { __pyx_v_height = ((double)11.0); } if (values[8]) { - __pyx_v_portrait = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_portrait == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1484, __pyx_L3_error) + __pyx_v_portrait = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_portrait == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1485, __pyx_L3_error) } else { - /* "pywrapfst.pyx":1484 + /* "pywrapfst.pyx":1485 * double width=8.5, * double height=11, * bool portrait=False, # <<<<<<<<<<<<<< @@ -18328,10 +18300,10 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje __pyx_v_portrait = ((bool)0); } if (values[9]) { - __pyx_v_vertical = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_vertical == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1485, __pyx_L3_error) + __pyx_v_vertical = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_vertical == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1486, __pyx_L3_error) } else { - /* "pywrapfst.pyx":1485 + /* "pywrapfst.pyx":1486 * double height=11, * bool portrait=False, * bool vertical=False, # <<<<<<<<<<<<<< @@ -18341,31 +18313,31 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje __pyx_v_vertical = ((bool)0); } if (values[10]) { - __pyx_v_ranksep = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_ranksep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1486, __pyx_L3_error) + __pyx_v_ranksep = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_ranksep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1487, __pyx_L3_error) } else { __pyx_v_ranksep = ((double)0.4); } if (values[11]) { - __pyx_v_nodesep = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_nodesep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1487, __pyx_L3_error) + __pyx_v_nodesep = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_nodesep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1488, __pyx_L3_error) } else { __pyx_v_nodesep = ((double)0.25); } if (values[12]) { - __pyx_v_fontsize = __Pyx_PyInt_As_int32_t(values[12]); if (unlikely((__pyx_v_fontsize == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1488, __pyx_L3_error) + __pyx_v_fontsize = __Pyx_PyInt_As_int32_t(values[12]); if (unlikely((__pyx_v_fontsize == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L3_error) } else { __pyx_v_fontsize = ((__pyx_t_10basictypes_int32)14); } if (values[13]) { - __pyx_v_precision = __Pyx_PyInt_As_int32_t(values[13]); if (unlikely((__pyx_v_precision == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L3_error) + __pyx_v_precision = __Pyx_PyInt_As_int32_t(values[13]); if (unlikely((__pyx_v_precision == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1490, __pyx_L3_error) } else { __pyx_v_precision = ((__pyx_t_10basictypes_int32)5); } __pyx_v_float_format = values[14]; if (values[15]) { - __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1491, __pyx_L3_error) + __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1492, __pyx_L3_error) } else { - /* "pywrapfst.pyx":1491 + /* "pywrapfst.pyx":1492 * int32 precision=5, * float_format=b"g", * bool show_weight_one=False): # <<<<<<<<<<<<<< @@ -18377,18 +18349,18 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_17draw(PyObject *__pyx_v_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1475, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1476, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._Fst.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 1477, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 1478, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 1479, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 1478, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 1479, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 1480, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_4_Fst_16draw(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), __pyx_v_filename, __pyx_v_isymbols, __pyx_v_osymbols, __pyx_v_ssymbols, __pyx_v_acceptor, __pyx_v_title, __pyx_v_width, __pyx_v_height, __pyx_v_portrait, __pyx_v_vertical, __pyx_v_ranksep, __pyx_v_nodesep, __pyx_v_fontsize, __pyx_v_precision, __pyx_v_float_format, __pyx_v_show_weight_one); - /* "pywrapfst.pyx":1475 + /* "pywrapfst.pyx":1476 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -18429,7 +18401,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_16draw(struct __pyx_obj_9pywrapfst__F __pyx_t_1.float_format = __pyx_v_float_format; __pyx_t_1.show_weight_one = __pyx_v_show_weight_one; __pyx_vtabptr_9pywrapfst__Fst->draw(__pyx_v_self, __pyx_v_filename, 1, &__pyx_t_1); - __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -18446,7 +18418,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_16draw(struct __pyx_obj_9pywrapfst__F return __pyx_r; } -/* "pywrapfst.pyx":1541 +/* "pywrapfst.pyx":1542 * filename_string) * * cpdef Weight final(self, int64 state): # <<<<<<<<<<<<<< @@ -18470,17 +18442,16 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_4_Fst_final(struct if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_final); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_final); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_19final)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -18496,41 +18467,41 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_4_Fst_final(struct __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 1541, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 1542, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1556 + /* "pywrapfst.pyx":1557 * FstIndexError: State index out of range. * """ * cdef Weight weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not weight.member(): */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":1557 + /* "pywrapfst.pyx":1558 * """ * cdef Weight weight = Weight.__new__(Weight) * weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) # <<<<<<<<<<<<<< @@ -18539,15 +18510,15 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_4_Fst_final(struct */ if (unlikely(((PyObject *)__pyx_v_weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 1557, __pyx_L1_error) + __PYX_ERR(0, 1558, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1557, __pyx_L1_error) + __PYX_ERR(0, 1558, __pyx_L1_error) } __pyx_v_weight->_weight.reset(new fst::script::WeightClass(__pyx_v_self->_fst.get()->Final(__pyx_v_state))); - /* "pywrapfst.pyx":1558 + /* "pywrapfst.pyx":1559 * cdef Weight weight = Weight.__new__(Weight) * weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not weight.member(): # <<<<<<<<<<<<<< @@ -18556,19 +18527,19 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_4_Fst_final(struct */ if (unlikely(((PyObject *)__pyx_v_weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "member"); - __PYX_ERR(0, 1558, __pyx_L1_error) + __PYX_ERR(0, 1559, __pyx_L1_error) } __pyx_t_6 = ((!(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_weight->__pyx_vtab)->member(__pyx_v_weight, 0) != 0)) != 0); if (unlikely(__pyx_t_6)) { - /* "pywrapfst.pyx":1559 + /* "pywrapfst.pyx":1560 * weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not weight.member(): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return weight * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -18582,14 +18553,14 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_4_Fst_final(struct } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1559, __pyx_L1_error) + __PYX_ERR(0, 1560, __pyx_L1_error) - /* "pywrapfst.pyx":1558 + /* "pywrapfst.pyx":1559 * cdef Weight weight = Weight.__new__(Weight) * weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not weight.member(): # <<<<<<<<<<<<<< @@ -18598,7 +18569,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_4_Fst_final(struct */ } - /* "pywrapfst.pyx":1560 + /* "pywrapfst.pyx":1561 * if not weight.member(): * raise FstIndexError("State index out of range") * return weight # <<<<<<<<<<<<<< @@ -18610,7 +18581,7 @@ static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_4_Fst_final(struct __pyx_r = __pyx_v_weight; goto __pyx_L0; - /* "pywrapfst.pyx":1541 + /* "pywrapfst.pyx":1542 * filename_string) * * cpdef Weight final(self, int64 state): # <<<<<<<<<<<<<< @@ -18643,7 +18614,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_19final(PyObject *__pyx_v_self, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("final (wrapper)", 0); assert(__pyx_arg_state); { - __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1541, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -18664,7 +18635,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_18final(struct __pyx_obj_9pywrapfst__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("final", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18681,7 +18652,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_18final(struct __pyx_obj_9pywrapfst__ return __pyx_r; } -/* "pywrapfst.pyx":1562 +/* "pywrapfst.pyx":1563 * return weight * * cpdef string fst_type(self): # <<<<<<<<<<<<<< @@ -18703,13 +18674,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_fst_type(struct __pyx_obj_9pywrapfst if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_21fst_type)) { __Pyx_INCREF(__pyx_t_1); @@ -18725,29 +18695,29 @@ static std::string __pyx_f_9pywrapfst_4_Fst_fst_type(struct __pyx_obj_9pywrapfst } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1568 + /* "pywrapfst.pyx":1569 * Returns a string indicating the FST type. * """ * return self._fst.get().FstType() # <<<<<<<<<<<<<< @@ -18756,12 +18726,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_fst_type(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1568, __pyx_L1_error) + __PYX_ERR(0, 1569, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->FstType(); goto __pyx_L0; - /* "pywrapfst.pyx":1562 + /* "pywrapfst.pyx":1563 * return weight * * cpdef string fst_type(self): # <<<<<<<<<<<<<< @@ -18802,7 +18772,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_20fst_type(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("fst_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_fst_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_fst_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18819,7 +18789,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_20fst_type(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":1570 +/* "pywrapfst.pyx":1571 * return self._fst.get().FstType() * * cpdef _FstSymbolTable input_symbols(self): # <<<<<<<<<<<<<< @@ -18842,13 +18812,12 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_23input_symbols)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -18865,29 +18834,29 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTable))))) __PYX_ERR(0, 1570, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTable))))) __PYX_ERR(0, 1571, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1579 + /* "pywrapfst.pyx":1580 * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._fst.get().InputSymbols()) # <<<<<<<<<<<<<< @@ -18896,10 +18865,10 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1579, __pyx_L1_error) + __PYX_ERR(0, 1580, __pyx_L1_error) } - /* "pywrapfst.pyx":1578 + /* "pywrapfst.pyx":1579 * See also: `input_symbols`. * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<< @@ -18908,7 +18877,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp */ __pyx_v_syms = const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_fst.get()->InputSymbols()); - /* "pywrapfst.pyx":1580 + /* "pywrapfst.pyx":1581 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._fst.get().InputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -18918,7 +18887,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp __pyx_t_5 = ((__pyx_v_syms == NULL) != 0); if (__pyx_t_5) { - /* "pywrapfst.pyx":1581 + /* "pywrapfst.pyx":1582 * self._fst.get().InputSymbols()) * if syms == NULL: * return # <<<<<<<<<<<<<< @@ -18929,7 +18898,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp __pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pywrapfst.pyx":1580 + /* "pywrapfst.pyx":1581 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._fst.get().InputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -18938,7 +18907,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp */ } - /* "pywrapfst.pyx":1582 + /* "pywrapfst.pyx":1583 * if syms == NULL: * return * return _init_FstSymbolTable(syms, self._fst) # <<<<<<<<<<<<<< @@ -18948,15 +18917,15 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_inp __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1582, __pyx_L1_error) + __PYX_ERR(0, 1583, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(__pyx_v_syms, __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(__pyx_v_syms, __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1570 + /* "pywrapfst.pyx":1571 * return self._fst.get().FstType() * * cpdef _FstSymbolTable input_symbols(self): # <<<<<<<<<<<<<< @@ -18998,7 +18967,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_22input_symbols(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("input_symbols", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19015,7 +18984,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_22input_symbols(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":1584 +/* "pywrapfst.pyx":1585 * return _init_FstSymbolTable(syms, self._fst) * * cpdef size_t num_arcs(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -19040,16 +19009,15 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_arcs(struct __pyx_obj_9pywrapfst__Fst if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_25num_arcs)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -19065,29 +19033,29 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_arcs(struct __pyx_obj_9pywrapfst__Fst __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1601 + /* "pywrapfst.pyx":1602 * See also: `num_states`. * """ * cdef size_t result = self._fst.get().NumArcs(state) # <<<<<<<<<<<<<< @@ -19096,11 +19064,11 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_arcs(struct __pyx_obj_9pywrapfst__Fst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1601, __pyx_L1_error) + __PYX_ERR(0, 1602, __pyx_L1_error) } __pyx_v_result = __pyx_v_self->_fst.get()->NumArcs(__pyx_v_state); - /* "pywrapfst.pyx":1602 + /* "pywrapfst.pyx":1603 * """ * cdef size_t result = self._fst.get().NumArcs(state) * if result == SIZE_MAX: # <<<<<<<<<<<<<< @@ -19110,14 +19078,14 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_arcs(struct __pyx_obj_9pywrapfst__Fst __pyx_t_7 = ((__pyx_v_result == SIZE_MAX) != 0); if (unlikely(__pyx_t_7)) { - /* "pywrapfst.pyx":1603 + /* "pywrapfst.pyx":1604 * cdef size_t result = self._fst.get().NumArcs(state) * if result == SIZE_MAX: * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -19131,14 +19099,14 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_arcs(struct __pyx_obj_9pywrapfst__Fst } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1603, __pyx_L1_error) + __PYX_ERR(0, 1604, __pyx_L1_error) - /* "pywrapfst.pyx":1602 + /* "pywrapfst.pyx":1603 * """ * cdef size_t result = self._fst.get().NumArcs(state) * if result == SIZE_MAX: # <<<<<<<<<<<<<< @@ -19147,7 +19115,7 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_arcs(struct __pyx_obj_9pywrapfst__Fst */ } - /* "pywrapfst.pyx":1604 + /* "pywrapfst.pyx":1605 * if result == SIZE_MAX: * raise FstIndexError("State index out of range") * return result # <<<<<<<<<<<<<< @@ -19157,7 +19125,7 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_arcs(struct __pyx_obj_9pywrapfst__Fst __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1584 + /* "pywrapfst.pyx":1585 * return _init_FstSymbolTable(syms, self._fst) * * cpdef size_t num_arcs(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -19188,7 +19156,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_25num_arcs(PyObject *__pyx_v_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("num_arcs (wrapper)", 0); assert(__pyx_arg_state); { - __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1584, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19210,8 +19178,8 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_24num_arcs(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("num_arcs", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1584, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -19228,7 +19196,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_24num_arcs(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":1606 +/* "pywrapfst.pyx":1607 * return result * * cpdef size_t num_input_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -19253,16 +19221,15 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_input_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_input_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_27num_input_epsilons)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -19278,29 +19245,29 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(struct __pyx_obj_9pywr __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1623 + /* "pywrapfst.pyx":1624 * See also: `num_output_epsilons`. * """ * cdef size_t result = self._fst.get().NumInputEpsilons(state) # <<<<<<<<<<<<<< @@ -19309,11 +19276,11 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1623, __pyx_L1_error) + __PYX_ERR(0, 1624, __pyx_L1_error) } __pyx_v_result = __pyx_v_self->_fst.get()->NumInputEpsilons(__pyx_v_state); - /* "pywrapfst.pyx":1624 + /* "pywrapfst.pyx":1625 * """ * cdef size_t result = self._fst.get().NumInputEpsilons(state) * if result == SIZE_MAX: # <<<<<<<<<<<<<< @@ -19323,14 +19290,14 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(struct __pyx_obj_9pywr __pyx_t_7 = ((__pyx_v_result == SIZE_MAX) != 0); if (unlikely(__pyx_t_7)) { - /* "pywrapfst.pyx":1625 + /* "pywrapfst.pyx":1626 * cdef size_t result = self._fst.get().NumInputEpsilons(state) * if result == SIZE_MAX: * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -19344,14 +19311,14 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(struct __pyx_obj_9pywr } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1625, __pyx_L1_error) + __PYX_ERR(0, 1626, __pyx_L1_error) - /* "pywrapfst.pyx":1624 + /* "pywrapfst.pyx":1625 * """ * cdef size_t result = self._fst.get().NumInputEpsilons(state) * if result == SIZE_MAX: # <<<<<<<<<<<<<< @@ -19360,7 +19327,7 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(struct __pyx_obj_9pywr */ } - /* "pywrapfst.pyx":1626 + /* "pywrapfst.pyx":1627 * if result == SIZE_MAX: * raise FstIndexError("State index out of range") * return result # <<<<<<<<<<<<<< @@ -19370,7 +19337,7 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(struct __pyx_obj_9pywr __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1606 + /* "pywrapfst.pyx":1607 * return result * * cpdef size_t num_input_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -19401,7 +19368,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_27num_input_epsilons(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("num_input_epsilons (wrapper)", 0); assert(__pyx_arg_state); { - __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1607, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19423,8 +19390,8 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_26num_input_epsilons(struct __pyx_obj PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("num_input_epsilons", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1607, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -19441,7 +19408,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_26num_input_epsilons(struct __pyx_obj return __pyx_r; } -/* "pywrapfst.pyx":1628 +/* "pywrapfst.pyx":1629 * return result * * cpdef size_t num_output_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -19466,16 +19433,15 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(struct __pyx_obj_9pyw if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_output_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_output_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_29num_output_epsilons)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -19491,29 +19457,29 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(struct __pyx_obj_9pyw __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1645 + /* "pywrapfst.pyx":1646 * See also: `num_input_epsilons`. * """ * cdef size_t result = self._fst.get().NumOutputEpsilons(state) # <<<<<<<<<<<<<< @@ -19522,11 +19488,11 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1645, __pyx_L1_error) + __PYX_ERR(0, 1646, __pyx_L1_error) } __pyx_v_result = __pyx_v_self->_fst.get()->NumOutputEpsilons(__pyx_v_state); - /* "pywrapfst.pyx":1646 + /* "pywrapfst.pyx":1647 * """ * cdef size_t result = self._fst.get().NumOutputEpsilons(state) * if result == SIZE_MAX: # <<<<<<<<<<<<<< @@ -19536,14 +19502,14 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(struct __pyx_obj_9pyw __pyx_t_7 = ((__pyx_v_result == SIZE_MAX) != 0); if (unlikely(__pyx_t_7)) { - /* "pywrapfst.pyx":1647 + /* "pywrapfst.pyx":1648 * cdef size_t result = self._fst.get().NumOutputEpsilons(state) * if result == SIZE_MAX: * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -19557,14 +19523,14 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(struct __pyx_obj_9pyw } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1647, __pyx_L1_error) + __PYX_ERR(0, 1648, __pyx_L1_error) - /* "pywrapfst.pyx":1646 + /* "pywrapfst.pyx":1647 * """ * cdef size_t result = self._fst.get().NumOutputEpsilons(state) * if result == SIZE_MAX: # <<<<<<<<<<<<<< @@ -19573,7 +19539,7 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(struct __pyx_obj_9pyw */ } - /* "pywrapfst.pyx":1648 + /* "pywrapfst.pyx":1649 * if result == SIZE_MAX: * raise FstIndexError("State index out of range") * return result # <<<<<<<<<<<<<< @@ -19583,7 +19549,7 @@ static size_t __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(struct __pyx_obj_9pyw __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1628 + /* "pywrapfst.pyx":1629 * return result * * cpdef size_t num_output_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -19614,7 +19580,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_29num_output_epsilons(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("num_output_epsilons (wrapper)", 0); assert(__pyx_arg_state); { - __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19636,8 +19602,8 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_28num_output_epsilons(struct __pyx_ob PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("num_output_epsilons", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -19654,7 +19620,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_28num_output_epsilons(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":1650 +/* "pywrapfst.pyx":1651 * return result * * cpdef _FstSymbolTable output_symbols(self): # <<<<<<<<<<<<<< @@ -19677,13 +19643,12 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1650, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_31output_symbols)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -19700,29 +19665,29 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1650, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTable))))) __PYX_ERR(0, 1650, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTable))))) __PYX_ERR(0, 1651, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1659 + /* "pywrapfst.pyx":1660 * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._fst.get().OutputSymbols()) # <<<<<<<<<<<<<< @@ -19731,10 +19696,10 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1659, __pyx_L1_error) + __PYX_ERR(0, 1660, __pyx_L1_error) } - /* "pywrapfst.pyx":1658 + /* "pywrapfst.pyx":1659 * See also: `input_symbols`. * """ * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<< @@ -19743,7 +19708,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out */ __pyx_v_syms = const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_fst.get()->OutputSymbols()); - /* "pywrapfst.pyx":1660 + /* "pywrapfst.pyx":1661 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._fst.get().OutputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -19753,7 +19718,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out __pyx_t_5 = ((__pyx_v_syms == NULL) != 0); if (__pyx_t_5) { - /* "pywrapfst.pyx":1661 + /* "pywrapfst.pyx":1662 * self._fst.get().OutputSymbols()) * if syms == NULL: * return # <<<<<<<<<<<<<< @@ -19764,7 +19729,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out __pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pywrapfst.pyx":1660 + /* "pywrapfst.pyx":1661 * cdef fst.SymbolTable *syms = const_cast[SymbolTable_ptr]( * self._fst.get().OutputSymbols()) * if syms == NULL: # <<<<<<<<<<<<<< @@ -19773,7 +19738,7 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out */ } - /* "pywrapfst.pyx":1662 + /* "pywrapfst.pyx":1663 * if syms == NULL: * return * return _init_FstSymbolTable(syms, self._fst) # <<<<<<<<<<<<<< @@ -19783,15 +19748,15 @@ static struct __pyx_obj_9pywrapfst__FstSymbolTable *__pyx_f_9pywrapfst_4_Fst_out __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1662, __pyx_L1_error) + __PYX_ERR(0, 1663, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(__pyx_v_syms, __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(__pyx_v_syms, __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1650 + /* "pywrapfst.pyx":1651 * return result * * cpdef _FstSymbolTable output_symbols(self): # <<<<<<<<<<<<<< @@ -19833,7 +19798,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_30output_symbols(struct __pyx_obj_9py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("output_symbols", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1650, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19850,7 +19815,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_30output_symbols(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":1664 +/* "pywrapfst.pyx":1665 * return _init_FstSymbolTable(syms, self._fst) * * cpdef uint64 properties(self, uint64 mask, bool test): # <<<<<<<<<<<<<< @@ -19876,18 +19841,17 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_4_Fst_properties(struct __ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_33properties)) { - __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_test); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_test); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -19905,7 +19869,7 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_4_Fst_properties(struct __ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -19915,7 +19879,7 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_4_Fst_properties(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -19923,7 +19887,7 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_4_Fst_properties(struct __ } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -19934,31 +19898,31 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_4_Fst_properties(struct __ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1682 + /* "pywrapfst.pyx":1683 * A 64-bit bitmask representing the requested properties. * """ * return self._fst.get().Properties(mask, test) # <<<<<<<<<<<<<< @@ -19967,12 +19931,12 @@ static __pyx_t_10basictypes_uint64 __pyx_f_9pywrapfst_4_Fst_properties(struct __ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1682, __pyx_L1_error) + __PYX_ERR(0, 1683, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->Properties(__pyx_v_mask, __pyx_v_test); goto __pyx_L0; - /* "pywrapfst.pyx":1664 + /* "pywrapfst.pyx":1665 * return _init_FstSymbolTable(syms, self._fst) * * cpdef uint64 properties(self, uint64 mask, bool test): # <<<<<<<<<<<<<< @@ -20028,11 +19992,11 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_33properties(PyObject *__pyx_v_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_test)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1664, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1665, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "properties") < 0)) __PYX_ERR(0, 1664, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "properties") < 0)) __PYX_ERR(0, 1665, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -20040,12 +20004,12 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_33properties(PyObject *__pyx_v_self, values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_mask = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1664, __pyx_L3_error) - __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1664, __pyx_L3_error) + __pyx_v_mask = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1665, __pyx_L3_error) + __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1665, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1664, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1665, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._Fst.properties", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20064,7 +20028,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_32properties(struct __pyx_obj_9pywrap PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("properties", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9pywrapfst_4_Fst_properties(__pyx_v_self, __pyx_v_mask, __pyx_v_test, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9pywrapfst_4_Fst_properties(__pyx_v_self, __pyx_v_mask, __pyx_v_test, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20081,7 +20045,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_32properties(struct __pyx_obj_9pywrap return __pyx_r; } -/* "pywrapfst.pyx":1684 +/* "pywrapfst.pyx":1685 * return self._fst.get().Properties(mask, test) * * cpdef int64 start(self): # <<<<<<<<<<<<<< @@ -20103,13 +20067,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_4_Fst_start(struct __pyx_ob if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_35start)) { __Pyx_INCREF(__pyx_t_1); @@ -20125,29 +20088,29 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_4_Fst_start(struct __pyx_ob } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1684, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1684, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1690 + /* "pywrapfst.pyx":1691 * Returns the start state. * """ * return self._fst.get().Start() # <<<<<<<<<<<<<< @@ -20156,12 +20119,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_4_Fst_start(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1690, __pyx_L1_error) + __PYX_ERR(0, 1691, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->Start(); goto __pyx_L0; - /* "pywrapfst.pyx":1684 + /* "pywrapfst.pyx":1685 * return self._fst.get().Properties(mask, test) * * cpdef int64 start(self): # <<<<<<<<<<<<<< @@ -20202,7 +20165,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_34start(struct __pyx_obj_9pywrapfst__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("start", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_4_Fst_start(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_4_Fst_start(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20219,7 +20182,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_34start(struct __pyx_obj_9pywrapfst__ return __pyx_r; } -/* "pywrapfst.pyx":1692 +/* "pywrapfst.pyx":1693 * return self._fst.get().Start() * * cpdef StateIterator states(self): # <<<<<<<<<<<<<< @@ -20240,13 +20203,12 @@ static struct __pyx_obj_9pywrapfst_StateIterator *__pyx_f_9pywrapfst_4_Fst_state if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_37states)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -20263,29 +20225,29 @@ static struct __pyx_obj_9pywrapfst_StateIterator *__pyx_f_9pywrapfst_4_Fst_state } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_StateIterator))))) __PYX_ERR(0, 1692, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_StateIterator))))) __PYX_ERR(0, 1693, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1703 + /* "pywrapfst.pyx":1704 * See also: `arcs`, `mutable_arcs`. * """ * return StateIterator(self) # <<<<<<<<<<<<<< @@ -20293,13 +20255,13 @@ static struct __pyx_obj_9pywrapfst_StateIterator *__pyx_f_9pywrapfst_4_Fst_state * cpdef string text(self, _SymbolTable isymbols=None, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst_StateIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst_StateIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1692 + /* "pywrapfst.pyx":1693 * return self._fst.get().Start() * * cpdef StateIterator states(self): # <<<<<<<<<<<<<< @@ -20341,7 +20303,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_36states(struct __pyx_obj_9pywrapfst_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("states", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20358,7 +20320,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_36states(struct __pyx_obj_9pywrapfst_ return __pyx_r; } -/* "pywrapfst.pyx":1705 +/* "pywrapfst.pyx":1706 * return StateIterator(self) * * cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -20370,7 +20332,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_39text(PyObject *__pyx_v_self, PyObje static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_4_Fst_text *__pyx_optional_args) { struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":1706 + /* "pywrapfst.pyx":1707 * * cpdef string text(self, _SymbolTable isymbols=None, * _SymbolTable osymbols=None, _SymbolTable ssymbols=None, # <<<<<<<<<<<<<< @@ -20380,7 +20342,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":1707 + /* "pywrapfst.pyx":1708 * cpdef string text(self, _SymbolTable isymbols=None, * _SymbolTable osymbols=None, _SymbolTable ssymbols=None, * bool acceptor=False, bool show_weight_one=False, missing_sym=b""): # <<<<<<<<<<<<<< @@ -20430,7 +20392,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs } } - /* "pywrapfst.pyx":1705 + /* "pywrapfst.pyx":1706 * return StateIterator(self) * * cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -20441,18 +20403,17 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_39text)) { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -20470,7 +20431,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[7] = {__pyx_t_6, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_t_4, __pyx_v_missing_sym}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -20480,7 +20441,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[7] = {__pyx_t_6, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_t_4, __pyx_v_missing_sym}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -20488,7 +20449,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs } else #endif { - __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -20511,31 +20472,31 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_v_missing_sym); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1730 + /* "pywrapfst.pyx":1731 * """ * # Prints FST to stringstream, then returns resulting string. * cdef fst.SymbolTable *ssymbols_ptr = NULL # <<<<<<<<<<<<<< @@ -20544,7 +20505,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs */ __pyx_v_ssymbols_ptr = NULL; - /* "pywrapfst.pyx":1731 + /* "pywrapfst.pyx":1732 * # Prints FST to stringstream, then returns resulting string. * cdef fst.SymbolTable *ssymbols_ptr = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -20555,7 +20516,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { - /* "pywrapfst.pyx":1732 + /* "pywrapfst.pyx":1733 * cdef fst.SymbolTable *ssymbols_ptr = NULL * if ssymbols is not None: * ssymbols_ptr = ssymbols._table # <<<<<<<<<<<<<< @@ -20564,12 +20525,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs */ if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1732, __pyx_L1_error) + __PYX_ERR(0, 1733, __pyx_L1_error) } __pyx_t_12 = __pyx_v_ssymbols->_table; __pyx_v_ssymbols_ptr = __pyx_t_12; - /* "pywrapfst.pyx":1731 + /* "pywrapfst.pyx":1732 * # Prints FST to stringstream, then returns resulting string. * cdef fst.SymbolTable *ssymbols_ptr = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -20578,7 +20539,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs */ } - /* "pywrapfst.pyx":1734 + /* "pywrapfst.pyx":1735 * ssymbols_ptr = ssymbols._table * cdef stringstream sstrm * fst.PrintFst(deref(self._fst), sstrm, b"", # <<<<<<<<<<<<<< @@ -20587,10 +20548,10 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1734, __pyx_L1_error) + __PYX_ERR(0, 1735, __pyx_L1_error) } - /* "pywrapfst.pyx":1735 + /* "pywrapfst.pyx":1736 * cdef stringstream sstrm * fst.PrintFst(deref(self._fst), sstrm, b"", * self._fst.get().InputSymbols() if isymbols is None # <<<<<<<<<<<<<< @@ -20601,12 +20562,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs if ((__pyx_t_11 != 0)) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1735, __pyx_L1_error) + __PYX_ERR(0, 1736, __pyx_L1_error) } __pyx_t_13 = __pyx_v_self->_fst.get()->InputSymbols(); } else { - /* "pywrapfst.pyx":1736 + /* "pywrapfst.pyx":1737 * fst.PrintFst(deref(self._fst), sstrm, b"", * self._fst.get().InputSymbols() if isymbols is None * else isymbols._table, # <<<<<<<<<<<<<< @@ -20615,12 +20576,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs */ if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1736, __pyx_L1_error) + __PYX_ERR(0, 1737, __pyx_L1_error) } __pyx_t_13 = __pyx_v_isymbols->_table; } - /* "pywrapfst.pyx":1737 + /* "pywrapfst.pyx":1738 * self._fst.get().InputSymbols() if isymbols is None * else isymbols._table, * self._fst.get().OutputSymbols() if osymbols is None # <<<<<<<<<<<<<< @@ -20631,12 +20592,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs if ((__pyx_t_11 != 0)) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1737, __pyx_L1_error) + __PYX_ERR(0, 1738, __pyx_L1_error) } __pyx_t_14 = __pyx_v_self->_fst.get()->OutputSymbols(); } else { - /* "pywrapfst.pyx":1738 + /* "pywrapfst.pyx":1739 * else isymbols._table, * self._fst.get().OutputSymbols() if osymbols is None * else osymbols._table, # <<<<<<<<<<<<<< @@ -20645,21 +20606,21 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs */ if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1738, __pyx_L1_error) + __PYX_ERR(0, 1739, __pyx_L1_error) } __pyx_t_14 = __pyx_v_osymbols->_table; } - /* "pywrapfst.pyx":1739 + /* "pywrapfst.pyx":1740 * self._fst.get().OutputSymbols() if osymbols is None * else osymbols._table, * ssymbols_ptr, acceptor, show_weight_one, tostring(missing_sym)) # <<<<<<<<<<<<<< * return sstrm.str() * */ - __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_missing_sym); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1739, __pyx_L1_error) + __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_missing_sym); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1740, __pyx_L1_error) - /* "pywrapfst.pyx":1734 + /* "pywrapfst.pyx":1735 * ssymbols_ptr = ssymbols._table * cdef stringstream sstrm * fst.PrintFst(deref(self._fst), sstrm, b"", # <<<<<<<<<<<<<< @@ -20668,7 +20629,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs */ fst::script::PrintFst((*__pyx_v_self->_fst), __pyx_v_sstrm, __pyx_k_pywrapfst, __pyx_t_13, __pyx_t_14, __pyx_v_ssymbols_ptr, __pyx_v_acceptor, __pyx_v_show_weight_one, __pyx_t_9); - /* "pywrapfst.pyx":1740 + /* "pywrapfst.pyx":1741 * else osymbols._table, * ssymbols_ptr, acceptor, show_weight_one, tostring(missing_sym)) * return sstrm.str() # <<<<<<<<<<<<<< @@ -20678,7 +20639,7 @@ static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fs __pyx_r = __pyx_v_sstrm.str(); goto __pyx_L0; - /* "pywrapfst.pyx":1705 + /* "pywrapfst.pyx":1706 * return StateIterator(self) * * cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -20720,7 +20681,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_39text(PyObject *__pyx_v_self, PyObje PyObject* values[6] = {0,0,0,0,0,0}; values[0] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":1706 + /* "pywrapfst.pyx":1707 * * cpdef string text(self, _SymbolTable isymbols=None, * _SymbolTable osymbols=None, _SymbolTable ssymbols=None, # <<<<<<<<<<<<<< @@ -20788,7 +20749,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_39text(PyObject *__pyx_v_self, PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text") < 0)) __PYX_ERR(0, 1705, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text") < 0)) __PYX_ERR(0, 1706, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -20812,10 +20773,10 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_39text(PyObject *__pyx_v_self, PyObje __pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[1]); __pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[2]); if (values[3]) { - __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L3_error) + __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1708, __pyx_L3_error) } else { - /* "pywrapfst.pyx":1707 + /* "pywrapfst.pyx":1708 * cpdef string text(self, _SymbolTable isymbols=None, * _SymbolTable osymbols=None, _SymbolTable ssymbols=None, * bool acceptor=False, bool show_weight_one=False, missing_sym=b""): # <<<<<<<<<<<<<< @@ -20825,7 +20786,7 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_39text(PyObject *__pyx_v_self, PyObje __pyx_v_acceptor = ((bool)0); } if (values[4]) { - __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L3_error) + __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1708, __pyx_L3_error) } else { __pyx_v_show_weight_one = ((bool)0); } @@ -20833,18 +20794,18 @@ static PyObject *__pyx_pw_9pywrapfst_4_Fst_39text(PyObject *__pyx_v_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("text", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1705, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("text", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1706, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._Fst.text", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 1705, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 1706, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 1706, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 1706, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 1707, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 1707, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_4_Fst_38text(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), __pyx_v_isymbols, __pyx_v_osymbols, __pyx_v_ssymbols, __pyx_v_acceptor, __pyx_v_show_weight_one, __pyx_v_missing_sym); - /* "pywrapfst.pyx":1705 + /* "pywrapfst.pyx":1706 * return StateIterator(self) * * cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -20877,7 +20838,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_38text(struct __pyx_obj_9pywrapfst__F __pyx_t_2.show_weight_one = __pyx_v_show_weight_one; __pyx_t_2.missing_sym = __pyx_v_missing_sym; __pyx_t_1 = __pyx_vtabptr_9pywrapfst__Fst->text(__pyx_v_self, 1, &__pyx_t_2); - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -20894,7 +20855,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_38text(struct __pyx_obj_9pywrapfst__F return __pyx_r; } -/* "pywrapfst.pyx":1742 +/* "pywrapfst.pyx":1743 * return sstrm.str() * * cpdef bool verify(self): # <<<<<<<<<<<<<< @@ -20916,13 +20877,12 @@ static bool __pyx_f_9pywrapfst_4_Fst_verify(struct __pyx_obj_9pywrapfst__Fst *__ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_verify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_verify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_41verify)) { __Pyx_INCREF(__pyx_t_1); @@ -20938,29 +20898,29 @@ static bool __pyx_f_9pywrapfst_4_Fst_verify(struct __pyx_obj_9pywrapfst__Fst *__ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1742, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1742, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1743, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1751 + /* "pywrapfst.pyx":1752 * True if the contents are sane, False otherwise. * """ * return fst.Verify(deref(self._fst)) # <<<<<<<<<<<<<< @@ -20969,12 +20929,12 @@ static bool __pyx_f_9pywrapfst_4_Fst_verify(struct __pyx_obj_9pywrapfst__Fst *__ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1751, __pyx_L1_error) + __PYX_ERR(0, 1752, __pyx_L1_error) } __pyx_r = fst::script::Verify((*__pyx_v_self->_fst)); goto __pyx_L0; - /* "pywrapfst.pyx":1742 + /* "pywrapfst.pyx":1743 * return sstrm.str() * * cpdef bool verify(self): # <<<<<<<<<<<<<< @@ -21015,7 +20975,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_40verify(struct __pyx_obj_9pywrapfst_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("verify", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_4_Fst_verify(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_4_Fst_verify(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21032,7 +20992,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_40verify(struct __pyx_obj_9pywrapfst_ return __pyx_r; } -/* "pywrapfst.pyx":1753 +/* "pywrapfst.pyx":1754 * return fst.Verify(deref(self._fst)) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -21054,13 +21014,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_weight_type(struct __pyx_obj_9pywrap if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_43weight_type)) { __Pyx_INCREF(__pyx_t_1); @@ -21076,29 +21035,29 @@ static std::string __pyx_f_9pywrapfst_4_Fst_weight_type(struct __pyx_obj_9pywrap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1753, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1753, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1762 + /* "pywrapfst.pyx":1763 * A string representing the weight type. * """ * return self._fst.get().WeightType() # <<<<<<<<<<<<<< @@ -21107,12 +21066,12 @@ static std::string __pyx_f_9pywrapfst_4_Fst_weight_type(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1762, __pyx_L1_error) + __PYX_ERR(0, 1763, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->WeightType(); goto __pyx_L0; - /* "pywrapfst.pyx":1753 + /* "pywrapfst.pyx":1754 * return fst.Verify(deref(self._fst)) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -21153,7 +21112,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_42weight_type(struct __pyx_obj_9pywra PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("weight_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21170,7 +21129,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_42weight_type(struct __pyx_obj_9pywra return __pyx_r; } -/* "pywrapfst.pyx":1764 +/* "pywrapfst.pyx":1765 * return self._fst.get().WeightType() * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -21193,13 +21152,12 @@ static void __pyx_f_9pywrapfst_4_Fst_write(struct __pyx_obj_9pywrapfst__Fst *__p if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_45write)) { __Pyx_INCREF(__pyx_t_1); @@ -21215,27 +21173,27 @@ static void __pyx_f_9pywrapfst_4_Fst_write(struct __pyx_obj_9pywrapfst__Fst *__p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1778 + /* "pywrapfst.pyx":1779 * FstIOError: Write failed. * """ * if not self._fst.get().Write(tostring(filename)): # <<<<<<<<<<<<<< @@ -21244,22 +21202,22 @@ static void __pyx_f_9pywrapfst_4_Fst_write(struct __pyx_obj_9pywrapfst__Fst *__p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1778, __pyx_L1_error) + __PYX_ERR(0, 1779, __pyx_L1_error) } - __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1778, __pyx_L1_error) + __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1779, __pyx_L1_error) __pyx_t_6 = ((!(__pyx_v_self->_fst.get()->Write(__pyx_t_5) != 0)) != 0); if (unlikely(__pyx_t_6)) { - /* "pywrapfst.pyx":1779 + /* "pywrapfst.pyx":1780 * """ * if not self._fst.get().Write(tostring(filename)): * raise FstIOError("Write failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * * cpdef bytes write_to_string(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1779, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1779, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -21273,7 +21231,7 @@ static void __pyx_f_9pywrapfst_4_Fst_write(struct __pyx_obj_9pywrapfst__Fst *__p } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -21289,14 +21247,14 @@ static void __pyx_f_9pywrapfst_4_Fst_write(struct __pyx_obj_9pywrapfst__Fst *__p __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1779, __pyx_L1_error) + __PYX_ERR(0, 1780, __pyx_L1_error) - /* "pywrapfst.pyx":1778 + /* "pywrapfst.pyx":1779 * FstIOError: Write failed. * """ * if not self._fst.get().Write(tostring(filename)): # <<<<<<<<<<<<<< @@ -21305,7 +21263,7 @@ static void __pyx_f_9pywrapfst_4_Fst_write(struct __pyx_obj_9pywrapfst__Fst *__p */ } - /* "pywrapfst.pyx":1764 + /* "pywrapfst.pyx":1765 * return self._fst.get().WeightType() * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -21346,8 +21304,8 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_44write(struct __pyx_obj_9pywrapfst__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("write", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_9pywrapfst_4_Fst_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1764, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_f_9pywrapfst_4_Fst_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21364,7 +21322,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_44write(struct __pyx_obj_9pywrapfst__ return __pyx_r; } -/* "pywrapfst.pyx":1781 +/* "pywrapfst.pyx":1782 * raise FstIOError("Write failed: {!r}".format(filename)) * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -21387,13 +21345,12 @@ static PyObject *__pyx_f_9pywrapfst_4_Fst_write_to_string(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_4_Fst_47write_to_string)) { __Pyx_XDECREF(__pyx_r); @@ -21410,29 +21367,29 @@ static PyObject *__pyx_f_9pywrapfst_4_Fst_write_to_string(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1781, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1782, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1796 + /* "pywrapfst.pyx":1797 * """ * cdef stringstream sstrm * if not self._fst.get().Write(sstrm, b""): # <<<<<<<<<<<<<< @@ -21441,19 +21398,19 @@ static PyObject *__pyx_f_9pywrapfst_4_Fst_write_to_string(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1796, __pyx_L1_error) + __PYX_ERR(0, 1797, __pyx_L1_error) } __pyx_t_5 = ((!(__pyx_v_self->_fst.get()->Write(__pyx_v_sstrm, __pyx_k_pywrapfst) != 0)) != 0); if (unlikely(__pyx_t_5)) { - /* "pywrapfst.pyx":1797 + /* "pywrapfst.pyx":1798 * cdef stringstream sstrm * if not self._fst.get().Write(sstrm, b""): * raise FstIOError("Write to string failed") # <<<<<<<<<<<<<< * return sstrm.str() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1797, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -21467,14 +21424,14 @@ static PyObject *__pyx_f_9pywrapfst_4_Fst_write_to_string(struct __pyx_obj_9pywr } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Write_to_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Write_to_string_failed); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1797, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1797, __pyx_L1_error) + __PYX_ERR(0, 1798, __pyx_L1_error) - /* "pywrapfst.pyx":1796 + /* "pywrapfst.pyx":1797 * """ * cdef stringstream sstrm * if not self._fst.get().Write(sstrm, b""): # <<<<<<<<<<<<<< @@ -21483,7 +21440,7 @@ static PyObject *__pyx_f_9pywrapfst_4_Fst_write_to_string(struct __pyx_obj_9pywr */ } - /* "pywrapfst.pyx":1798 + /* "pywrapfst.pyx":1799 * if not self._fst.get().Write(sstrm, b""): * raise FstIOError("Write to string failed") * return sstrm.str() # <<<<<<<<<<<<<< @@ -21491,13 +21448,13 @@ static PyObject *__pyx_f_9pywrapfst_4_Fst_write_to_string(struct __pyx_obj_9pywr * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":1781 + /* "pywrapfst.pyx":1782 * raise FstIOError("Write failed: {!r}".format(filename)) * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -21539,7 +21496,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_46write_to_string(struct __pyx_obj_9p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("write_to_string", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21556,7 +21513,7 @@ static PyObject *__pyx_pf_9pywrapfst_4_Fst_46write_to_string(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":1811 +/* "pywrapfst.pyx":1812 * """ * * cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<< @@ -21572,7 +21529,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__check_mutating_imethod(struct __py PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_check_mutating_imethod", 0); - /* "pywrapfst.pyx":1816 + /* "pywrapfst.pyx":1817 * This function is not visible to Python users. * """ * if self._fst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -21581,19 +21538,19 @@ static void __pyx_f_9pywrapfst_11_MutableFst__check_mutating_imethod(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1816, __pyx_L1_error) + __PYX_ERR(0, 1817, __pyx_L1_error) } __pyx_t_1 = ((__pyx_v_self->__pyx_base._fst.get()->Properties(fst::kError, 1) == fst::kError) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":1817 + /* "pywrapfst.pyx":1818 * """ * if self._fst.get().Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * * cdef void _add_arc(self, int64 state, Arc arc) except *: */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1817, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -21607,14 +21564,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__check_mutating_imethod(struct __py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Operation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Operation_failed); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1817, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1817, __pyx_L1_error) + __PYX_ERR(0, 1818, __pyx_L1_error) - /* "pywrapfst.pyx":1816 + /* "pywrapfst.pyx":1817 * This function is not visible to Python users. * """ * if self._fst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -21623,7 +21580,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__check_mutating_imethod(struct __py */ } - /* "pywrapfst.pyx":1811 + /* "pywrapfst.pyx":1812 * """ * * cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<< @@ -21642,7 +21599,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__check_mutating_imethod(struct __py __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1819 +/* "pywrapfst.pyx":1820 * raise FstOpError("Operation failed") * * cdef void _add_arc(self, int64 state, Arc arc) except *: # <<<<<<<<<<<<<< @@ -21658,7 +21615,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_add_arc", 0); - /* "pywrapfst.pyx":1820 + /* "pywrapfst.pyx":1821 * * cdef void _add_arc(self, int64 state, Arc arc) except *: * if not self._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -21667,19 +21624,19 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1820, __pyx_L1_error) + __PYX_ERR(0, 1821, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_self->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":1821 + /* "pywrapfst.pyx":1822 * cdef void _add_arc(self, int64 state, Arc arc) except *: * if not self._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * if not self._mfst.get().AddArc(state, deref(arc._arc)): * raise FstOpError("Incompatible or invalid weight type") */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -21693,14 +21650,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1821, __pyx_L1_error) + __PYX_ERR(0, 1822, __pyx_L1_error) - /* "pywrapfst.pyx":1820 + /* "pywrapfst.pyx":1821 * * cdef void _add_arc(self, int64 state, Arc arc) except *: * if not self._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -21709,7 +21666,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs */ } - /* "pywrapfst.pyx":1822 + /* "pywrapfst.pyx":1823 * if not self._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") * if not self._mfst.get().AddArc(state, deref(arc._arc)): # <<<<<<<<<<<<<< @@ -21718,23 +21675,23 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1822, __pyx_L1_error) + __PYX_ERR(0, 1823, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 1822, __pyx_L1_error) + __PYX_ERR(0, 1823, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->AddArc(__pyx_v_state, (*__pyx_v_arc->_arc)) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":1823 + /* "pywrapfst.pyx":1824 * raise FstIndexError("State index out of range") * if not self._mfst.get().AddArc(state, deref(arc._arc)): * raise FstOpError("Incompatible or invalid weight type") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -21748,14 +21705,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Incompatible_or_invalid_weight_t) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Incompatible_or_invalid_weight_t); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1823, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1823, __pyx_L1_error) + __PYX_ERR(0, 1824, __pyx_L1_error) - /* "pywrapfst.pyx":1822 + /* "pywrapfst.pyx":1823 * if not self._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") * if not self._mfst.get().AddArc(state, deref(arc._arc)): # <<<<<<<<<<<<<< @@ -21764,7 +21721,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs */ } - /* "pywrapfst.pyx":1824 + /* "pywrapfst.pyx":1825 * if not self._mfst.get().AddArc(state, deref(arc._arc)): * raise FstOpError("Incompatible or invalid weight type") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -21773,11 +21730,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1824, __pyx_L1_error) + __PYX_ERR(0, 1825, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1824, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L1_error) - /* "pywrapfst.pyx":1819 + /* "pywrapfst.pyx":1820 * raise FstOpError("Operation failed") * * cdef void _add_arc(self, int64 state, Arc arc) except *: # <<<<<<<<<<<<<< @@ -21796,7 +21753,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__add_arc(struct __pyx_obj_9pywrapfs __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1826 +/* "pywrapfst.pyx":1827 * self._check_mutating_imethod() * * def add_arc(self, int64 state, Arc arc): # <<<<<<<<<<<<<< @@ -21836,11 +21793,11 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_1add_arc(PyObject *__pyx_v_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arc)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 1826, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 1827, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_arc") < 0)) __PYX_ERR(0, 1826, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_arc") < 0)) __PYX_ERR(0, 1827, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -21848,18 +21805,18 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_1add_arc(PyObject *__pyx_v_se values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1826, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1827, __pyx_L3_error) __pyx_v_arc = ((struct __pyx_obj_9pywrapfst_Arc *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1826, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1827, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.add_arc", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1826, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1827, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_add_arc(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_state, __pyx_v_arc); /* function exit code */ @@ -21876,7 +21833,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_add_arc(struct __pyx_obj_9pyw __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_arc", 0); - /* "pywrapfst.pyx":1845 + /* "pywrapfst.pyx":1846 * See also: `add_state`. * """ * self._add_arc(state, arc) # <<<<<<<<<<<<<< @@ -21885,11 +21842,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_add_arc(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_add_arc"); - __PYX_ERR(0, 1845, __pyx_L1_error) + __PYX_ERR(0, 1846, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add_arc(__pyx_v_self, __pyx_v_state, __pyx_v_arc); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1845, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add_arc(__pyx_v_self, __pyx_v_state, __pyx_v_arc); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1846, __pyx_L1_error) - /* "pywrapfst.pyx":1846 + /* "pywrapfst.pyx":1847 * """ * self._add_arc(state, arc) * return self # <<<<<<<<<<<<<< @@ -21901,7 +21858,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_add_arc(struct __pyx_obj_9pyw __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1826 + /* "pywrapfst.pyx":1827 * self._check_mutating_imethod() * * def add_arc(self, int64 state, Arc arc): # <<<<<<<<<<<<<< @@ -21919,7 +21876,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_add_arc(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":1848 +/* "pywrapfst.pyx":1849 * return self * * cpdef int64 add_state(self) except *: # <<<<<<<<<<<<<< @@ -21942,13 +21899,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_add_state(str if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11_MutableFst_3add_state)) { __Pyx_INCREF(__pyx_t_1); @@ -21964,29 +21920,29 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_add_state(str } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1848, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":1859 + /* "pywrapfst.pyx":1860 * See also: `add_arc`, `set_start`, `set_final`. * """ * cdef int64 result = self._mfst.get().AddState() # <<<<<<<<<<<<<< @@ -21995,11 +21951,11 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_add_state(str */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1859, __pyx_L1_error) + __PYX_ERR(0, 1860, __pyx_L1_error) } __pyx_v_result = __pyx_v_self->_mfst.get()->AddState(); - /* "pywrapfst.pyx":1860 + /* "pywrapfst.pyx":1861 * """ * cdef int64 result = self._mfst.get().AddState() * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -22008,11 +21964,11 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_add_state(str */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1860, __pyx_L1_error) + __PYX_ERR(0, 1861, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1860, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1861, __pyx_L1_error) - /* "pywrapfst.pyx":1861 + /* "pywrapfst.pyx":1862 * cdef int64 result = self._mfst.get().AddState() * self._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -22022,7 +21978,7 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_add_state(str __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":1848 + /* "pywrapfst.pyx":1849 * return self * * cpdef int64 add_state(self) except *: # <<<<<<<<<<<<<< @@ -22064,8 +22020,8 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_2add_state(struct __pyx_obj_9 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_state", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_11_MutableFst_add_state(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1848, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_11_MutableFst_add_state(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1849, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -22082,7 +22038,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_2add_state(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":1863 +/* "pywrapfst.pyx":1864 * return result * * cdef void _arcsort(self, sort_type=b"ilabel") except *: # <<<<<<<<<<<<<< @@ -22108,27 +22064,27 @@ static void __pyx_f_9pywrapfst_11_MutableFst__arcsort(struct __pyx_obj_9pywrapfs } } - /* "pywrapfst.pyx":1865 + /* "pywrapfst.pyx":1866 * cdef void _arcsort(self, sort_type=b"ilabel") except *: * cdef fst.ArcSortType sort_type_enum * if not fst.GetArcSortType(tostring(sort_type), addr(sort_type_enum)): # <<<<<<<<<<<<<< * raise FstArgError("Unknown sort type {!r}".format(sort_type)) * fst.ArcSort(self._mfst.get(), sort_type_enum) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_sort_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1865, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_sort_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1866, __pyx_L1_error) __pyx_t_2 = ((!(fst::script::GetArcSortType(__pyx_t_1, (&__pyx_v_sort_type_enum)) != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":1866 + /* "pywrapfst.pyx":1867 * cdef fst.ArcSortType sort_type_enum * if not fst.GetArcSortType(tostring(sort_type), addr(sort_type_enum)): * raise FstArgError("Unknown sort type {!r}".format(sort_type)) # <<<<<<<<<<<<<< * fst.ArcSort(self._mfst.get(), sort_type_enum) * self._check_mutating_imethod() */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_sort_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_sort_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -22142,7 +22098,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__arcsort(struct __pyx_obj_9pywrapfs } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_sort_type) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_sort_type); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1866, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -22158,14 +22114,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__arcsort(struct __pyx_obj_9pywrapfs __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1866, __pyx_L1_error) + __PYX_ERR(0, 1867, __pyx_L1_error) - /* "pywrapfst.pyx":1865 + /* "pywrapfst.pyx":1866 * cdef void _arcsort(self, sort_type=b"ilabel") except *: * cdef fst.ArcSortType sort_type_enum * if not fst.GetArcSortType(tostring(sort_type), addr(sort_type_enum)): # <<<<<<<<<<<<<< @@ -22174,7 +22130,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__arcsort(struct __pyx_obj_9pywrapfs */ } - /* "pywrapfst.pyx":1867 + /* "pywrapfst.pyx":1868 * if not fst.GetArcSortType(tostring(sort_type), addr(sort_type_enum)): * raise FstArgError("Unknown sort type {!r}".format(sort_type)) * fst.ArcSort(self._mfst.get(), sort_type_enum) # <<<<<<<<<<<<<< @@ -22183,11 +22139,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__arcsort(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1867, __pyx_L1_error) + __PYX_ERR(0, 1868, __pyx_L1_error) } fst::script::ArcSort(__pyx_v_self->_mfst.get(), __pyx_v_sort_type_enum); - /* "pywrapfst.pyx":1868 + /* "pywrapfst.pyx":1869 * raise FstArgError("Unknown sort type {!r}".format(sort_type)) * fst.ArcSort(self._mfst.get(), sort_type_enum) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -22196,11 +22152,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__arcsort(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1868, __pyx_L1_error) + __PYX_ERR(0, 1869, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1868, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1869, __pyx_L1_error) - /* "pywrapfst.pyx":1863 + /* "pywrapfst.pyx":1864 * return result * * cdef void _arcsort(self, sort_type=b"ilabel") except *: # <<<<<<<<<<<<<< @@ -22221,7 +22177,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__arcsort(struct __pyx_obj_9pywrapfs __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1870 +/* "pywrapfst.pyx":1871 * self._check_mutating_imethod() * * def arcsort(self, sort_type=b"ilabel"): # <<<<<<<<<<<<<< @@ -22259,7 +22215,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_5arcsort(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcsort") < 0)) __PYX_ERR(0, 1870, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcsort") < 0)) __PYX_ERR(0, 1871, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -22273,7 +22229,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_5arcsort(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("arcsort", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1870, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("arcsort", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1871, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.arcsort", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22292,7 +22248,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_4arcsort(struct __pyx_obj_9py struct __pyx_opt_args_9pywrapfst_11_MutableFst__arcsort __pyx_t_1; __Pyx_RefNannySetupContext("arcsort", 0); - /* "pywrapfst.pyx":1889 + /* "pywrapfst.pyx":1890 * FstArgError: Unknown sort type. * """ * self._arcsort(sort_type) # <<<<<<<<<<<<<< @@ -22301,13 +22257,13 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_4arcsort(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arcsort"); - __PYX_ERR(0, 1889, __pyx_L1_error) + __PYX_ERR(0, 1890, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.sort_type = __pyx_v_sort_type; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_arcsort(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1889, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_arcsort(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1890, __pyx_L1_error) - /* "pywrapfst.pyx":1890 + /* "pywrapfst.pyx":1891 * """ * self._arcsort(sort_type) * return self # <<<<<<<<<<<<<< @@ -22319,7 +22275,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_4arcsort(struct __pyx_obj_9py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1870 + /* "pywrapfst.pyx":1871 * self._check_mutating_imethod() * * def arcsort(self, sort_type=b"ilabel"): # <<<<<<<<<<<<<< @@ -22337,7 +22293,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_4arcsort(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":1892 +/* "pywrapfst.pyx":1893 * return self * * cdef void _closure(self, bool closure_plus=False) except *: # <<<<<<<<<<<<<< @@ -22355,7 +22311,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__closure(struct __pyx_obj_9pywrapfs } } - /* "pywrapfst.pyx":1893 + /* "pywrapfst.pyx":1894 * * cdef void _closure(self, bool closure_plus=False) except *: * fst.Closure(self._mfst.get(), fst.GetClosureType(closure_plus)) # <<<<<<<<<<<<<< @@ -22364,11 +22320,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__closure(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1893, __pyx_L1_error) + __PYX_ERR(0, 1894, __pyx_L1_error) } fst::script::Closure(__pyx_v_self->_mfst.get(), fst::script::GetClosureType(__pyx_v_closure_plus)); - /* "pywrapfst.pyx":1894 + /* "pywrapfst.pyx":1895 * cdef void _closure(self, bool closure_plus=False) except *: * fst.Closure(self._mfst.get(), fst.GetClosureType(closure_plus)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -22377,11 +22333,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__closure(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1894, __pyx_L1_error) + __PYX_ERR(0, 1895, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1894, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1895, __pyx_L1_error) - /* "pywrapfst.pyx":1892 + /* "pywrapfst.pyx":1893 * return self * * cdef void _closure(self, bool closure_plus=False) except *: # <<<<<<<<<<<<<< @@ -22397,7 +22353,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__closure(struct __pyx_obj_9pywrapfs __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1896 +/* "pywrapfst.pyx":1897 * self._check_mutating_imethod() * * def closure(self, bool closure_plus=False): # <<<<<<<<<<<<<< @@ -22434,7 +22390,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_7closure(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "closure") < 0)) __PYX_ERR(0, 1896, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "closure") < 0)) __PYX_ERR(0, 1897, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -22445,14 +22401,14 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_7closure(PyObject *__pyx_v_se } } if (values[0]) { - __pyx_v_closure_plus = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_closure_plus == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1896, __pyx_L3_error) + __pyx_v_closure_plus = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_closure_plus == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1897, __pyx_L3_error) } else { __pyx_v_closure_plus = ((bool)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1896, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1897, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.closure", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22471,7 +22427,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_6closure(struct __pyx_obj_9py struct __pyx_opt_args_9pywrapfst_11_MutableFst__closure __pyx_t_1; __Pyx_RefNannySetupContext("closure", 0); - /* "pywrapfst.pyx":1914 + /* "pywrapfst.pyx":1915 * self. * """ * self._closure(closure_plus) # <<<<<<<<<<<<<< @@ -22480,13 +22436,13 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_6closure(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_closure"); - __PYX_ERR(0, 1914, __pyx_L1_error) + __PYX_ERR(0, 1915, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.closure_plus = __pyx_v_closure_plus; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_closure(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1914, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_closure(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L1_error) - /* "pywrapfst.pyx":1915 + /* "pywrapfst.pyx":1916 * """ * self._closure(closure_plus) * return self # <<<<<<<<<<<<<< @@ -22498,7 +22454,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_6closure(struct __pyx_obj_9py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1896 + /* "pywrapfst.pyx":1897 * self._check_mutating_imethod() * * def closure(self, bool closure_plus=False): # <<<<<<<<<<<<<< @@ -22516,7 +22472,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_6closure(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":1917 +/* "pywrapfst.pyx":1918 * return self * * cdef void _concat(self, _Fst ifst) except *: # <<<<<<<<<<<<<< @@ -22528,7 +22484,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__concat(struct __pyx_obj_9pywrapfst __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_concat", 0); - /* "pywrapfst.pyx":1918 + /* "pywrapfst.pyx":1919 * * cdef void _concat(self, _Fst ifst) except *: * fst.Concat(self._mfst.get(), deref(ifst._fst)) # <<<<<<<<<<<<<< @@ -22537,15 +22493,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__concat(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1918, __pyx_L1_error) + __PYX_ERR(0, 1919, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1918, __pyx_L1_error) + __PYX_ERR(0, 1919, __pyx_L1_error) } fst::script::Concat(__pyx_v_self->_mfst.get(), (*__pyx_v_ifst->_fst)); - /* "pywrapfst.pyx":1919 + /* "pywrapfst.pyx":1920 * cdef void _concat(self, _Fst ifst) except *: * fst.Concat(self._mfst.get(), deref(ifst._fst)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -22554,11 +22510,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__concat(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1919, __pyx_L1_error) + __PYX_ERR(0, 1920, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1919, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1920, __pyx_L1_error) - /* "pywrapfst.pyx":1917 + /* "pywrapfst.pyx":1918 * return self * * cdef void _concat(self, _Fst ifst) except *: # <<<<<<<<<<<<<< @@ -22574,7 +22530,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__concat(struct __pyx_obj_9pywrapfst __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1921 +/* "pywrapfst.pyx":1922 * self._check_mutating_imethod() * * def concat(self, _Fst ifst): # <<<<<<<<<<<<<< @@ -22589,7 +22545,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_9concat(PyObject *__pyx_v_sel PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("concat (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 1921, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 1922, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_8concat(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_ifst)); /* function exit code */ @@ -22606,7 +22562,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_8concat(struct __pyx_obj_9pyw __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("concat", 0); - /* "pywrapfst.pyx":1938 + /* "pywrapfst.pyx":1939 * self. * """ * self._concat(ifst) # <<<<<<<<<<<<<< @@ -22615,11 +22571,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_8concat(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_concat"); - __PYX_ERR(0, 1938, __pyx_L1_error) + __PYX_ERR(0, 1939, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1938, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1939, __pyx_L1_error) - /* "pywrapfst.pyx":1939 + /* "pywrapfst.pyx":1940 * """ * self._concat(ifst) * return self # <<<<<<<<<<<<<< @@ -22631,7 +22587,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_8concat(struct __pyx_obj_9pyw __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1921 + /* "pywrapfst.pyx":1922 * self._check_mutating_imethod() * * def concat(self, _Fst ifst): # <<<<<<<<<<<<<< @@ -22649,7 +22605,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_8concat(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":1941 +/* "pywrapfst.pyx":1942 * return self * * cdef void _connect(self) except *: # <<<<<<<<<<<<<< @@ -22661,7 +22617,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__connect(struct __pyx_obj_9pywrapfs __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_connect", 0); - /* "pywrapfst.pyx":1942 + /* "pywrapfst.pyx":1943 * * cdef void _connect(self) except *: * fst.Connect(self._mfst.get()) # <<<<<<<<<<<<<< @@ -22670,11 +22626,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__connect(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1942, __pyx_L1_error) + __PYX_ERR(0, 1943, __pyx_L1_error) } fst::script::Connect(__pyx_v_self->_mfst.get()); - /* "pywrapfst.pyx":1943 + /* "pywrapfst.pyx":1944 * cdef void _connect(self) except *: * fst.Connect(self._mfst.get()) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -22683,11 +22639,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__connect(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1943, __pyx_L1_error) + __PYX_ERR(0, 1944, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1943, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1944, __pyx_L1_error) - /* "pywrapfst.pyx":1941 + /* "pywrapfst.pyx":1942 * return self * * cdef void _connect(self) except *: # <<<<<<<<<<<<<< @@ -22703,7 +22659,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__connect(struct __pyx_obj_9pywrapfs __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1945 +/* "pywrapfst.pyx":1946 * self._check_mutating_imethod() * * def connect(self): # <<<<<<<<<<<<<< @@ -22730,7 +22686,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_10connect(struct __pyx_obj_9p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect", 0); - /* "pywrapfst.pyx":1957 + /* "pywrapfst.pyx":1958 * self. * """ * self._connect() # <<<<<<<<<<<<<< @@ -22739,11 +22695,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_10connect(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_connect"); - __PYX_ERR(0, 1957, __pyx_L1_error) + __PYX_ERR(0, 1958, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_connect(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1957, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_connect(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L1_error) - /* "pywrapfst.pyx":1958 + /* "pywrapfst.pyx":1959 * """ * self._connect() * return self # <<<<<<<<<<<<<< @@ -22755,7 +22711,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_10connect(struct __pyx_obj_9p __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1945 + /* "pywrapfst.pyx":1946 * self._check_mutating_imethod() * * def connect(self): # <<<<<<<<<<<<<< @@ -22773,7 +22729,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_10connect(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":1960 +/* "pywrapfst.pyx":1961 * return self * * cdef void _decode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<< @@ -22785,7 +22741,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__decode(struct __pyx_obj_9pywrapfst __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_decode", 0); - /* "pywrapfst.pyx":1961 + /* "pywrapfst.pyx":1962 * * cdef void _decode(self, EncodeMapper encoder) except *: * fst.Decode(self._mfst.get(), deref(encoder._encoder)) # <<<<<<<<<<<<<< @@ -22794,15 +22750,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__decode(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1961, __pyx_L1_error) + __PYX_ERR(0, 1962, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_encoder) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 1961, __pyx_L1_error) + __PYX_ERR(0, 1962, __pyx_L1_error) } fst::script::Decode(__pyx_v_self->_mfst.get(), (*__pyx_v_encoder->_encoder)); - /* "pywrapfst.pyx":1962 + /* "pywrapfst.pyx":1963 * cdef void _decode(self, EncodeMapper encoder) except *: * fst.Decode(self._mfst.get(), deref(encoder._encoder)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -22811,11 +22767,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__decode(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1962, __pyx_L1_error) + __PYX_ERR(0, 1963, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1962, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L1_error) - /* "pywrapfst.pyx":1960 + /* "pywrapfst.pyx":1961 * return self * * cdef void _decode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<< @@ -22831,7 +22787,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__decode(struct __pyx_obj_9pywrapfst __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1964 +/* "pywrapfst.pyx":1965 * self._check_mutating_imethod() * * def decode(self, EncodeMapper encoder): # <<<<<<<<<<<<<< @@ -22846,7 +22802,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_13decode(PyObject *__pyx_v_se PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decode (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 1964, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 1965, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_12decode(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_encoder)); /* function exit code */ @@ -22863,7 +22819,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_12decode(struct __pyx_obj_9py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decode", 0); - /* "pywrapfst.pyx":1980 + /* "pywrapfst.pyx":1981 * See also: `encode`. * """ * self._decode(encoder) # <<<<<<<<<<<<<< @@ -22872,11 +22828,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_12decode(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_decode"); - __PYX_ERR(0, 1980, __pyx_L1_error) + __PYX_ERR(0, 1981, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1980, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1981, __pyx_L1_error) - /* "pywrapfst.pyx":1981 + /* "pywrapfst.pyx":1982 * """ * self._decode(encoder) * return self # <<<<<<<<<<<<<< @@ -22888,7 +22844,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_12decode(struct __pyx_obj_9py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1964 + /* "pywrapfst.pyx":1965 * self._check_mutating_imethod() * * def decode(self, EncodeMapper encoder): # <<<<<<<<<<<<<< @@ -22906,7 +22862,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_12decode(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":1983 +/* "pywrapfst.pyx":1984 * return self * * cdef void _delete_arcs(self, int64 state, size_t n=0) except *: # <<<<<<<<<<<<<< @@ -22929,7 +22885,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr } } - /* "pywrapfst.pyx":1984 + /* "pywrapfst.pyx":1985 * * cdef void _delete_arcs(self, int64 state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<< @@ -22939,12 +22895,12 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr if ((__pyx_v_n != 0)) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1984, __pyx_L1_error) + __PYX_ERR(0, 1985, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state, __pyx_v_n); } else { - /* "pywrapfst.pyx":1985 + /* "pywrapfst.pyx":1986 * cdef void _delete_arcs(self, int64 state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else * self._mfst.get().DeleteArcs(state)): # <<<<<<<<<<<<<< @@ -22953,12 +22909,12 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1985, __pyx_L1_error) + __PYX_ERR(0, 1986, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state); } - /* "pywrapfst.pyx":1984 + /* "pywrapfst.pyx":1985 * * cdef void _delete_arcs(self, int64 state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<< @@ -22968,14 +22924,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":1986 + /* "pywrapfst.pyx":1987 * if not (self._mfst.get().DeleteArcs(state, n) if n else * self._mfst.get().DeleteArcs(state)): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1986, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -22989,14 +22945,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1986, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1986, __pyx_L1_error) + __PYX_ERR(0, 1987, __pyx_L1_error) - /* "pywrapfst.pyx":1984 + /* "pywrapfst.pyx":1985 * * cdef void _delete_arcs(self, int64 state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<< @@ -23005,7 +22961,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr */ } - /* "pywrapfst.pyx":1987 + /* "pywrapfst.pyx":1988 * self._mfst.get().DeleteArcs(state)): * raise FstIndexError("State index out of range") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -23014,11 +22970,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 1987, __pyx_L1_error) + __PYX_ERR(0, 1988, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1987, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1988, __pyx_L1_error) - /* "pywrapfst.pyx":1983 + /* "pywrapfst.pyx":1984 * return self * * cdef void _delete_arcs(self, int64 state, size_t n=0) except *: # <<<<<<<<<<<<<< @@ -23037,7 +22993,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_arcs(struct __pyx_obj_9pywr __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":1989 +/* "pywrapfst.pyx":1990 * self._check_mutating_imethod() * * def delete_arcs(self, int64 state, size_t n=0): # <<<<<<<<<<<<<< @@ -23081,7 +23037,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_15delete_arcs(PyObject *__pyx } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_arcs") < 0)) __PYX_ERR(0, 1989, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_arcs") < 0)) __PYX_ERR(0, 1990, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23092,16 +23048,16 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_15delete_arcs(PyObject *__pyx default: goto __pyx_L5_argtuple_error; } } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1989, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1990, __pyx_L3_error) if (values[1]) { - __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1989, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1990, __pyx_L3_error) } else { __pyx_v_n = ((size_t)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("delete_arcs", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1989, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("delete_arcs", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1990, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.delete_arcs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -23120,7 +23076,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_14delete_arcs(struct __pyx_ob struct __pyx_opt_args_9pywrapfst_11_MutableFst__delete_arcs __pyx_t_1; __Pyx_RefNannySetupContext("delete_arcs", 0); - /* "pywrapfst.pyx":2009 + /* "pywrapfst.pyx":2010 * See also: `delete_states`. * """ * self._delete_arcs(state, n) # <<<<<<<<<<<<<< @@ -23129,13 +23085,13 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_14delete_arcs(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_delete_arcs"); - __PYX_ERR(0, 2009, __pyx_L1_error) + __PYX_ERR(0, 2010, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.n = __pyx_v_n; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_arcs(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2009, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_arcs(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2010, __pyx_L1_error) - /* "pywrapfst.pyx":2010 + /* "pywrapfst.pyx":2011 * """ * self._delete_arcs(state, n) * return self # <<<<<<<<<<<<<< @@ -23147,7 +23103,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_14delete_arcs(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":1989 + /* "pywrapfst.pyx":1990 * self._check_mutating_imethod() * * def delete_arcs(self, int64 state, size_t n=0): # <<<<<<<<<<<<<< @@ -23165,7 +23121,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_14delete_arcs(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":2012 +/* "pywrapfst.pyx":2013 * return self * * cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<< @@ -23188,17 +23144,17 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py } } - /* "pywrapfst.pyx":2014 + /* "pywrapfst.pyx":2015 * cdef void _delete_states(self, states=None) except *: * # Only the former signature has a possible indexing failure. * if states: # <<<<<<<<<<<<<< * if not self._mfst.get().DeleteStates( states): * raise FstIndexError("State index out of range") */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_states); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2014, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_states); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2015, __pyx_L1_error) if (__pyx_t_1) { - /* "pywrapfst.pyx":2015 + /* "pywrapfst.pyx":2016 * # Only the former signature has a possible indexing failure. * if states: * if not self._mfst.get().DeleteStates( states): # <<<<<<<<<<<<<< @@ -23207,20 +23163,20 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2015, __pyx_L1_error) + __PYX_ERR(0, 2016, __pyx_L1_error) } - __pyx_t_2 = __pyx_convert_vector_from_py___pyx_t_10basictypes_int64(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2015, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_vector_from_py___pyx_t_10basictypes_int64(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2016, __pyx_L1_error) __pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->DeleteStates(((std::vector<__pyx_t_10basictypes_int64> const )__pyx_t_2)) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2016 + /* "pywrapfst.pyx":2017 * if states: * if not self._mfst.get().DeleteStates( states): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * else: * self._mfst.get().DeleteStates() */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2016, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -23234,14 +23190,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2016, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2016, __pyx_L1_error) + __PYX_ERR(0, 2017, __pyx_L1_error) - /* "pywrapfst.pyx":2015 + /* "pywrapfst.pyx":2016 * # Only the former signature has a possible indexing failure. * if states: * if not self._mfst.get().DeleteStates( states): # <<<<<<<<<<<<<< @@ -23250,7 +23206,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py */ } - /* "pywrapfst.pyx":2014 + /* "pywrapfst.pyx":2015 * cdef void _delete_states(self, states=None) except *: * # Only the former signature has a possible indexing failure. * if states: # <<<<<<<<<<<<<< @@ -23260,7 +23216,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py goto __pyx_L3; } - /* "pywrapfst.pyx":2018 + /* "pywrapfst.pyx":2019 * raise FstIndexError("State index out of range") * else: * self._mfst.get().DeleteStates() # <<<<<<<<<<<<<< @@ -23270,13 +23226,13 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py /*else*/ { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2018, __pyx_L1_error) + __PYX_ERR(0, 2019, __pyx_L1_error) } __pyx_v_self->_mfst.get()->DeleteStates(); } __pyx_L3:; - /* "pywrapfst.pyx":2019 + /* "pywrapfst.pyx":2020 * else: * self._mfst.get().DeleteStates() * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -23285,11 +23241,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2019, __pyx_L1_error) + __PYX_ERR(0, 2020, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2019, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2020, __pyx_L1_error) - /* "pywrapfst.pyx":2012 + /* "pywrapfst.pyx":2013 * return self * * cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<< @@ -23308,7 +23264,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__delete_states(struct __pyx_obj_9py __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2021 +/* "pywrapfst.pyx":2022 * self._check_mutating_imethod() * * def delete_states(self, states=None): # <<<<<<<<<<<<<< @@ -23346,7 +23302,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_17delete_states(PyObject *__p } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_states") < 0)) __PYX_ERR(0, 2021, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_states") < 0)) __PYX_ERR(0, 2022, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23360,7 +23316,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_17delete_states(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("delete_states", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2021, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("delete_states", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2022, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.delete_states", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -23379,7 +23335,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_16delete_states(struct __pyx_ struct __pyx_opt_args_9pywrapfst_11_MutableFst__delete_states __pyx_t_1; __Pyx_RefNannySetupContext("delete_states", 0); - /* "pywrapfst.pyx":2039 + /* "pywrapfst.pyx":2040 * See also: `delete_arcs`. * """ * self._delete_states(states) # <<<<<<<<<<<<<< @@ -23388,13 +23344,13 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_16delete_states(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_delete_states"); - __PYX_ERR(0, 2039, __pyx_L1_error) + __PYX_ERR(0, 2040, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.states = __pyx_v_states; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_states(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_states(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2040, __pyx_L1_error) - /* "pywrapfst.pyx":2040 + /* "pywrapfst.pyx":2041 * """ * self._delete_states(states) * return self # <<<<<<<<<<<<<< @@ -23406,7 +23362,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_16delete_states(struct __pyx_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2021 + /* "pywrapfst.pyx":2022 * self._check_mutating_imethod() * * def delete_states(self, states=None): # <<<<<<<<<<<<<< @@ -23424,7 +23380,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_16delete_states(struct __pyx_ return __pyx_r; } -/* "pywrapfst.pyx":2042 +/* "pywrapfst.pyx":2043 * return self * * cdef void _encode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<< @@ -23436,7 +23392,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__encode(struct __pyx_obj_9pywrapfst __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_encode", 0); - /* "pywrapfst.pyx":2043 + /* "pywrapfst.pyx":2044 * * cdef void _encode(self, EncodeMapper encoder) except *: * fst.Encode(self._mfst.get(), encoder._encoder.get()) # <<<<<<<<<<<<<< @@ -23445,15 +23401,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__encode(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2043, __pyx_L1_error) + __PYX_ERR(0, 2044, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_encoder) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encoder"); - __PYX_ERR(0, 2043, __pyx_L1_error) + __PYX_ERR(0, 2044, __pyx_L1_error) } fst::script::Encode(__pyx_v_self->_mfst.get(), __pyx_v_encoder->_encoder.get()); - /* "pywrapfst.pyx":2044 + /* "pywrapfst.pyx":2045 * cdef void _encode(self, EncodeMapper encoder) except *: * fst.Encode(self._mfst.get(), encoder._encoder.get()) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -23462,11 +23418,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__encode(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2044, __pyx_L1_error) + __PYX_ERR(0, 2045, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2044, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2045, __pyx_L1_error) - /* "pywrapfst.pyx":2042 + /* "pywrapfst.pyx":2043 * return self * * cdef void _encode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<< @@ -23482,7 +23438,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__encode(struct __pyx_obj_9pywrapfst __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2046 +/* "pywrapfst.pyx":2047 * self._check_mutating_imethod() * * def encode(self, EncodeMapper encoder): # <<<<<<<<<<<<<< @@ -23497,7 +23453,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_19encode(PyObject *__pyx_v_se PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encode (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 2046, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 2047, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_18encode(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_encoder)); /* function exit code */ @@ -23514,7 +23470,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_18encode(struct __pyx_obj_9py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encode", 0); - /* "pywrapfst.pyx":2067 + /* "pywrapfst.pyx":2068 * See also: `decode`. * """ * self._encode(encoder) # <<<<<<<<<<<<<< @@ -23523,11 +23479,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_18encode(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encode"); - __PYX_ERR(0, 2067, __pyx_L1_error) + __PYX_ERR(0, 2068, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2067, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2068, __pyx_L1_error) - /* "pywrapfst.pyx":2068 + /* "pywrapfst.pyx":2069 * """ * self._encode(encoder) * return self # <<<<<<<<<<<<<< @@ -23539,7 +23495,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_18encode(struct __pyx_obj_9py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2046 + /* "pywrapfst.pyx":2047 * self._check_mutating_imethod() * * def encode(self, EncodeMapper encoder): # <<<<<<<<<<<<<< @@ -23557,7 +23513,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_18encode(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":2070 +/* "pywrapfst.pyx":2071 * return self * * cdef void _invert(self) except *: # <<<<<<<<<<<<<< @@ -23569,7 +23525,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__invert(struct __pyx_obj_9pywrapfst __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_invert", 0); - /* "pywrapfst.pyx":2071 + /* "pywrapfst.pyx":2072 * * cdef void _invert(self) except *: * fst.Invert(self._mfst.get()) # <<<<<<<<<<<<<< @@ -23578,11 +23534,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__invert(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2071, __pyx_L1_error) + __PYX_ERR(0, 2072, __pyx_L1_error) } fst::script::Invert(__pyx_v_self->_mfst.get()); - /* "pywrapfst.pyx":2072 + /* "pywrapfst.pyx":2073 * cdef void _invert(self) except *: * fst.Invert(self._mfst.get()) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -23591,11 +23547,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__invert(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2072, __pyx_L1_error) + __PYX_ERR(0, 2073, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2072, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2073, __pyx_L1_error) - /* "pywrapfst.pyx":2070 + /* "pywrapfst.pyx":2071 * return self * * cdef void _invert(self) except *: # <<<<<<<<<<<<<< @@ -23611,7 +23567,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__invert(struct __pyx_obj_9pywrapfst __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2074 +/* "pywrapfst.pyx":2075 * self._check_mutating_imethod() * * def invert(self): # <<<<<<<<<<<<<< @@ -23638,7 +23594,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_20invert(struct __pyx_obj_9py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("invert", 0); - /* "pywrapfst.pyx":2086 + /* "pywrapfst.pyx":2087 * self. * """ * self._invert() # <<<<<<<<<<<<<< @@ -23647,11 +23603,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_20invert(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_invert"); - __PYX_ERR(0, 2086, __pyx_L1_error) + __PYX_ERR(0, 2087, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_invert(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2086, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_invert(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L1_error) - /* "pywrapfst.pyx":2087 + /* "pywrapfst.pyx":2088 * """ * self._invert() * return self # <<<<<<<<<<<<<< @@ -23663,7 +23619,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_20invert(struct __pyx_obj_9py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2074 + /* "pywrapfst.pyx":2075 * self._check_mutating_imethod() * * def invert(self): # <<<<<<<<<<<<<< @@ -23681,7 +23637,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_20invert(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":2089 +/* "pywrapfst.pyx":2090 * return self * * cdef void _minimize(self, float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -23692,7 +23648,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_20invert(struct __pyx_obj_9py static void __pyx_f_9pywrapfst_11_MutableFst__minimize(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__minimize *__pyx_optional_args) { float __pyx_v_delta = __pyx_k__11; - /* "pywrapfst.pyx":2090 + /* "pywrapfst.pyx":2091 * * cdef void _minimize(self, float delta=fst.kShortestDelta, * bool allow_nondet=False) except *: # <<<<<<<<<<<<<< @@ -23711,7 +23667,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__minimize(struct __pyx_obj_9pywrapf } } - /* "pywrapfst.pyx":2092 + /* "pywrapfst.pyx":2093 * bool allow_nondet=False) except *: * # This runs in-place when the second argument is null. * fst.Minimize(self._mfst.get(), NULL, delta, allow_nondet) # <<<<<<<<<<<<<< @@ -23720,11 +23676,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__minimize(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2092, __pyx_L1_error) + __PYX_ERR(0, 2093, __pyx_L1_error) } fst::script::Minimize(__pyx_v_self->_mfst.get(), NULL, __pyx_v_delta, __pyx_v_allow_nondet); - /* "pywrapfst.pyx":2093 + /* "pywrapfst.pyx":2094 * # This runs in-place when the second argument is null. * fst.Minimize(self._mfst.get(), NULL, delta, allow_nondet) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -23733,11 +23689,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__minimize(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2093, __pyx_L1_error) + __PYX_ERR(0, 2094, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2093, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2094, __pyx_L1_error) - /* "pywrapfst.pyx":2089 + /* "pywrapfst.pyx":2090 * return self * * cdef void _minimize(self, float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -23753,7 +23709,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__minimize(struct __pyx_obj_9pywrapf __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2095 +/* "pywrapfst.pyx":2096 * self._check_mutating_imethod() * * def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<< @@ -23799,7 +23755,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_23minimize(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimize") < 0)) __PYX_ERR(0, 2095, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimize") < 0)) __PYX_ERR(0, 2096, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23812,19 +23768,19 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_23minimize(PyObject *__pyx_v_ } } if (values[0]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2095, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2096, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__12; } if (values[1]) { - __pyx_v_allow_nondet = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_nondet == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2095, __pyx_L3_error) + __pyx_v_allow_nondet = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_nondet == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2096, __pyx_L3_error) } else { __pyx_v_allow_nondet = ((bool)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("minimize", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2095, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("minimize", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2096, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.minimize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -23843,7 +23799,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_22minimize(struct __pyx_obj_9 struct __pyx_opt_args_9pywrapfst_11_MutableFst__minimize __pyx_t_1; __Pyx_RefNannySetupContext("minimize", 0); - /* "pywrapfst.pyx":2121 + /* "pywrapfst.pyx":2122 * self. * """ * self._minimize(delta, allow_nondet) # <<<<<<<<<<<<<< @@ -23852,14 +23808,14 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_22minimize(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_minimize"); - __PYX_ERR(0, 2121, __pyx_L1_error) + __PYX_ERR(0, 2122, __pyx_L1_error) } __pyx_t_1.__pyx_n = 2; __pyx_t_1.delta = __pyx_v_delta; __pyx_t_1.allow_nondet = __pyx_v_allow_nondet; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_minimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2121, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_minimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L1_error) - /* "pywrapfst.pyx":2122 + /* "pywrapfst.pyx":2123 * """ * self._minimize(delta, allow_nondet) * return self # <<<<<<<<<<<<<< @@ -23871,7 +23827,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_22minimize(struct __pyx_obj_9 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2095 + /* "pywrapfst.pyx":2096 * self._check_mutating_imethod() * * def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<< @@ -23889,7 +23845,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_22minimize(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":2124 +/* "pywrapfst.pyx":2125 * return self * * cpdef MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<< @@ -23911,17 +23867,16 @@ static struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_f_9pywrapfst_11_Mut if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mutable_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2124, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mutable_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11_MutableFst_25mutable_arcs)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2124, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -23937,29 +23892,29 @@ static struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_f_9pywrapfst_11_Mut __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2124, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_MutableArcIterator))))) __PYX_ERR(0, 2124, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_MutableArcIterator))))) __PYX_ERR(0, 2125, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":2138 + /* "pywrapfst.pyx":2139 * See also: `arcs`, `states`. * """ * return MutableArcIterator(self, state) # <<<<<<<<<<<<<< @@ -23967,9 +23922,9 @@ static struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_f_9pywrapfst_11_Mut * def mutable_input_symbols(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2138, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2138, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -23977,14 +23932,14 @@ static struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_f_9pywrapfst_11_Mut __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_MutableArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2138, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_MutableArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2124 + /* "pywrapfst.pyx":2125 * return self * * cpdef MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<< @@ -24016,7 +23971,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_25mutable_arcs(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("mutable_arcs (wrapper)", 0); assert(__pyx_arg_state); { - __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2124, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2125, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24037,7 +23992,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_24mutable_arcs(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("mutable_arcs", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_11_MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2124, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_11_MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -24054,7 +24009,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_24mutable_arcs(struct __pyx_o return __pyx_r; } -/* "pywrapfst.pyx":2140 +/* "pywrapfst.pyx":2141 * return MutableArcIterator(self, state) * * def mutable_input_symbols(self): # <<<<<<<<<<<<<< @@ -24084,7 +24039,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_26mutable_input_symbols(struc PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("mutable_input_symbols", 0); - /* "pywrapfst.pyx":2146 + /* "pywrapfst.pyx":2147 * Returns the FST's (mutable) input symbol table, or None if none is present. * """ * cdef fst.SymbolTable *syms = self._mfst.get().MutableInputSymbols() # <<<<<<<<<<<<<< @@ -24093,11 +24048,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_26mutable_input_symbols(struc */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2146, __pyx_L1_error) + __PYX_ERR(0, 2147, __pyx_L1_error) } __pyx_v_syms = __pyx_v_self->_mfst.get()->MutableInputSymbols(); - /* "pywrapfst.pyx":2147 + /* "pywrapfst.pyx":2148 * """ * cdef fst.SymbolTable *syms = self._mfst.get().MutableInputSymbols() * if syms == NULL: # <<<<<<<<<<<<<< @@ -24107,7 +24062,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_26mutable_input_symbols(struc __pyx_t_1 = ((__pyx_v_syms == NULL) != 0); if (__pyx_t_1) { - /* "pywrapfst.pyx":2148 + /* "pywrapfst.pyx":2149 * cdef fst.SymbolTable *syms = self._mfst.get().MutableInputSymbols() * if syms == NULL: * return # <<<<<<<<<<<<<< @@ -24118,7 +24073,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_26mutable_input_symbols(struc __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pywrapfst.pyx":2147 + /* "pywrapfst.pyx":2148 * """ * cdef fst.SymbolTable *syms = self._mfst.get().MutableInputSymbols() * if syms == NULL: # <<<<<<<<<<<<<< @@ -24127,7 +24082,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_26mutable_input_symbols(struc */ } - /* "pywrapfst.pyx":2149 + /* "pywrapfst.pyx":2150 * if syms == NULL: * return * return _init_MutableFstSymbolTable(syms, self._mfst) # <<<<<<<<<<<<<< @@ -24137,15 +24092,15 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_26mutable_input_symbols(struc __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2149, __pyx_L1_error) + __PYX_ERR(0, 2150, __pyx_L1_error) } - __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_syms, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2149, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_syms, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2140 + /* "pywrapfst.pyx":2141 * return MutableArcIterator(self, state) * * def mutable_input_symbols(self): # <<<<<<<<<<<<<< @@ -24164,7 +24119,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_26mutable_input_symbols(struc return __pyx_r; } -/* "pywrapfst.pyx":2151 +/* "pywrapfst.pyx":2152 * return _init_MutableFstSymbolTable(syms, self._mfst) * * def mutable_output_symbols(self): # <<<<<<<<<<<<<< @@ -24194,7 +24149,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_28mutable_output_symbols(stru PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("mutable_output_symbols", 0); - /* "pywrapfst.pyx":2157 + /* "pywrapfst.pyx":2158 * Returns the FST's (mutable) output symbol table, or None if none is present. * """ * cdef fst.SymbolTable *syms = self._mfst.get().MutableOutputSymbols() # <<<<<<<<<<<<<< @@ -24203,11 +24158,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_28mutable_output_symbols(stru */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2157, __pyx_L1_error) + __PYX_ERR(0, 2158, __pyx_L1_error) } __pyx_v_syms = __pyx_v_self->_mfst.get()->MutableOutputSymbols(); - /* "pywrapfst.pyx":2158 + /* "pywrapfst.pyx":2159 * """ * cdef fst.SymbolTable *syms = self._mfst.get().MutableOutputSymbols() * if syms == NULL: # <<<<<<<<<<<<<< @@ -24217,7 +24172,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_28mutable_output_symbols(stru __pyx_t_1 = ((__pyx_v_syms == NULL) != 0); if (__pyx_t_1) { - /* "pywrapfst.pyx":2159 + /* "pywrapfst.pyx":2160 * cdef fst.SymbolTable *syms = self._mfst.get().MutableOutputSymbols() * if syms == NULL: * return # <<<<<<<<<<<<<< @@ -24228,7 +24183,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_28mutable_output_symbols(stru __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pywrapfst.pyx":2158 + /* "pywrapfst.pyx":2159 * """ * cdef fst.SymbolTable *syms = self._mfst.get().MutableOutputSymbols() * if syms == NULL: # <<<<<<<<<<<<<< @@ -24237,7 +24192,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_28mutable_output_symbols(stru */ } - /* "pywrapfst.pyx":2160 + /* "pywrapfst.pyx":2161 * if syms == NULL: * return * return _init_MutableFstSymbolTable(syms, self._mfst) # <<<<<<<<<<<<<< @@ -24247,15 +24202,15 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_28mutable_output_symbols(stru __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2160, __pyx_L1_error) + __PYX_ERR(0, 2161, __pyx_L1_error) } - __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_syms, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_syms, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2151 + /* "pywrapfst.pyx":2152 * return _init_MutableFstSymbolTable(syms, self._mfst) * * def mutable_output_symbols(self): # <<<<<<<<<<<<<< @@ -24274,7 +24229,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_28mutable_output_symbols(stru return __pyx_r; } -/* "pywrapfst.pyx":2162 +/* "pywrapfst.pyx":2163 * return _init_MutableFstSymbolTable(syms, self._mfst) * * cpdef int64 num_states(self): # <<<<<<<<<<<<<< @@ -24296,13 +24251,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_num_states(st if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11_MutableFst_31num_states)) { __Pyx_INCREF(__pyx_t_1); @@ -24318,29 +24272,29 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_num_states(st } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2162, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2162, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":2168 + /* "pywrapfst.pyx":2169 * Returns the number of states. * """ * return self._mfst.get().NumStates() # <<<<<<<<<<<<<< @@ -24349,12 +24303,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_11_MutableFst_num_states(st */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2168, __pyx_L1_error) + __PYX_ERR(0, 2169, __pyx_L1_error) } __pyx_r = __pyx_v_self->_mfst.get()->NumStates(); goto __pyx_L0; - /* "pywrapfst.pyx":2162 + /* "pywrapfst.pyx":2163 * return _init_MutableFstSymbolTable(syms, self._mfst) * * cpdef int64 num_states(self): # <<<<<<<<<<<<<< @@ -24395,7 +24349,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_30num_states(struct __pyx_obj PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("num_states", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_11_MutableFst_num_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_11_MutableFst_num_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -24412,7 +24366,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_30num_states(struct __pyx_obj return __pyx_r; } -/* "pywrapfst.pyx":2170 +/* "pywrapfst.pyx":2171 * return self._mfst.get().NumStates() * * cdef void _project(self, bool project_output=False) except *: # <<<<<<<<<<<<<< @@ -24430,7 +24384,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__project(struct __pyx_obj_9pywrapfs } } - /* "pywrapfst.pyx":2171 + /* "pywrapfst.pyx":2172 * * cdef void _project(self, bool project_output=False) except *: * fst.Project(self._mfst.get(), fst.GetProjectType(project_output)) # <<<<<<<<<<<<<< @@ -24439,11 +24393,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__project(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2171, __pyx_L1_error) + __PYX_ERR(0, 2172, __pyx_L1_error) } fst::script::Project(__pyx_v_self->_mfst.get(), fst::script::GetProjectType(__pyx_v_project_output)); - /* "pywrapfst.pyx":2172 + /* "pywrapfst.pyx":2173 * cdef void _project(self, bool project_output=False) except *: * fst.Project(self._mfst.get(), fst.GetProjectType(project_output)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -24452,11 +24406,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__project(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2172, __pyx_L1_error) + __PYX_ERR(0, 2173, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2172, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2173, __pyx_L1_error) - /* "pywrapfst.pyx":2170 + /* "pywrapfst.pyx":2171 * return self._mfst.get().NumStates() * * cdef void _project(self, bool project_output=False) except *: # <<<<<<<<<<<<<< @@ -24472,7 +24426,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__project(struct __pyx_obj_9pywrapfs __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2174 +/* "pywrapfst.pyx":2175 * self._check_mutating_imethod() * * def project(self, bool project_output=False): # <<<<<<<<<<<<<< @@ -24509,7 +24463,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_33project(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "project") < 0)) __PYX_ERR(0, 2174, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "project") < 0)) __PYX_ERR(0, 2175, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -24520,14 +24474,14 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_33project(PyObject *__pyx_v_s } } if (values[0]) { - __pyx_v_project_output = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_project_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2174, __pyx_L3_error) + __pyx_v_project_output = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_project_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2175, __pyx_L3_error) } else { __pyx_v_project_output = ((bool)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("project", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("project", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2175, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.project", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -24546,7 +24500,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_32project(struct __pyx_obj_9p struct __pyx_opt_args_9pywrapfst_11_MutableFst__project __pyx_t_1; __Pyx_RefNannySetupContext("project", 0); - /* "pywrapfst.pyx":2192 + /* "pywrapfst.pyx":2193 * See also: `decode`, `encode`, `relabel_pairs`, `relabel_symbols`. * """ * self._project(project_output) # <<<<<<<<<<<<<< @@ -24555,13 +24509,13 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_32project(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_project"); - __PYX_ERR(0, 2192, __pyx_L1_error) + __PYX_ERR(0, 2193, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.project_output = __pyx_v_project_output; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2192, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2193, __pyx_L1_error) - /* "pywrapfst.pyx":2193 + /* "pywrapfst.pyx":2194 * """ * self._project(project_output) * return self # <<<<<<<<<<<<<< @@ -24573,7 +24527,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_32project(struct __pyx_obj_9p __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2174 + /* "pywrapfst.pyx":2175 * self._check_mutating_imethod() * * def project(self, bool project_output=False): # <<<<<<<<<<<<<< @@ -24591,7 +24545,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_32project(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":2195 +/* "pywrapfst.pyx":2196 * return self * * cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -24603,7 +24557,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__prune(struct __pyx_obj_9pywrapfst_ float __pyx_v_delta = __pyx_k__13; __pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__14; - /* "pywrapfst.pyx":2196 + /* "pywrapfst.pyx":2197 * * cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId, * weight=None) except *: # <<<<<<<<<<<<<< @@ -24627,7 +24581,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__prune(struct __pyx_obj_9pywrapfst_ } } - /* "pywrapfst.pyx":2198 + /* "pywrapfst.pyx":2199 * weight=None) except *: * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(), # <<<<<<<<<<<<<< @@ -24636,20 +24590,20 @@ static void __pyx_f_9pywrapfst_11_MutableFst__prune(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2198, __pyx_L1_error) + __PYX_ERR(0, 2199, __pyx_L1_error) } - /* "pywrapfst.pyx":2199 + /* "pywrapfst.pyx":2200 * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(), * weight) # <<<<<<<<<<<<<< * fst.Prune(self._mfst.get(), wc, nstate, delta) * self._check_mutating_imethod() */ - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2199, __pyx_L1_error) __pyx_v_wc = __pyx_t_1; - /* "pywrapfst.pyx":2200 + /* "pywrapfst.pyx":2201 * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(), * weight) * fst.Prune(self._mfst.get(), wc, nstate, delta) # <<<<<<<<<<<<<< @@ -24658,11 +24612,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__prune(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2200, __pyx_L1_error) + __PYX_ERR(0, 2201, __pyx_L1_error) } fst::script::Prune(__pyx_v_self->_mfst.get(), __pyx_v_wc, __pyx_v_nstate, __pyx_v_delta); - /* "pywrapfst.pyx":2201 + /* "pywrapfst.pyx":2202 * weight) * fst.Prune(self._mfst.get(), wc, nstate, delta) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -24671,11 +24625,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__prune(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2201, __pyx_L1_error) + __PYX_ERR(0, 2202, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2201, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2202, __pyx_L1_error) - /* "pywrapfst.pyx":2195 + /* "pywrapfst.pyx":2196 * return self * * cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -24691,7 +24645,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__prune(struct __pyx_obj_9pywrapfst_ __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2203 +/* "pywrapfst.pyx":2204 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< @@ -24713,7 +24667,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_35prune(PyObject *__pyx_v_sel static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_weight,0}; PyObject* values[3] = {0,0,0}; - /* "pywrapfst.pyx":2206 + /* "pywrapfst.pyx":2207 * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, * weight=None): # <<<<<<<<<<<<<< @@ -24755,7 +24709,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_35prune(PyObject *__pyx_v_sel } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 2203, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 2204, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -24770,12 +24724,12 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_35prune(PyObject *__pyx_v_sel } } if (values[0]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2204, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2205, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__15; } if (values[1]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2205, __pyx_L3_error) + __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2206, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_k__16; } @@ -24783,7 +24737,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_35prune(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2203, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2204, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.prune", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -24791,7 +24745,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_35prune(PyObject *__pyx_v_sel __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_34prune(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight); - /* "pywrapfst.pyx":2203 + /* "pywrapfst.pyx":2204 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< @@ -24810,7 +24764,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_34prune(struct __pyx_obj_9pyw struct __pyx_opt_args_9pywrapfst_11_MutableFst__prune __pyx_t_1; __Pyx_RefNannySetupContext("prune", 0); - /* "pywrapfst.pyx":2228 + /* "pywrapfst.pyx":2229 * See also: The constructive variant. * """ * self._prune(delta, nstate, weight) # <<<<<<<<<<<<<< @@ -24819,15 +24773,15 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_34prune(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_prune"); - __PYX_ERR(0, 2228, __pyx_L1_error) + __PYX_ERR(0, 2229, __pyx_L1_error) } __pyx_t_1.__pyx_n = 3; __pyx_t_1.delta = __pyx_v_delta; __pyx_t_1.nstate = __pyx_v_nstate; __pyx_t_1.weight = __pyx_v_weight; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_prune(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2228, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_prune(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2229, __pyx_L1_error) - /* "pywrapfst.pyx":2229 + /* "pywrapfst.pyx":2230 * """ * self._prune(delta, nstate, weight) * return self # <<<<<<<<<<<<<< @@ -24839,7 +24793,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_34prune(struct __pyx_obj_9pyw __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2203 + /* "pywrapfst.pyx":2204 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< @@ -24857,7 +24811,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_34prune(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":2231 +/* "pywrapfst.pyx":2232 * return self * * cdef void _push(self, # <<<<<<<<<<<<<< @@ -24868,7 +24822,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_34prune(struct __pyx_obj_9pyw static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__push *__pyx_optional_args) { float __pyx_v_delta = __pyx_k__17; - /* "pywrapfst.pyx":2233 + /* "pywrapfst.pyx":2234 * cdef void _push(self, * float delta=fst.kDelta, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -24877,7 +24831,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__ */ bool __pyx_v_remove_total_weight = ((bool)0); - /* "pywrapfst.pyx":2234 + /* "pywrapfst.pyx":2235 * float delta=fst.kDelta, * bool remove_total_weight=False, * bool to_final=False) except *: # <<<<<<<<<<<<<< @@ -24899,7 +24853,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__ } } - /* "pywrapfst.pyx":2235 + /* "pywrapfst.pyx":2236 * bool remove_total_weight=False, * bool to_final=False) except *: * fst.Push(self._mfst.get(), fst.GetReweightType(to_final), delta, # <<<<<<<<<<<<<< @@ -24908,10 +24862,10 @@ static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2235, __pyx_L1_error) + __PYX_ERR(0, 2236, __pyx_L1_error) } - /* "pywrapfst.pyx":2236 + /* "pywrapfst.pyx":2237 * bool to_final=False) except *: * fst.Push(self._mfst.get(), fst.GetReweightType(to_final), delta, * remove_total_weight) # <<<<<<<<<<<<<< @@ -24920,7 +24874,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__ */ fst::script::Push(__pyx_v_self->_mfst.get(), fst::script::GetReweightType(__pyx_v_to_final), __pyx_v_delta, __pyx_v_remove_total_weight); - /* "pywrapfst.pyx":2237 + /* "pywrapfst.pyx":2238 * fst.Push(self._mfst.get(), fst.GetReweightType(to_final), delta, * remove_total_weight) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -24929,11 +24883,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2237, __pyx_L1_error) + __PYX_ERR(0, 2238, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2237, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2238, __pyx_L1_error) - /* "pywrapfst.pyx":2231 + /* "pywrapfst.pyx":2232 * return self * * cdef void _push(self, # <<<<<<<<<<<<<< @@ -24949,7 +24903,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__ __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2239 +/* "pywrapfst.pyx":2240 * self._check_mutating_imethod() * * def push(self, # <<<<<<<<<<<<<< @@ -25004,7 +24958,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_37push(PyObject *__pyx_v_self } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 2239, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 2240, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -25019,15 +24973,15 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_37push(PyObject *__pyx_v_self } } if (values[0]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2240, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2241, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__18; } if (values[1]) { - __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2241, __pyx_L3_error) + __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L3_error) } else { - /* "pywrapfst.pyx":2241 + /* "pywrapfst.pyx":2242 * def push(self, * float delta=fst.kDelta, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -25037,10 +24991,10 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_37push(PyObject *__pyx_v_self __pyx_v_remove_total_weight = ((bool)0); } if (values[2]) { - __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L3_error) + __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error) } else { - /* "pywrapfst.pyx":2242 + /* "pywrapfst.pyx":2243 * float delta=fst.kDelta, * bool remove_total_weight=False, * bool to_final=False): # <<<<<<<<<<<<<< @@ -25052,7 +25006,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_37push(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("push", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2239, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("push", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.push", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25060,7 +25014,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_37push(PyObject *__pyx_v_self __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_36push(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_remove_total_weight, __pyx_v_to_final); - /* "pywrapfst.pyx":2239 + /* "pywrapfst.pyx":2240 * self._check_mutating_imethod() * * def push(self, # <<<<<<<<<<<<<< @@ -25079,7 +25033,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_36push(struct __pyx_obj_9pywr struct __pyx_opt_args_9pywrapfst_11_MutableFst__push __pyx_t_1; __Pyx_RefNannySetupContext("push", 0); - /* "pywrapfst.pyx":2268 + /* "pywrapfst.pyx":2269 * See also: The constructive variant, which also supports label pushing. * """ * self._push(delta, remove_total_weight, to_final) # <<<<<<<<<<<<<< @@ -25088,15 +25042,15 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_36push(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_push"); - __PYX_ERR(0, 2268, __pyx_L1_error) + __PYX_ERR(0, 2269, __pyx_L1_error) } __pyx_t_1.__pyx_n = 3; __pyx_t_1.delta = __pyx_v_delta; __pyx_t_1.remove_total_weight = __pyx_v_remove_total_weight; __pyx_t_1.to_final = __pyx_v_to_final; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_push(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2268, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_push(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2269, __pyx_L1_error) - /* "pywrapfst.pyx":2269 + /* "pywrapfst.pyx":2270 * """ * self._push(delta, remove_total_weight, to_final) * return self # <<<<<<<<<<<<<< @@ -25108,7 +25062,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_36push(struct __pyx_obj_9pywr __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2239 + /* "pywrapfst.pyx":2240 * self._check_mutating_imethod() * * def push(self, # <<<<<<<<<<<<<< @@ -25126,7 +25080,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_36push(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":2271 +/* "pywrapfst.pyx":2272 * return self * * cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<< @@ -25166,7 +25120,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py } } - /* "pywrapfst.pyx":2273 + /* "pywrapfst.pyx":2274 * cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: * cdef unique_ptr[vector[fst.LabelPair]] _ipairs * _ipairs.reset(new vector[fst.LabelPair]()) # <<<<<<<<<<<<<< @@ -25177,11 +25131,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __pyx_t_1 = new std::vector<__pyx_t_3fst_LabelPair> (); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2273, __pyx_L1_error) + __PYX_ERR(0, 2274, __pyx_L1_error) } __pyx_v__ipairs.reset(__pyx_t_1); - /* "pywrapfst.pyx":2275 + /* "pywrapfst.pyx":2276 * _ipairs.reset(new vector[fst.LabelPair]()) * cdef unique_ptr[vector[fst.LabelPair]] _opairs * _opairs.reset(new vector[fst.LabelPair]()) # <<<<<<<<<<<<<< @@ -25192,21 +25146,21 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __pyx_t_1 = new std::vector<__pyx_t_3fst_LabelPair> (); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2275, __pyx_L1_error) + __PYX_ERR(0, 2276, __pyx_L1_error) } __pyx_v__opairs.reset(__pyx_t_1); - /* "pywrapfst.pyx":2278 + /* "pywrapfst.pyx":2279 * cdef int64 before * cdef int64 after * if ipairs: # <<<<<<<<<<<<<< * for (before, after) in ipairs: * _ipairs.get().push_back(fst.LabelPair(before, after)) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2278, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2279, __pyx_L1_error) if (__pyx_t_2) { - /* "pywrapfst.pyx":2279 + /* "pywrapfst.pyx":2280 * cdef int64 after * if ipairs: * for (before, after) in ipairs: # <<<<<<<<<<<<<< @@ -25217,26 +25171,26 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __pyx_t_3 = __pyx_v_ipairs; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2280, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2280, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2280, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -25246,7 +25200,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2279, __pyx_L1_error) + else __PYX_ERR(0, 2280, __pyx_L1_error) } break; } @@ -25258,7 +25212,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2279, __pyx_L1_error) + __PYX_ERR(0, 2280, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25271,15 +25225,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -25287,7 +25241,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2279, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2280, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; @@ -25295,17 +25249,17 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2279, __pyx_L1_error) + __PYX_ERR(0, 2280, __pyx_L1_error) __pyx_L7_unpacking_done:; } - __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2279, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_before = __pyx_t_11; __pyx_v_after = __pyx_t_12; - /* "pywrapfst.pyx":2280 + /* "pywrapfst.pyx":2281 * if ipairs: * for (before, after) in ipairs: * _ipairs.get().push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<< @@ -25316,16 +25270,16 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __pyx_t_13 = __pyx_t_3fst_LabelPair(__pyx_v_before, __pyx_v_after); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2280, __pyx_L1_error) + __PYX_ERR(0, 2281, __pyx_L1_error) } try { __pyx_v__ipairs.get()->push_back(__pyx_t_13); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2280, __pyx_L1_error) + __PYX_ERR(0, 2281, __pyx_L1_error) } - /* "pywrapfst.pyx":2279 + /* "pywrapfst.pyx":2280 * cdef int64 after * if ipairs: * for (before, after) in ipairs: # <<<<<<<<<<<<<< @@ -25335,7 +25289,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pywrapfst.pyx":2278 + /* "pywrapfst.pyx":2279 * cdef int64 before * cdef int64 after * if ipairs: # <<<<<<<<<<<<<< @@ -25344,17 +25298,17 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py */ } - /* "pywrapfst.pyx":2281 + /* "pywrapfst.pyx":2282 * for (before, after) in ipairs: * _ipairs.get().push_back(fst.LabelPair(before, after)) * if opairs: # <<<<<<<<<<<<<< * for (before, after) in opairs: * _opairs.get().push_back(fst.LabelPair(before, after)) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2281, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2282, __pyx_L1_error) if (__pyx_t_2) { - /* "pywrapfst.pyx":2282 + /* "pywrapfst.pyx":2283 * _ipairs.get().push_back(fst.LabelPair(before, after)) * if opairs: * for (before, after) in opairs: # <<<<<<<<<<<<<< @@ -25365,26 +25319,26 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __pyx_t_3 = __pyx_v_opairs; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2283, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2283, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2283, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -25394,7 +25348,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2282, __pyx_L1_error) + else __PYX_ERR(0, 2283, __pyx_L1_error) } break; } @@ -25406,7 +25360,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2282, __pyx_L1_error) + __PYX_ERR(0, 2283, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25419,15 +25373,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -25435,7 +25389,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2282, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2283, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_unpacking_done; @@ -25443,17 +25397,17 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2282, __pyx_L1_error) + __PYX_ERR(0, 2283, __pyx_L1_error) __pyx_L12_unpacking_done:; } - __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_before = __pyx_t_12; __pyx_v_after = __pyx_t_11; - /* "pywrapfst.pyx":2283 + /* "pywrapfst.pyx":2284 * if opairs: * for (before, after) in opairs: * _opairs.get().push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<< @@ -25464,16 +25418,16 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __pyx_t_13 = __pyx_t_3fst_LabelPair(__pyx_v_before, __pyx_v_after); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2283, __pyx_L1_error) + __PYX_ERR(0, 2284, __pyx_L1_error) } try { __pyx_v__opairs.get()->push_back(__pyx_t_13); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2283, __pyx_L1_error) + __PYX_ERR(0, 2284, __pyx_L1_error) } - /* "pywrapfst.pyx":2282 + /* "pywrapfst.pyx":2283 * _ipairs.get().push_back(fst.LabelPair(before, after)) * if opairs: * for (before, after) in opairs: # <<<<<<<<<<<<<< @@ -25483,7 +25437,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pywrapfst.pyx":2281 + /* "pywrapfst.pyx":2282 * for (before, after) in ipairs: * _ipairs.get().push_back(fst.LabelPair(before, after)) * if opairs: # <<<<<<<<<<<<<< @@ -25492,7 +25446,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py */ } - /* "pywrapfst.pyx":2284 + /* "pywrapfst.pyx":2285 * for (before, after) in opairs: * _opairs.get().push_back(fst.LabelPair(before, after)) * if _ipairs.get().empty() and _opairs.get().empty(): # <<<<<<<<<<<<<< @@ -25510,14 +25464,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __pyx_L14_bool_binop_done:; if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":2285 + /* "pywrapfst.pyx":2286 * _opairs.get().push_back(fst.LabelPair(before, after)) * if _ipairs.get().empty() and _opairs.get().empty(): * raise FstArgError("No relabeling pairs specified.") # <<<<<<<<<<<<<< * fst.Relabel(self._mfst.get(), deref(_ipairs), deref(_opairs)) * self._check_mutating_imethod() */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2285, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -25531,14 +25485,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_No_relabeling_pairs_specified) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_No_relabeling_pairs_specified); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2285, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2285, __pyx_L1_error) + __PYX_ERR(0, 2286, __pyx_L1_error) - /* "pywrapfst.pyx":2284 + /* "pywrapfst.pyx":2285 * for (before, after) in opairs: * _opairs.get().push_back(fst.LabelPair(before, after)) * if _ipairs.get().empty() and _opairs.get().empty(): # <<<<<<<<<<<<<< @@ -25547,7 +25501,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py */ } - /* "pywrapfst.pyx":2286 + /* "pywrapfst.pyx":2287 * if _ipairs.get().empty() and _opairs.get().empty(): * raise FstArgError("No relabeling pairs specified.") * fst.Relabel(self._mfst.get(), deref(_ipairs), deref(_opairs)) # <<<<<<<<<<<<<< @@ -25556,11 +25510,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2286, __pyx_L1_error) + __PYX_ERR(0, 2287, __pyx_L1_error) } fst::script::Relabel(__pyx_v_self->_mfst.get(), (*__pyx_v__ipairs), (*__pyx_v__opairs)); - /* "pywrapfst.pyx":2287 + /* "pywrapfst.pyx":2288 * raise FstArgError("No relabeling pairs specified.") * fst.Relabel(self._mfst.get(), deref(_ipairs), deref(_opairs)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -25569,11 +25523,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2287, __pyx_L1_error) + __PYX_ERR(0, 2288, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2287, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2288, __pyx_L1_error) - /* "pywrapfst.pyx":2271 + /* "pywrapfst.pyx":2272 * return self * * cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<< @@ -25594,7 +25548,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_pairs(struct __pyx_obj_9py __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2289 +/* "pywrapfst.pyx":2290 * self._check_mutating_imethod() * * def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<< @@ -25642,7 +25596,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_39relabel_pairs(PyObject *__p } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_pairs") < 0)) __PYX_ERR(0, 2289, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_pairs") < 0)) __PYX_ERR(0, 2290, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -25659,7 +25613,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_39relabel_pairs(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("relabel_pairs", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2289, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("relabel_pairs", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2290, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.relabel_pairs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25678,7 +25632,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_38relabel_pairs(struct __pyx_ struct __pyx_opt_args_9pywrapfst_11_MutableFst__relabel_pairs __pyx_t_1; __Pyx_RefNannySetupContext("relabel_pairs", 0); - /* "pywrapfst.pyx":2311 + /* "pywrapfst.pyx":2312 * See also: `decode`, `encode`, `project`, `relabel_tables`. * """ * self._relabel_pairs(ipairs, opairs) # <<<<<<<<<<<<<< @@ -25687,14 +25641,14 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_38relabel_pairs(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_relabel_pairs"); - __PYX_ERR(0, 2311, __pyx_L1_error) + __PYX_ERR(0, 2312, __pyx_L1_error) } __pyx_t_1.__pyx_n = 2; __pyx_t_1.ipairs = __pyx_v_ipairs; __pyx_t_1.opairs = __pyx_v_opairs; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_pairs(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2311, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_pairs(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2312, __pyx_L1_error) - /* "pywrapfst.pyx":2312 + /* "pywrapfst.pyx":2313 * """ * self._relabel_pairs(ipairs, opairs) * return self # <<<<<<<<<<<<<< @@ -25706,7 +25660,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_38relabel_pairs(struct __pyx_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2289 + /* "pywrapfst.pyx":2290 * self._check_mutating_imethod() * * def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<< @@ -25724,7 +25678,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_38relabel_pairs(struct __pyx_ return __pyx_r; } -/* "pywrapfst.pyx":2314 +/* "pywrapfst.pyx":2315 * return self * * cdef void _relabel_tables(self, # <<<<<<<<<<<<<< @@ -25734,7 +25688,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_38relabel_pairs(struct __pyx_ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__relabel_tables *__pyx_optional_args) { - /* "pywrapfst.pyx":2315 + /* "pywrapfst.pyx":2316 * * cdef void _relabel_tables(self, * _SymbolTable old_isymbols=None, # <<<<<<<<<<<<<< @@ -25743,7 +25697,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":2316 + /* "pywrapfst.pyx":2317 * cdef void _relabel_tables(self, * _SymbolTable old_isymbols=None, * _SymbolTable new_isymbols=None, # <<<<<<<<<<<<<< @@ -25753,7 +25707,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); PyObject *__pyx_v_unknown_isymbol = ((PyObject *)__pyx_kp_b__10); - /* "pywrapfst.pyx":2318 + /* "pywrapfst.pyx":2319 * _SymbolTable new_isymbols=None, * unknown_isymbol=b"", * bool attach_new_isymbols=True, # <<<<<<<<<<<<<< @@ -25762,7 +25716,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ bool __pyx_v_attach_new_isymbols = ((bool)1); - /* "pywrapfst.pyx":2319 + /* "pywrapfst.pyx":2320 * unknown_isymbol=b"", * bool attach_new_isymbols=True, * _SymbolTable old_osymbols=None, # <<<<<<<<<<<<<< @@ -25771,7 +25725,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":2320 + /* "pywrapfst.pyx":2321 * bool attach_new_isymbols=True, * _SymbolTable old_osymbols=None, * _SymbolTable new_osymbols=None, # <<<<<<<<<<<<<< @@ -25781,7 +25735,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); PyObject *__pyx_v_unknown_osymbol = ((PyObject *)__pyx_kp_b__10); - /* "pywrapfst.pyx":2322 + /* "pywrapfst.pyx":2323 * _SymbolTable new_osymbols=None, * unknown_osymbol=b"", * bool attach_new_osymbols=True) except *: # <<<<<<<<<<<<<< @@ -25831,7 +25785,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p } } - /* "pywrapfst.pyx":2323 + /* "pywrapfst.pyx":2324 * unknown_osymbol=b"", * bool attach_new_osymbols=True) except *: * if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<< @@ -25851,14 +25805,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2324 + /* "pywrapfst.pyx":2325 * bool attach_new_osymbols=True) except *: * if new_isymbols is None and new_osymbols is None: * raise FstArgError("No new SymbolTables specified") # <<<<<<<<<<<<<< * cdef fst.SymbolTable *new_isymbols_ptr = NULL * if new_isymbols is not None: */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2324, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -25872,14 +25826,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_u_No_new_SymbolTables_specified) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_No_new_SymbolTables_specified); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2324, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 2324, __pyx_L1_error) + __PYX_ERR(0, 2325, __pyx_L1_error) - /* "pywrapfst.pyx":2323 + /* "pywrapfst.pyx":2324 * unknown_osymbol=b"", * bool attach_new_osymbols=True) except *: * if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<< @@ -25888,7 +25842,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ } - /* "pywrapfst.pyx":2325 + /* "pywrapfst.pyx":2326 * if new_isymbols is None and new_osymbols is None: * raise FstArgError("No new SymbolTables specified") * cdef fst.SymbolTable *new_isymbols_ptr = NULL # <<<<<<<<<<<<<< @@ -25897,7 +25851,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ __pyx_v_new_isymbols_ptr = NULL; - /* "pywrapfst.pyx":2326 + /* "pywrapfst.pyx":2327 * raise FstArgError("No new SymbolTables specified") * cdef fst.SymbolTable *new_isymbols_ptr = NULL * if new_isymbols is not None: # <<<<<<<<<<<<<< @@ -25908,7 +25862,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pywrapfst.pyx":2327 + /* "pywrapfst.pyx":2328 * cdef fst.SymbolTable *new_isymbols_ptr = NULL * if new_isymbols is not None: * new_isymbols_ptr = new_isymbols._table # <<<<<<<<<<<<<< @@ -25917,12 +25871,12 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_new_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 2327, __pyx_L1_error) + __PYX_ERR(0, 2328, __pyx_L1_error) } __pyx_t_7 = __pyx_v_new_isymbols->_table; __pyx_v_new_isymbols_ptr = __pyx_t_7; - /* "pywrapfst.pyx":2326 + /* "pywrapfst.pyx":2327 * raise FstArgError("No new SymbolTables specified") * cdef fst.SymbolTable *new_isymbols_ptr = NULL * if new_isymbols is not None: # <<<<<<<<<<<<<< @@ -25931,7 +25885,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ } - /* "pywrapfst.pyx":2328 + /* "pywrapfst.pyx":2329 * if new_isymbols is not None: * new_isymbols_ptr = new_isymbols._table * cdef fst.SymbolTable *new_osymbols_ptr = NULL # <<<<<<<<<<<<<< @@ -25940,7 +25894,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ __pyx_v_new_osymbols_ptr = NULL; - /* "pywrapfst.pyx":2329 + /* "pywrapfst.pyx":2330 * new_isymbols_ptr = new_isymbols._table * cdef fst.SymbolTable *new_osymbols_ptr = NULL * if new_osymbols is not None: # <<<<<<<<<<<<<< @@ -25951,7 +25905,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pywrapfst.pyx":2330 + /* "pywrapfst.pyx":2331 * cdef fst.SymbolTable *new_osymbols_ptr = NULL * if new_osymbols is not None: * new_osymbols_ptr = new_osymbols._table # <<<<<<<<<<<<<< @@ -25960,12 +25914,12 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_new_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 2330, __pyx_L1_error) + __PYX_ERR(0, 2331, __pyx_L1_error) } __pyx_t_7 = __pyx_v_new_osymbols->_table; __pyx_v_new_osymbols_ptr = __pyx_t_7; - /* "pywrapfst.pyx":2329 + /* "pywrapfst.pyx":2330 * new_isymbols_ptr = new_isymbols._table * cdef fst.SymbolTable *new_osymbols_ptr = NULL * if new_osymbols is not None: # <<<<<<<<<<<<<< @@ -25974,7 +25928,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ } - /* "pywrapfst.pyx":2331 + /* "pywrapfst.pyx":2332 * if new_osymbols is not None: * new_osymbols_ptr = new_osymbols._table * fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<< @@ -25983,10 +25937,10 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2331, __pyx_L1_error) + __PYX_ERR(0, 2332, __pyx_L1_error) } - /* "pywrapfst.pyx":2332 + /* "pywrapfst.pyx":2333 * new_osymbols_ptr = new_osymbols._table * fst.Relabel(self._mfst.get(), * self._fst.get().InputSymbols() if old_isymbols is None else # <<<<<<<<<<<<<< @@ -25997,12 +25951,12 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p if ((__pyx_t_1 != 0)) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2332, __pyx_L1_error) + __PYX_ERR(0, 2333, __pyx_L1_error) } __pyx_t_8 = __pyx_v_self->__pyx_base._fst.get()->InputSymbols(); } else { - /* "pywrapfst.pyx":2333 + /* "pywrapfst.pyx":2334 * fst.Relabel(self._mfst.get(), * self._fst.get().InputSymbols() if old_isymbols is None else * old_isymbols._table, new_isymbols_ptr, tostring(unknown_isymbol), # <<<<<<<<<<<<<< @@ -26011,13 +25965,13 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_old_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 2333, __pyx_L1_error) + __PYX_ERR(0, 2334, __pyx_L1_error) } __pyx_t_8 = __pyx_v_old_isymbols->_table; } - __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_isymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2333, __pyx_L1_error) + __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_isymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L1_error) - /* "pywrapfst.pyx":2335 + /* "pywrapfst.pyx":2336 * old_isymbols._table, new_isymbols_ptr, tostring(unknown_isymbol), * attach_new_isymbols, * self._fst.get().OutputSymbols() if old_osymbols is None else # <<<<<<<<<<<<<< @@ -26028,12 +25982,12 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p if ((__pyx_t_1 != 0)) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2335, __pyx_L1_error) + __PYX_ERR(0, 2336, __pyx_L1_error) } __pyx_t_10 = __pyx_v_self->__pyx_base._fst.get()->OutputSymbols(); } else { - /* "pywrapfst.pyx":2336 + /* "pywrapfst.pyx":2337 * attach_new_isymbols, * self._fst.get().OutputSymbols() if old_osymbols is None else * old_osymbols._table, new_osymbols_ptr, tostring(unknown_osymbol), # <<<<<<<<<<<<<< @@ -26042,13 +25996,13 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_old_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 2336, __pyx_L1_error) + __PYX_ERR(0, 2337, __pyx_L1_error) } __pyx_t_10 = __pyx_v_old_osymbols->_table; } - __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_osymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_osymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2337, __pyx_L1_error) - /* "pywrapfst.pyx":2331 + /* "pywrapfst.pyx":2332 * if new_osymbols is not None: * new_osymbols_ptr = new_osymbols._table * fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<< @@ -26057,7 +26011,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ fst::script::Relabel(__pyx_v_self->_mfst.get(), __pyx_t_8, __pyx_v_new_isymbols_ptr, __pyx_t_9, __pyx_v_attach_new_isymbols, __pyx_t_10, __pyx_v_new_osymbols_ptr, __pyx_t_11, __pyx_v_attach_new_osymbols); - /* "pywrapfst.pyx":2338 + /* "pywrapfst.pyx":2339 * old_osymbols._table, new_osymbols_ptr, tostring(unknown_osymbol), * attach_new_osymbols) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -26066,11 +26020,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2338, __pyx_L1_error) + __PYX_ERR(0, 2339, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2338, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2339, __pyx_L1_error) - /* "pywrapfst.pyx":2314 + /* "pywrapfst.pyx":2315 * return self * * cdef void _relabel_tables(self, # <<<<<<<<<<<<<< @@ -26089,7 +26043,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9p __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2340 +/* "pywrapfst.pyx":2341 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< @@ -26116,7 +26070,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old_isymbols,&__pyx_n_s_new_isymbols,&__pyx_n_s_unknown_isymbol,&__pyx_n_s_attach_new_isymbols,&__pyx_n_s_old_osymbols,&__pyx_n_s_new_osymbols,&__pyx_n_s_unknown_osymbol,&__pyx_n_s_attach_new_osymbols,0}; PyObject* values[8] = {0,0,0,0,0,0,0,0}; - /* "pywrapfst.pyx":2341 + /* "pywrapfst.pyx":2342 * * def relabel_tables(self, * _SymbolTable old_isymbols=None, # <<<<<<<<<<<<<< @@ -26125,7 +26079,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ */ values[0] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":2342 + /* "pywrapfst.pyx":2343 * def relabel_tables(self, * _SymbolTable old_isymbols=None, * _SymbolTable new_isymbols=None, # <<<<<<<<<<<<<< @@ -26135,7 +26089,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ values[1] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); values[2] = ((PyObject *)__pyx_kp_b__10); - /* "pywrapfst.pyx":2345 + /* "pywrapfst.pyx":2346 * unknown_isymbol=b"", * bool attach_new_isymbols=True, * _SymbolTable old_osymbols=None, # <<<<<<<<<<<<<< @@ -26144,7 +26098,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ */ values[4] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None); - /* "pywrapfst.pyx":2346 + /* "pywrapfst.pyx":2347 * bool attach_new_isymbols=True, * _SymbolTable old_osymbols=None, * _SymbolTable new_osymbols=None, # <<<<<<<<<<<<<< @@ -26227,7 +26181,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2340, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2341, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -26255,10 +26209,10 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ __pyx_v_new_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[1]); __pyx_v_unknown_isymbol = values[2]; if (values[3]) { - __pyx_v_attach_new_isymbols = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_attach_new_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2344, __pyx_L3_error) + __pyx_v_attach_new_isymbols = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_attach_new_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2345, __pyx_L3_error) } else { - /* "pywrapfst.pyx":2344 + /* "pywrapfst.pyx":2345 * _SymbolTable new_isymbols=None, * unknown_isymbol=b"", * bool attach_new_isymbols=True, # <<<<<<<<<<<<<< @@ -26271,10 +26225,10 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ __pyx_v_new_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[5]); __pyx_v_unknown_osymbol = values[6]; if (values[7]) { - __pyx_v_attach_new_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_attach_new_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2348, __pyx_L3_error) + __pyx_v_attach_new_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_attach_new_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2349, __pyx_L3_error) } else { - /* "pywrapfst.pyx":2348 + /* "pywrapfst.pyx":2349 * _SymbolTable new_osymbols=None, * unknown_osymbol=b"", * bool attach_new_osymbols=True): # <<<<<<<<<<<<<< @@ -26286,19 +26240,19 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2340, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2341, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.relabel_tables", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "old_isymbols", 0))) __PYX_ERR(0, 2341, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_isymbols", 0))) __PYX_ERR(0, 2342, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "old_osymbols", 0))) __PYX_ERR(0, 2345, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_osymbols", 0))) __PYX_ERR(0, 2346, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "old_isymbols", 0))) __PYX_ERR(0, 2342, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_isymbols", 0))) __PYX_ERR(0, 2343, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "old_osymbols", 0))) __PYX_ERR(0, 2346, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_osymbols", 0))) __PYX_ERR(0, 2347, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_old_isymbols, __pyx_v_new_isymbols, __pyx_v_unknown_isymbol, __pyx_v_attach_new_isymbols, __pyx_v_old_osymbols, __pyx_v_new_osymbols, __pyx_v_unknown_osymbol, __pyx_v_attach_new_osymbols); - /* "pywrapfst.pyx":2340 + /* "pywrapfst.pyx":2341 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< @@ -26321,7 +26275,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx struct __pyx_opt_args_9pywrapfst_11_MutableFst__relabel_tables __pyx_t_1; __Pyx_RefNannySetupContext("relabel_tables", 0); - /* "pywrapfst.pyx":2384 + /* "pywrapfst.pyx":2385 * See also: `decode`, `encode`, `project`, `relabel_pairs`. * """ * self._relabel_tables(old_isymbols, new_isymbols, # <<<<<<<<<<<<<< @@ -26330,10 +26284,10 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_relabel_tables"); - __PYX_ERR(0, 2384, __pyx_L1_error) + __PYX_ERR(0, 2385, __pyx_L1_error) } - /* "pywrapfst.pyx":2387 + /* "pywrapfst.pyx":2388 * unknown_isymbol, attach_new_isymbols, * old_osymbols, new_osymbols, * unknown_osymbol, attach_new_osymbols) # <<<<<<<<<<<<<< @@ -26349,9 +26303,9 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx __pyx_t_1.new_osymbols = __pyx_v_new_osymbols; __pyx_t_1.unknown_osymbol = __pyx_v_unknown_osymbol; __pyx_t_1.attach_new_osymbols = __pyx_v_attach_new_osymbols; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_tables(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2384, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_tables(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2385, __pyx_L1_error) - /* "pywrapfst.pyx":2388 + /* "pywrapfst.pyx":2389 * old_osymbols, new_osymbols, * unknown_osymbol, attach_new_osymbols) * return self # <<<<<<<<<<<<<< @@ -26363,7 +26317,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2340 + /* "pywrapfst.pyx":2341 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< @@ -26381,7 +26335,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx return __pyx_r; } -/* "pywrapfst.pyx":2390 +/* "pywrapfst.pyx":2391 * return self * * cdef void _reserve_arcs(self, int64 state, size_t n) except *: # <<<<<<<<<<<<<< @@ -26397,7 +26351,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_arcs(struct __pyx_obj_9pyw PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_reserve_arcs", 0); - /* "pywrapfst.pyx":2391 + /* "pywrapfst.pyx":2392 * * cdef void _reserve_arcs(self, int64 state, size_t n) except *: * if not self._mfst.get().ReserveArcs(state, n): # <<<<<<<<<<<<<< @@ -26406,19 +26360,19 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_arcs(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2391, __pyx_L1_error) + __PYX_ERR(0, 2392, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->ReserveArcs(__pyx_v_state, __pyx_v_n) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2392 + /* "pywrapfst.pyx":2393 * cdef void _reserve_arcs(self, int64 state, size_t n) except *: * if not self._mfst.get().ReserveArcs(state, n): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2392, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -26432,14 +26386,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_arcs(struct __pyx_obj_9pyw } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2392, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2392, __pyx_L1_error) + __PYX_ERR(0, 2393, __pyx_L1_error) - /* "pywrapfst.pyx":2391 + /* "pywrapfst.pyx":2392 * * cdef void _reserve_arcs(self, int64 state, size_t n) except *: * if not self._mfst.get().ReserveArcs(state, n): # <<<<<<<<<<<<<< @@ -26448,7 +26402,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_arcs(struct __pyx_obj_9pyw */ } - /* "pywrapfst.pyx":2393 + /* "pywrapfst.pyx":2394 * if not self._mfst.get().ReserveArcs(state, n): * raise FstIndexError("State index out of range") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -26457,11 +26411,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_arcs(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2393, __pyx_L1_error) + __PYX_ERR(0, 2394, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2393, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2394, __pyx_L1_error) - /* "pywrapfst.pyx":2390 + /* "pywrapfst.pyx":2391 * return self * * cdef void _reserve_arcs(self, int64 state, size_t n) except *: # <<<<<<<<<<<<<< @@ -26480,7 +26434,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_arcs(struct __pyx_obj_9pyw __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2395 +/* "pywrapfst.pyx":2396 * self._check_mutating_imethod() * * def reserve_arcs(self, int64 state, size_t n): # <<<<<<<<<<<<<< @@ -26520,11 +26474,11 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_43reserve_arcs(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2395, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2396, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reserve_arcs") < 0)) __PYX_ERR(0, 2395, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reserve_arcs") < 0)) __PYX_ERR(0, 2396, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -26532,12 +26486,12 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_43reserve_arcs(PyObject *__py values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2395, __pyx_L3_error) - __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2395, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2396, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2396, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2395, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2396, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.reserve_arcs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -26555,7 +26509,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_42reserve_arcs(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reserve_arcs", 0); - /* "pywrapfst.pyx":2413 + /* "pywrapfst.pyx":2414 * See also: `reserve_states`. * """ * self._reserve_arcs(state, n) # <<<<<<<<<<<<<< @@ -26564,11 +26518,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_42reserve_arcs(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reserve_arcs"); - __PYX_ERR(0, 2413, __pyx_L1_error) + __PYX_ERR(0, 2414, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_arcs(__pyx_v_self, __pyx_v_state, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2413, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_arcs(__pyx_v_self, __pyx_v_state, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2414, __pyx_L1_error) - /* "pywrapfst.pyx":2414 + /* "pywrapfst.pyx":2415 * """ * self._reserve_arcs(state, n) * return self # <<<<<<<<<<<<<< @@ -26580,7 +26534,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_42reserve_arcs(struct __pyx_o __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2395 + /* "pywrapfst.pyx":2396 * self._check_mutating_imethod() * * def reserve_arcs(self, int64 state, size_t n): # <<<<<<<<<<<<<< @@ -26598,7 +26552,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_42reserve_arcs(struct __pyx_o return __pyx_r; } -/* "pywrapfst.pyx":2416 +/* "pywrapfst.pyx":2417 * return self * * cdef void _reserve_states(self, int64 n) except *: # <<<<<<<<<<<<<< @@ -26610,7 +26564,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_states(struct __pyx_obj_9p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_reserve_states", 0); - /* "pywrapfst.pyx":2417 + /* "pywrapfst.pyx":2418 * * cdef void _reserve_states(self, int64 n) except *: * self._mfst.get().ReserveStates(n) # <<<<<<<<<<<<<< @@ -26619,11 +26573,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_states(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2417, __pyx_L1_error) + __PYX_ERR(0, 2418, __pyx_L1_error) } __pyx_v_self->_mfst.get()->ReserveStates(__pyx_v_n); - /* "pywrapfst.pyx":2418 + /* "pywrapfst.pyx":2419 * cdef void _reserve_states(self, int64 n) except *: * self._mfst.get().ReserveStates(n) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -26632,11 +26586,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_states(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2418, __pyx_L1_error) + __PYX_ERR(0, 2419, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2418, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2419, __pyx_L1_error) - /* "pywrapfst.pyx":2416 + /* "pywrapfst.pyx":2417 * return self * * cdef void _reserve_states(self, int64 n) except *: # <<<<<<<<<<<<<< @@ -26652,7 +26606,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reserve_states(struct __pyx_obj_9p __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2420 +/* "pywrapfst.pyx":2421 * self._check_mutating_imethod() * * def reserve_states(self, int64 n): # <<<<<<<<<<<<<< @@ -26669,7 +26623,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_45reserve_states(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reserve_states (wrapper)", 0); assert(__pyx_arg_n); { - __pyx_v_n = __Pyx_PyInt_As_int64_t(__pyx_arg_n); if (unlikely((__pyx_v_n == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2420, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_int64_t(__pyx_arg_n); if (unlikely((__pyx_v_n == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2421, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26689,7 +26643,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_44reserve_states(struct __pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reserve_states", 0); - /* "pywrapfst.pyx":2434 + /* "pywrapfst.pyx":2435 * See also: `reserve_arcs`. * """ * self._reserve_states(n) # <<<<<<<<<<<<<< @@ -26698,11 +26652,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_44reserve_states(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reserve_states"); - __PYX_ERR(0, 2434, __pyx_L1_error) + __PYX_ERR(0, 2435, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_states(__pyx_v_self, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2434, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_states(__pyx_v_self, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2435, __pyx_L1_error) - /* "pywrapfst.pyx":2435 + /* "pywrapfst.pyx":2436 * """ * self._reserve_states(n) * return self # <<<<<<<<<<<<<< @@ -26714,7 +26668,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_44reserve_states(struct __pyx __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2420 + /* "pywrapfst.pyx":2421 * self._check_mutating_imethod() * * def reserve_states(self, int64 n): # <<<<<<<<<<<<<< @@ -26732,7 +26686,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_44reserve_states(struct __pyx return __pyx_r; } -/* "pywrapfst.pyx":2437 +/* "pywrapfst.pyx":2438 * return self * * cdef void _reweight(self, potentials, bool to_final=False) except *: # <<<<<<<<<<<<<< @@ -26759,7 +26713,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf } } - /* "pywrapfst.pyx":2439 + /* "pywrapfst.pyx":2440 * cdef void _reweight(self, potentials, bool to_final=False) except *: * cdef unique_ptr[vector[fst.WeightClass]] _potentials * _potentials.reset(new vector[fst.WeightClass]()) # <<<<<<<<<<<<<< @@ -26770,11 +26724,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf __pyx_t_1 = new std::vector (); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2439, __pyx_L1_error) + __PYX_ERR(0, 2440, __pyx_L1_error) } __pyx_v__potentials.reset(__pyx_t_1); - /* "pywrapfst.pyx":2440 + /* "pywrapfst.pyx":2441 * cdef unique_ptr[vector[fst.WeightClass]] _potentials * _potentials.reset(new vector[fst.WeightClass]()) * cdef string weight_type = self.weight_type() # <<<<<<<<<<<<<< @@ -26783,11 +26737,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2440, __pyx_L1_error) + __PYX_ERR(0, 2441, __pyx_L1_error) } __pyx_v_weight_type = ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0); - /* "pywrapfst.pyx":2441 + /* "pywrapfst.pyx":2442 * _potentials.reset(new vector[fst.WeightClass]()) * cdef string weight_type = self.weight_type() * for weight in potentials: # <<<<<<<<<<<<<< @@ -26798,26 +26752,26 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf __pyx_t_2 = __pyx_v_potentials; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_potentials); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_potentials); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2442, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2442, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2442, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -26827,7 +26781,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2441, __pyx_L1_error) + else __PYX_ERR(0, 2442, __pyx_L1_error) } break; } @@ -26836,7 +26790,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf __Pyx_XDECREF_SET(__pyx_v_weight, __pyx_t_5); __pyx_t_5 = 0; - /* "pywrapfst.pyx":2442 + /* "pywrapfst.pyx":2443 * cdef string weight_type = self.weight_type() * for weight in potentials: * _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(), # <<<<<<<<<<<<<< @@ -26845,19 +26799,19 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2442, __pyx_L1_error) + __PYX_ERR(0, 2443, __pyx_L1_error) } - /* "pywrapfst.pyx":2443 + /* "pywrapfst.pyx":2444 * for weight in potentials: * _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(), * weight)) # <<<<<<<<<<<<<< * fst.Reweight(self._mfst.get(), deref(_potentials), * fst.GetReweightType(to_final)) */ - __pyx_t_6 = __pyx_f_9pywrapfst__get_WeightClass_or_One(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2442, __pyx_L1_error) + __pyx_t_6 = __pyx_f_9pywrapfst__get_WeightClass_or_One(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2443, __pyx_L1_error) - /* "pywrapfst.pyx":2442 + /* "pywrapfst.pyx":2443 * cdef string weight_type = self.weight_type() * for weight in potentials: * _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(), # <<<<<<<<<<<<<< @@ -26868,10 +26822,10 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf __pyx_v__potentials.get()->push_back(__pyx_t_6); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2442, __pyx_L1_error) + __PYX_ERR(0, 2443, __pyx_L1_error) } - /* "pywrapfst.pyx":2441 + /* "pywrapfst.pyx":2442 * _potentials.reset(new vector[fst.WeightClass]()) * cdef string weight_type = self.weight_type() * for weight in potentials: # <<<<<<<<<<<<<< @@ -26881,7 +26835,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":2444 + /* "pywrapfst.pyx":2445 * _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(), * weight)) * fst.Reweight(self._mfst.get(), deref(_potentials), # <<<<<<<<<<<<<< @@ -26890,10 +26844,10 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2444, __pyx_L1_error) + __PYX_ERR(0, 2445, __pyx_L1_error) } - /* "pywrapfst.pyx":2445 + /* "pywrapfst.pyx":2446 * weight)) * fst.Reweight(self._mfst.get(), deref(_potentials), * fst.GetReweightType(to_final)) # <<<<<<<<<<<<<< @@ -26902,7 +26856,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf */ fst::script::Reweight(__pyx_v_self->_mfst.get(), (*__pyx_v__potentials), fst::script::GetReweightType(__pyx_v_to_final)); - /* "pywrapfst.pyx":2446 + /* "pywrapfst.pyx":2447 * fst.Reweight(self._mfst.get(), deref(_potentials), * fst.GetReweightType(to_final)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -26911,11 +26865,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2446, __pyx_L1_error) + __PYX_ERR(0, 2447, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2446, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2447, __pyx_L1_error) - /* "pywrapfst.pyx":2437 + /* "pywrapfst.pyx":2438 * return self * * cdef void _reweight(self, potentials, bool to_final=False) except *: # <<<<<<<<<<<<<< @@ -26934,7 +26888,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__reweight(struct __pyx_obj_9pywrapf __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2448 +/* "pywrapfst.pyx":2449 * self._check_mutating_imethod() * * def reweight(self, potentials, bool to_final=False): # <<<<<<<<<<<<<< @@ -26978,7 +26932,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_47reweight(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reweight") < 0)) __PYX_ERR(0, 2448, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reweight") < 0)) __PYX_ERR(0, 2449, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -26991,14 +26945,14 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_47reweight(PyObject *__pyx_v_ } __pyx_v_potentials = values[0]; if (values[1]) { - __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2448, __pyx_L3_error) + __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2449, __pyx_L3_error) } else { __pyx_v_to_final = ((bool)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reweight", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2448, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reweight", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2449, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.reweight", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -27017,7 +26971,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_46reweight(struct __pyx_obj_9 struct __pyx_opt_args_9pywrapfst_11_MutableFst__reweight __pyx_t_1; __Pyx_RefNannySetupContext("reweight", 0); - /* "pywrapfst.pyx":2470 + /* "pywrapfst.pyx":2471 * self. * """ * self._reweight(potentials, to_final) # <<<<<<<<<<<<<< @@ -27026,13 +26980,13 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_46reweight(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reweight"); - __PYX_ERR(0, 2470, __pyx_L1_error) + __PYX_ERR(0, 2471, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.to_final = __pyx_v_to_final; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reweight(__pyx_v_self, __pyx_v_potentials, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2470, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reweight(__pyx_v_self, __pyx_v_potentials, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2471, __pyx_L1_error) - /* "pywrapfst.pyx":2471 + /* "pywrapfst.pyx":2472 * """ * self._reweight(potentials, to_final) * return self # <<<<<<<<<<<<<< @@ -27044,7 +26998,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_46reweight(struct __pyx_obj_9 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2448 + /* "pywrapfst.pyx":2449 * self._check_mutating_imethod() * * def reweight(self, potentials, bool to_final=False): # <<<<<<<<<<<<<< @@ -27062,7 +27016,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_46reweight(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":2473 +/* "pywrapfst.pyx":2474 * return self * * cdef void _rmepsilon(self, # <<<<<<<<<<<<<< @@ -27073,7 +27027,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_46reweight(struct __pyx_obj_9 static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__rmepsilon *__pyx_optional_args) { PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":2475 + /* "pywrapfst.pyx":2476 * cdef void _rmepsilon(self, * queue_type=b"auto", * bool connect=True, # <<<<<<<<<<<<<< @@ -27082,7 +27036,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrap */ bool __pyx_v_connect = ((bool)1); - /* "pywrapfst.pyx":2476 + /* "pywrapfst.pyx":2477 * queue_type=b"auto", * bool connect=True, * weight=None, # <<<<<<<<<<<<<< @@ -27117,7 +27071,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrap } } - /* "pywrapfst.pyx":2479 + /* "pywrapfst.pyx":2480 * int64 nstate=fst.kNoStateId, * float delta=fst.kShortestDelta) except *: * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(), # <<<<<<<<<<<<<< @@ -27126,30 +27080,30 @@ static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2479, __pyx_L1_error) + __PYX_ERR(0, 2480, __pyx_L1_error) } - /* "pywrapfst.pyx":2480 + /* "pywrapfst.pyx":2481 * float delta=fst.kShortestDelta) except *: * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.RmEpsilonOptions] opts * opts.reset(new fst.RmEpsilonOptions(_get_queue_type(tostring(queue_type)), */ - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2479, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2480, __pyx_L1_error) __pyx_v_wc = __pyx_t_1; - /* "pywrapfst.pyx":2482 + /* "pywrapfst.pyx":2483 * weight) * cdef unique_ptr[fst.RmEpsilonOptions] opts * opts.reset(new fst.RmEpsilonOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<< * connect, wc, nstate, delta)) * fst.RmEpsilon(self._mfst.get(), deref(opts)) */ - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2482, __pyx_L1_error) - __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2482, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2483, __pyx_L1_error) - /* "pywrapfst.pyx":2483 + /* "pywrapfst.pyx":2484 * cdef unique_ptr[fst.RmEpsilonOptions] opts * opts.reset(new fst.RmEpsilonOptions(_get_queue_type(tostring(queue_type)), * connect, wc, nstate, delta)) # <<<<<<<<<<<<<< @@ -27158,7 +27112,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrap */ __pyx_v_opts.reset(new fst::script::RmEpsilonOptions(__pyx_t_3, __pyx_v_connect, __pyx_v_wc, __pyx_v_nstate, __pyx_v_delta)); - /* "pywrapfst.pyx":2484 + /* "pywrapfst.pyx":2485 * opts.reset(new fst.RmEpsilonOptions(_get_queue_type(tostring(queue_type)), * connect, wc, nstate, delta)) * fst.RmEpsilon(self._mfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -27167,11 +27121,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2484, __pyx_L1_error) + __PYX_ERR(0, 2485, __pyx_L1_error) } fst::script::RmEpsilon(__pyx_v_self->_mfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":2485 + /* "pywrapfst.pyx":2486 * connect, wc, nstate, delta)) * fst.RmEpsilon(self._mfst.get(), deref(opts)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -27180,11 +27134,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2485, __pyx_L1_error) + __PYX_ERR(0, 2486, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2485, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2486, __pyx_L1_error) - /* "pywrapfst.pyx":2473 + /* "pywrapfst.pyx":2474 * return self * * cdef void _rmepsilon(self, # <<<<<<<<<<<<<< @@ -27200,7 +27154,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrap __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2487 +/* "pywrapfst.pyx":2488 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< @@ -27225,7 +27179,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_49rmepsilon(PyObject *__pyx_v PyObject* values[5] = {0,0,0,0,0}; values[0] = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":2490 + /* "pywrapfst.pyx":2491 * queue_type=b"auto", * bool connect=True, * weight=None, # <<<<<<<<<<<<<< @@ -27283,7 +27237,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_49rmepsilon(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 2487, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 2488, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -27303,10 +27257,10 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_49rmepsilon(PyObject *__pyx_v } __pyx_v_queue_type = values[0]; if (values[1]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2489, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2490, __pyx_L3_error) } else { - /* "pywrapfst.pyx":2489 + /* "pywrapfst.pyx":2490 * def rmepsilon(self, * queue_type=b"auto", * bool connect=True, # <<<<<<<<<<<<<< @@ -27317,19 +27271,19 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_49rmepsilon(PyObject *__pyx_v } __pyx_v_weight = values[2]; if (values[3]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2491, __pyx_L3_error) + __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2492, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_k__21; } if (values[4]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2492, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2493, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__22; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2487, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2488, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.rmepsilon", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -27337,7 +27291,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_49rmepsilon(PyObject *__pyx_v __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_48rmepsilon(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_queue_type, __pyx_v_connect, __pyx_v_weight, __pyx_v_nstate, __pyx_v_delta); - /* "pywrapfst.pyx":2487 + /* "pywrapfst.pyx":2488 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< @@ -27356,7 +27310,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_48rmepsilon(struct __pyx_obj_ struct __pyx_opt_args_9pywrapfst_11_MutableFst__rmepsilon __pyx_t_1; __Pyx_RefNannySetupContext("rmepsilon", 0); - /* "pywrapfst.pyx":2514 + /* "pywrapfst.pyx":2515 * self. * """ * self._rmepsilon(queue_type, connect, weight, nstate, delta) # <<<<<<<<<<<<<< @@ -27365,7 +27319,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_48rmepsilon(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_rmepsilon"); - __PYX_ERR(0, 2514, __pyx_L1_error) + __PYX_ERR(0, 2515, __pyx_L1_error) } __pyx_t_1.__pyx_n = 5; __pyx_t_1.queue_type = __pyx_v_queue_type; @@ -27373,9 +27327,9 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_48rmepsilon(struct __pyx_obj_ __pyx_t_1.weight = __pyx_v_weight; __pyx_t_1.nstate = __pyx_v_nstate; __pyx_t_1.delta = __pyx_v_delta; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_rmepsilon(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2514, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_rmepsilon(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2515, __pyx_L1_error) - /* "pywrapfst.pyx":2515 + /* "pywrapfst.pyx":2516 * """ * self._rmepsilon(queue_type, connect, weight, nstate, delta) * return self # <<<<<<<<<<<<<< @@ -27387,7 +27341,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_48rmepsilon(struct __pyx_obj_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2487 + /* "pywrapfst.pyx":2488 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< @@ -27405,7 +27359,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_48rmepsilon(struct __pyx_obj_ return __pyx_r; } -/* "pywrapfst.pyx":2517 +/* "pywrapfst.pyx":2518 * return self * * cdef void _set_final(self, int64 state, weight=None) except *: # <<<<<<<<<<<<<< @@ -27429,7 +27383,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap } } - /* "pywrapfst.pyx":2518 + /* "pywrapfst.pyx":2519 * * cdef void _set_final(self, int64 state, weight=None) except *: * if not self._mfst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -27438,19 +27392,19 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2518, __pyx_L1_error) + __PYX_ERR(0, 2519, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->ValidStateId(__pyx_v_state) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2519 + /* "pywrapfst.pyx":2520 * cdef void _set_final(self, int64 state, weight=None) except *: * if not self._mfst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(), * weight) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2519, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -27464,14 +27418,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2519, __pyx_L1_error) + __PYX_ERR(0, 2520, __pyx_L1_error) - /* "pywrapfst.pyx":2518 + /* "pywrapfst.pyx":2519 * * cdef void _set_final(self, int64 state, weight=None) except *: * if not self._mfst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -27480,7 +27434,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap */ } - /* "pywrapfst.pyx":2520 + /* "pywrapfst.pyx":2521 * if not self._mfst.get().ValidStateId(state): * raise FstIndexError("State index out of range") * cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(), # <<<<<<<<<<<<<< @@ -27489,20 +27443,20 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2520, __pyx_L1_error) + __PYX_ERR(0, 2521, __pyx_L1_error) } - /* "pywrapfst.pyx":2521 + /* "pywrapfst.pyx":2522 * raise FstIndexError("State index out of range") * cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(), * weight) # <<<<<<<<<<<<<< * if not self._mfst.get().SetFinal(state, wc): * raise FstOpError("Incompatible or invalid weight") */ - __pyx_t_5 = __pyx_f_9pywrapfst__get_WeightClass_or_One(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_5 = __pyx_f_9pywrapfst__get_WeightClass_or_One(((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2521, __pyx_L1_error) __pyx_v_wc = __pyx_t_5; - /* "pywrapfst.pyx":2522 + /* "pywrapfst.pyx":2523 * cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(), * weight) * if not self._mfst.get().SetFinal(state, wc): # <<<<<<<<<<<<<< @@ -27511,19 +27465,19 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2522, __pyx_L1_error) + __PYX_ERR(0, 2523, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->SetFinal(__pyx_v_state, __pyx_v_wc) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2523 + /* "pywrapfst.pyx":2524 * weight) * if not self._mfst.get().SetFinal(state, wc): * raise FstOpError("Incompatible or invalid weight") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2523, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -27537,14 +27491,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Incompatible_or_invalid_weight) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Incompatible_or_invalid_weight); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2523, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2523, __pyx_L1_error) + __PYX_ERR(0, 2524, __pyx_L1_error) - /* "pywrapfst.pyx":2522 + /* "pywrapfst.pyx":2523 * cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(), * weight) * if not self._mfst.get().SetFinal(state, wc): # <<<<<<<<<<<<<< @@ -27553,7 +27507,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap */ } - /* "pywrapfst.pyx":2524 + /* "pywrapfst.pyx":2525 * if not self._mfst.get().SetFinal(state, wc): * raise FstOpError("Incompatible or invalid weight") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -27562,11 +27516,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2524, __pyx_L1_error) + __PYX_ERR(0, 2525, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2524, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2525, __pyx_L1_error) - /* "pywrapfst.pyx":2517 + /* "pywrapfst.pyx":2518 * return self * * cdef void _set_final(self, int64 state, weight=None) except *: # <<<<<<<<<<<<<< @@ -27585,7 +27539,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_final(struct __pyx_obj_9pywrap __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2526 +/* "pywrapfst.pyx":2527 * self._check_mutating_imethod() * * def set_final(self, int64 state, weight=None): # <<<<<<<<<<<<<< @@ -27630,7 +27584,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_51set_final(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_final") < 0)) __PYX_ERR(0, 2526, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_final") < 0)) __PYX_ERR(0, 2527, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -27641,12 +27595,12 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_51set_final(PyObject *__pyx_v default: goto __pyx_L5_argtuple_error; } } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2526, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2527, __pyx_L3_error) __pyx_v_weight = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_final", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2526, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_final", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2527, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.set_final", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -27665,7 +27619,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_50set_final(struct __pyx_obj_ struct __pyx_opt_args_9pywrapfst_11_MutableFst__set_final __pyx_t_1; __Pyx_RefNannySetupContext("set_final", 0); - /* "pywrapfst.pyx":2546 + /* "pywrapfst.pyx":2547 * See also: `set_start`. * """ * self._set_final(state, weight) # <<<<<<<<<<<<<< @@ -27674,13 +27628,13 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_50set_final(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_final"); - __PYX_ERR(0, 2546, __pyx_L1_error) + __PYX_ERR(0, 2547, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.weight = __pyx_v_weight; - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_final(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2546, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_final(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2547, __pyx_L1_error) - /* "pywrapfst.pyx":2547 + /* "pywrapfst.pyx":2548 * """ * self._set_final(state, weight) * return self # <<<<<<<<<<<<<< @@ -27692,7 +27646,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_50set_final(struct __pyx_obj_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2526 + /* "pywrapfst.pyx":2527 * self._check_mutating_imethod() * * def set_final(self, int64 state, weight=None): # <<<<<<<<<<<<<< @@ -27710,7 +27664,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_50set_final(struct __pyx_obj_ return __pyx_r; } -/* "pywrapfst.pyx":2549 +/* "pywrapfst.pyx":2550 * return self * * cdef void _set_input_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -27724,7 +27678,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj int __pyx_t_2; __Pyx_RefNannySetupContext("_set_input_symbols", 0); - /* "pywrapfst.pyx":2550 + /* "pywrapfst.pyx":2551 * * cdef void _set_input_symbols(self, _SymbolTable syms) except *: * if syms is None: # <<<<<<<<<<<<<< @@ -27735,7 +27689,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pywrapfst.pyx":2551 + /* "pywrapfst.pyx":2552 * cdef void _set_input_symbols(self, _SymbolTable syms) except *: * if syms is None: * self._mfst.get().SetInputSymbols(NULL) # <<<<<<<<<<<<<< @@ -27744,11 +27698,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2551, __pyx_L1_error) + __PYX_ERR(0, 2552, __pyx_L1_error) } __pyx_v_self->_mfst.get()->SetInputSymbols(NULL); - /* "pywrapfst.pyx":2552 + /* "pywrapfst.pyx":2553 * if syms is None: * self._mfst.get().SetInputSymbols(NULL) * return # <<<<<<<<<<<<<< @@ -27757,7 +27711,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj */ goto __pyx_L0; - /* "pywrapfst.pyx":2550 + /* "pywrapfst.pyx":2551 * * cdef void _set_input_symbols(self, _SymbolTable syms) except *: * if syms is None: # <<<<<<<<<<<<<< @@ -27766,7 +27720,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj */ } - /* "pywrapfst.pyx":2553 + /* "pywrapfst.pyx":2554 * self._mfst.get().SetInputSymbols(NULL) * return * self._mfst.get().SetInputSymbols(syms._table) # <<<<<<<<<<<<<< @@ -27775,15 +27729,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2553, __pyx_L1_error) + __PYX_ERR(0, 2554, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 2553, __pyx_L1_error) + __PYX_ERR(0, 2554, __pyx_L1_error) } __pyx_v_self->_mfst.get()->SetInputSymbols(__pyx_v_syms->_table); - /* "pywrapfst.pyx":2554 + /* "pywrapfst.pyx":2555 * return * self._mfst.get().SetInputSymbols(syms._table) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -27792,11 +27746,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2554, __pyx_L1_error) + __PYX_ERR(0, 2555, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L1_error) - /* "pywrapfst.pyx":2549 + /* "pywrapfst.pyx":2550 * return self * * cdef void _set_input_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -27812,7 +27766,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_input_symbols(struct __pyx_obj __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2556 +/* "pywrapfst.pyx":2557 * self._check_mutating_imethod() * * def set_input_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -27827,7 +27781,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_53set_input_symbols(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_input_symbols (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2556, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2557, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_52set_input_symbols(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms)); /* function exit code */ @@ -27844,7 +27798,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_52set_input_symbols(struct __ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_input_symbols", 0); - /* "pywrapfst.pyx":2572 + /* "pywrapfst.pyx":2573 * See also: `set_output_symbols`. * """ * self._set_input_symbols(syms) # <<<<<<<<<<<<<< @@ -27853,11 +27807,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_52set_input_symbols(struct __ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_input_symbols"); - __PYX_ERR(0, 2572, __pyx_L1_error) + __PYX_ERR(0, 2573, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2572, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2573, __pyx_L1_error) - /* "pywrapfst.pyx":2573 + /* "pywrapfst.pyx":2574 * """ * self._set_input_symbols(syms) * return self # <<<<<<<<<<<<<< @@ -27869,7 +27823,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_52set_input_symbols(struct __ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2556 + /* "pywrapfst.pyx":2557 * self._check_mutating_imethod() * * def set_input_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -27887,7 +27841,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_52set_input_symbols(struct __ return __pyx_r; } -/* "pywrapfst.pyx":2575 +/* "pywrapfst.pyx":2576 * return self * * cdef void _set_output_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -27901,7 +27855,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob int __pyx_t_2; __Pyx_RefNannySetupContext("_set_output_symbols", 0); - /* "pywrapfst.pyx":2576 + /* "pywrapfst.pyx":2577 * * cdef void _set_output_symbols(self, _SymbolTable syms) except *: * if syms is None: # <<<<<<<<<<<<<< @@ -27912,7 +27866,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pywrapfst.pyx":2577 + /* "pywrapfst.pyx":2578 * cdef void _set_output_symbols(self, _SymbolTable syms) except *: * if syms is None: * self._mfst.get().SetOutputSymbols(NULL) # <<<<<<<<<<<<<< @@ -27921,11 +27875,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2577, __pyx_L1_error) + __PYX_ERR(0, 2578, __pyx_L1_error) } __pyx_v_self->_mfst.get()->SetOutputSymbols(NULL); - /* "pywrapfst.pyx":2578 + /* "pywrapfst.pyx":2579 * if syms is None: * self._mfst.get().SetOutputSymbols(NULL) * return # <<<<<<<<<<<<<< @@ -27934,7 +27888,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob */ goto __pyx_L0; - /* "pywrapfst.pyx":2576 + /* "pywrapfst.pyx":2577 * * cdef void _set_output_symbols(self, _SymbolTable syms) except *: * if syms is None: # <<<<<<<<<<<<<< @@ -27943,7 +27897,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob */ } - /* "pywrapfst.pyx":2579 + /* "pywrapfst.pyx":2580 * self._mfst.get().SetOutputSymbols(NULL) * return * self._mfst.get().SetOutputSymbols(syms._table) # <<<<<<<<<<<<<< @@ -27952,15 +27906,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2579, __pyx_L1_error) + __PYX_ERR(0, 2580, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 2579, __pyx_L1_error) + __PYX_ERR(0, 2580, __pyx_L1_error) } __pyx_v_self->_mfst.get()->SetOutputSymbols(__pyx_v_syms->_table); - /* "pywrapfst.pyx":2580 + /* "pywrapfst.pyx":2581 * return * self._mfst.get().SetOutputSymbols(syms._table) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -27969,11 +27923,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2580, __pyx_L1_error) + __PYX_ERR(0, 2581, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2580, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2581, __pyx_L1_error) - /* "pywrapfst.pyx":2575 + /* "pywrapfst.pyx":2576 * return self * * cdef void _set_output_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<< @@ -27989,7 +27943,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_output_symbols(struct __pyx_ob __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2582 +/* "pywrapfst.pyx":2583 * self._check_mutating_imethod() * * def set_output_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -28004,7 +27958,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_55set_output_symbols(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_output_symbols (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2582, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2583, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_54set_output_symbols(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms)); /* function exit code */ @@ -28021,7 +27975,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_54set_output_symbols(struct _ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_output_symbols", 0); - /* "pywrapfst.pyx":2598 + /* "pywrapfst.pyx":2599 * See also: `set_input_symbols`. * """ * self._set_output_symbols(syms) # <<<<<<<<<<<<<< @@ -28030,11 +27984,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_54set_output_symbols(struct _ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_output_symbols"); - __PYX_ERR(0, 2598, __pyx_L1_error) + __PYX_ERR(0, 2599, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2598, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2599, __pyx_L1_error) - /* "pywrapfst.pyx":2599 + /* "pywrapfst.pyx":2600 * """ * self._set_output_symbols(syms) * return self # <<<<<<<<<<<<<< @@ -28046,7 +28000,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_54set_output_symbols(struct _ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2582 + /* "pywrapfst.pyx":2583 * self._check_mutating_imethod() * * def set_output_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<< @@ -28064,7 +28018,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_54set_output_symbols(struct _ return __pyx_r; } -/* "pywrapfst.pyx":2601 +/* "pywrapfst.pyx":2602 * return self * * cdef void _set_properties(self, uint64 props, uint64 mask): # <<<<<<<<<<<<<< @@ -28076,7 +28030,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_properties(struct __pyx_obj_9p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_properties", 0); - /* "pywrapfst.pyx":2602 + /* "pywrapfst.pyx":2603 * * cdef void _set_properties(self, uint64 props, uint64 mask): * self._mfst.get().SetProperties(props, mask) # <<<<<<<<<<<<<< @@ -28085,11 +28039,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_properties(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2602, __pyx_L1_error) + __PYX_ERR(0, 2603, __pyx_L1_error) } __pyx_v_self->_mfst.get()->SetProperties(__pyx_v_props, __pyx_v_mask); - /* "pywrapfst.pyx":2601 + /* "pywrapfst.pyx":2602 * return self * * cdef void _set_properties(self, uint64 props, uint64 mask): # <<<<<<<<<<<<<< @@ -28105,7 +28059,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_properties(struct __pyx_obj_9p __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2604 +/* "pywrapfst.pyx":2605 * self._mfst.get().SetProperties(props, mask) * * def set_properties(self, uint64 props, uint64 mask): # <<<<<<<<<<<<<< @@ -28145,11 +28099,11 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_57set_properties(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2604, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2605, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_properties") < 0)) __PYX_ERR(0, 2604, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_properties") < 0)) __PYX_ERR(0, 2605, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -28157,12 +28111,12 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_57set_properties(PyObject *__ values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_props = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_props == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2604, __pyx_L3_error) - __pyx_v_mask = __Pyx_PyInt_As_uint64_t(values[1]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2604, __pyx_L3_error) + __pyx_v_props = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_props == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2605, __pyx_L3_error) + __pyx_v_mask = __Pyx_PyInt_As_uint64_t(values[1]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2605, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2604, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2605, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst._MutableFst.set_properties", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -28180,7 +28134,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_56set_properties(struct __pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_properties", 0); - /* "pywrapfst.pyx":2618 + /* "pywrapfst.pyx":2619 * self. * """ * self._set_properties(props, mask) # <<<<<<<<<<<<<< @@ -28189,11 +28143,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_56set_properties(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_properties"); - __PYX_ERR(0, 2618, __pyx_L1_error) + __PYX_ERR(0, 2619, __pyx_L1_error) } ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_properties(__pyx_v_self, __pyx_v_props, __pyx_v_mask); - /* "pywrapfst.pyx":2619 + /* "pywrapfst.pyx":2620 * """ * self._set_properties(props, mask) * return self # <<<<<<<<<<<<<< @@ -28205,7 +28159,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_56set_properties(struct __pyx __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2604 + /* "pywrapfst.pyx":2605 * self._mfst.get().SetProperties(props, mask) * * def set_properties(self, uint64 props, uint64 mask): # <<<<<<<<<<<<<< @@ -28223,7 +28177,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_56set_properties(struct __pyx return __pyx_r; } -/* "pywrapfst.pyx":2621 +/* "pywrapfst.pyx":2622 * return self * * cdef void _set_start(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -28239,7 +28193,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_start(struct __pyx_obj_9pywrap PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_set_start", 0); - /* "pywrapfst.pyx":2622 + /* "pywrapfst.pyx":2623 * * cdef void _set_start(self, int64 state) except *: * if not self._mfst.get().SetStart(state): # <<<<<<<<<<<<<< @@ -28248,19 +28202,19 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_start(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2622, __pyx_L1_error) + __PYX_ERR(0, 2623, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->SetStart(__pyx_v_state) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2623 + /* "pywrapfst.pyx":2624 * cdef void _set_start(self, int64 state) except *: * if not self._mfst.get().SetStart(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -28274,14 +28228,14 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_start(struct __pyx_obj_9pywrap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2623, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2623, __pyx_L1_error) + __PYX_ERR(0, 2624, __pyx_L1_error) - /* "pywrapfst.pyx":2622 + /* "pywrapfst.pyx":2623 * * cdef void _set_start(self, int64 state) except *: * if not self._mfst.get().SetStart(state): # <<<<<<<<<<<<<< @@ -28290,7 +28244,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_start(struct __pyx_obj_9pywrap */ } - /* "pywrapfst.pyx":2624 + /* "pywrapfst.pyx":2625 * if not self._mfst.get().SetStart(state): * raise FstIndexError("State index out of range") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -28299,11 +28253,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_start(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2624, __pyx_L1_error) + __PYX_ERR(0, 2625, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2624, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2625, __pyx_L1_error) - /* "pywrapfst.pyx":2621 + /* "pywrapfst.pyx":2622 * return self * * cdef void _set_start(self, int64 state) except *: # <<<<<<<<<<<<<< @@ -28322,7 +28276,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__set_start(struct __pyx_obj_9pywrap __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2626 +/* "pywrapfst.pyx":2627 * self._check_mutating_imethod() * * def set_start(self, int64 state): # <<<<<<<<<<<<<< @@ -28339,7 +28293,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_59set_start(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_start (wrapper)", 0); assert(__pyx_arg_state); { - __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2626, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2627, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28359,7 +28313,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_58set_start(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_start", 0); - /* "pywrapfst.pyx":2643 + /* "pywrapfst.pyx":2644 * See also: `set_final`. * """ * self._set_start(state) # <<<<<<<<<<<<<< @@ -28368,11 +28322,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_58set_start(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_start"); - __PYX_ERR(0, 2643, __pyx_L1_error) + __PYX_ERR(0, 2644, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_start(__pyx_v_self, __pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2643, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_start(__pyx_v_self, __pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2644, __pyx_L1_error) - /* "pywrapfst.pyx":2644 + /* "pywrapfst.pyx":2645 * """ * self._set_start(state) * return self # <<<<<<<<<<<<<< @@ -28384,7 +28338,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_58set_start(struct __pyx_obj_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2626 + /* "pywrapfst.pyx":2627 * self._check_mutating_imethod() * * def set_start(self, int64 state): # <<<<<<<<<<<<<< @@ -28402,7 +28356,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_58set_start(struct __pyx_obj_ return __pyx_r; } -/* "pywrapfst.pyx":2646 +/* "pywrapfst.pyx":2647 * return self * * cdef void _topsort(self) except *: # <<<<<<<<<<<<<< @@ -28418,7 +28372,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__topsort(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_topsort", 0); - /* "pywrapfst.pyx":2648 + /* "pywrapfst.pyx":2649 * cdef void _topsort(self) except *: * # TopSort returns False if the FST is cyclic, and thus can't be TopSorted. * if not fst.TopSort(self._mfst.get()): # <<<<<<<<<<<<<< @@ -28427,21 +28381,21 @@ static void __pyx_f_9pywrapfst_11_MutableFst__topsort(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2648, __pyx_L1_error) + __PYX_ERR(0, 2649, __pyx_L1_error) } __pyx_t_1 = ((!(fst::script::TopSort(__pyx_v_self->_mfst.get()) != 0)) != 0); if (__pyx_t_1) { - /* "pywrapfst.pyx":2649 + /* "pywrapfst.pyx":2650 * # TopSort returns False if the FST is cyclic, and thus can't be TopSorted. * if not fst.TopSort(self._mfst.get()): * logging.warning("Cannot topsort cyclic FST") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2649, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -28456,12 +28410,12 @@ static void __pyx_f_9pywrapfst_11_MutableFst__topsort(struct __pyx_obj_9pywrapfs } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_u_Cannot_topsort_cyclic_FST) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Cannot_topsort_cyclic_FST); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2649, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":2648 + /* "pywrapfst.pyx":2649 * cdef void _topsort(self) except *: * # TopSort returns False if the FST is cyclic, and thus can't be TopSorted. * if not fst.TopSort(self._mfst.get()): # <<<<<<<<<<<<<< @@ -28470,7 +28424,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__topsort(struct __pyx_obj_9pywrapfs */ } - /* "pywrapfst.pyx":2650 + /* "pywrapfst.pyx":2651 * if not fst.TopSort(self._mfst.get()): * logging.warning("Cannot topsort cyclic FST") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -28479,11 +28433,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__topsort(struct __pyx_obj_9pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2650, __pyx_L1_error) + __PYX_ERR(0, 2651, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2650, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2651, __pyx_L1_error) - /* "pywrapfst.pyx":2646 + /* "pywrapfst.pyx":2647 * return self * * cdef void _topsort(self) except *: # <<<<<<<<<<<<<< @@ -28502,7 +28456,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__topsort(struct __pyx_obj_9pywrapfs __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2652 +/* "pywrapfst.pyx":2653 * self._check_mutating_imethod() * * def topsort(self): # <<<<<<<<<<<<<< @@ -28529,7 +28483,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_60topsort(struct __pyx_obj_9p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("topsort", 0); - /* "pywrapfst.pyx":2665 + /* "pywrapfst.pyx":2666 * self. * """ * self._topsort() # <<<<<<<<<<<<<< @@ -28538,11 +28492,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_60topsort(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_topsort"); - __PYX_ERR(0, 2665, __pyx_L1_error) + __PYX_ERR(0, 2666, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_topsort(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2665, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_topsort(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2666, __pyx_L1_error) - /* "pywrapfst.pyx":2666 + /* "pywrapfst.pyx":2667 * """ * self._topsort() * return self # <<<<<<<<<<<<<< @@ -28554,7 +28508,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_60topsort(struct __pyx_obj_9p __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2652 + /* "pywrapfst.pyx":2653 * self._check_mutating_imethod() * * def topsort(self): # <<<<<<<<<<<<<< @@ -28572,7 +28526,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_60topsort(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":2668 +/* "pywrapfst.pyx":2669 * return self * * cdef void _union(self, _Fst ifst) except *: # <<<<<<<<<<<<<< @@ -28584,7 +28538,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__union(struct __pyx_obj_9pywrapfst_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_union", 0); - /* "pywrapfst.pyx":2669 + /* "pywrapfst.pyx":2670 * * cdef void _union(self, _Fst ifst) except *: * fst.Union(self._mfst.get(), deref(ifst._fst)) # <<<<<<<<<<<<<< @@ -28593,15 +28547,15 @@ static void __pyx_f_9pywrapfst_11_MutableFst__union(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2669, __pyx_L1_error) + __PYX_ERR(0, 2670, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2669, __pyx_L1_error) + __PYX_ERR(0, 2670, __pyx_L1_error) } fst::script::Union(__pyx_v_self->_mfst.get(), (*__pyx_v_ifst->_fst)); - /* "pywrapfst.pyx":2670 + /* "pywrapfst.pyx":2671 * cdef void _union(self, _Fst ifst) except *: * fst.Union(self._mfst.get(), deref(ifst._fst)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -28610,11 +28564,11 @@ static void __pyx_f_9pywrapfst_11_MutableFst__union(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2670, __pyx_L1_error) + __PYX_ERR(0, 2671, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2670, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2671, __pyx_L1_error) - /* "pywrapfst.pyx":2668 + /* "pywrapfst.pyx":2669 * return self * * cdef void _union(self, _Fst ifst) except *: # <<<<<<<<<<<<<< @@ -28630,7 +28584,7 @@ static void __pyx_f_9pywrapfst_11_MutableFst__union(struct __pyx_obj_9pywrapfst_ __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":2672 +/* "pywrapfst.pyx":2673 * self._check_mutating_imethod() * * def union(self, _Fst ifst): # <<<<<<<<<<<<<< @@ -28645,7 +28599,7 @@ static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_63union(PyObject *__pyx_v_sel PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("union (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 2672, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 2673, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_62union(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_ifst)); /* function exit code */ @@ -28662,7 +28616,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_62union(struct __pyx_obj_9pyw __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("union", 0); - /* "pywrapfst.pyx":2688 + /* "pywrapfst.pyx":2689 * self. * """ * self._union(ifst) # <<<<<<<<<<<<<< @@ -28671,11 +28625,11 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_62union(struct __pyx_obj_9pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_union"); - __PYX_ERR(0, 2688, __pyx_L1_error) + __PYX_ERR(0, 2689, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_union(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2688, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_union(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2689, __pyx_L1_error) - /* "pywrapfst.pyx":2689 + /* "pywrapfst.pyx":2690 * """ * self._union(ifst) * return self # <<<<<<<<<<<<<< @@ -28687,7 +28641,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_62union(struct __pyx_obj_9pyw __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":2672 + /* "pywrapfst.pyx":2673 * self._check_mutating_imethod() * * def union(self, _Fst ifst): # <<<<<<<<<<<<<< @@ -28705,7 +28659,7 @@ static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_62union(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":2714 +/* "pywrapfst.pyx":2715 * * * cdef _Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -28723,7 +28677,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_Fst(__pyx_t_9p PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_init_Fst", 0); - /* "pywrapfst.pyx":2715 + /* "pywrapfst.pyx":2716 * * cdef _Fst _init_Fst(FstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -28733,14 +28687,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_Fst(__pyx_t_9p __pyx_t_1 = ((__pyx_v_tfst->Properties(fst::kError, 1) == fst::kError) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2716 + /* "pywrapfst.pyx":2717 * cdef _Fst _init_Fst(FstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * cdef _Fst ofst = _Fst.__new__(_Fst) * ofst._fst.reset(tfst) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2716, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -28754,14 +28708,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_Fst(__pyx_t_9p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Operation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Operation_failed); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2716, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2716, __pyx_L1_error) + __PYX_ERR(0, 2717, __pyx_L1_error) - /* "pywrapfst.pyx":2715 + /* "pywrapfst.pyx":2716 * * cdef _Fst _init_Fst(FstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -28770,19 +28724,19 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_Fst(__pyx_t_9p */ } - /* "pywrapfst.pyx":2717 + /* "pywrapfst.pyx":2718 * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") * cdef _Fst ofst = _Fst.__new__(_Fst) # <<<<<<<<<<<<<< * ofst._fst.reset(tfst) * return ofst */ - __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst__Fst(((PyTypeObject *)__pyx_ptype_9pywrapfst__Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2717, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst__Fst(((PyTypeObject *)__pyx_ptype_9pywrapfst__Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2718, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_ofst = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":2718 + /* "pywrapfst.pyx":2719 * raise FstOpError("Operation failed") * cdef _Fst ofst = _Fst.__new__(_Fst) * ofst._fst.reset(tfst) # <<<<<<<<<<<<<< @@ -28791,11 +28745,11 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_Fst(__pyx_t_9p */ if (unlikely(((PyObject *)__pyx_v_ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2718, __pyx_L1_error) + __PYX_ERR(0, 2719, __pyx_L1_error) } __pyx_v_ofst->_fst.reset(__pyx_v_tfst); - /* "pywrapfst.pyx":2719 + /* "pywrapfst.pyx":2720 * cdef _Fst ofst = _Fst.__new__(_Fst) * ofst._fst.reset(tfst) * return ofst # <<<<<<<<<<<<<< @@ -28807,7 +28761,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_Fst(__pyx_t_9p __pyx_r = __pyx_v_ofst; goto __pyx_L0; - /* "pywrapfst.pyx":2714 + /* "pywrapfst.pyx":2715 * * * cdef _Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -28829,7 +28783,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_Fst(__pyx_t_9p return __pyx_r; } -/* "pywrapfst.pyx":2722 +/* "pywrapfst.pyx":2723 * * * cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -28847,7 +28801,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_init_MutableFst", 0); - /* "pywrapfst.pyx":2723 + /* "pywrapfst.pyx":2724 * * cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -28857,14 +28811,14 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable __pyx_t_1 = ((__pyx_v_tfst->Properties(fst::kError, 1) == fst::kError) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2724 + /* "pywrapfst.pyx":2725 * cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * cdef _MutableFst ofst = _MutableFst.__new__(_MutableFst) * ofst._fst.reset(tfst) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2724, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -28878,14 +28832,14 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Operation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Operation_failed); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2724, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2724, __pyx_L1_error) + __PYX_ERR(0, 2725, __pyx_L1_error) - /* "pywrapfst.pyx":2723 + /* "pywrapfst.pyx":2724 * * cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -28894,19 +28848,19 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable */ } - /* "pywrapfst.pyx":2725 + /* "pywrapfst.pyx":2726 * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") * cdef _MutableFst ofst = _MutableFst.__new__(_MutableFst) # <<<<<<<<<<<<<< * ofst._fst.reset(tfst) * # Makes a copy of it as the derived type! Cool. */ - __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst__MutableFst(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2725, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst__MutableFst(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2726, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_ofst = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":2726 + /* "pywrapfst.pyx":2727 * raise FstOpError("Operation failed") * cdef _MutableFst ofst = _MutableFst.__new__(_MutableFst) * ofst._fst.reset(tfst) # <<<<<<<<<<<<<< @@ -28915,11 +28869,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable */ if (unlikely(((PyObject *)__pyx_v_ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2726, __pyx_L1_error) + __PYX_ERR(0, 2727, __pyx_L1_error) } __pyx_v_ofst->__pyx_base._fst.reset(__pyx_v_tfst); - /* "pywrapfst.pyx":2728 + /* "pywrapfst.pyx":2729 * ofst._fst.reset(tfst) * # Makes a copy of it as the derived type! Cool. * ofst._mfst = static_pointer_cast[fst.MutableFstClass, fst.FstClass](ofst._fst) # <<<<<<<<<<<<<< @@ -28928,15 +28882,15 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable */ if (unlikely(((PyObject *)__pyx_v_ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2728, __pyx_L1_error) + __PYX_ERR(0, 2729, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2728, __pyx_L1_error) + __PYX_ERR(0, 2729, __pyx_L1_error) } __pyx_v_ofst->_mfst = std::static_pointer_cast(__pyx_v_ofst->__pyx_base._fst); - /* "pywrapfst.pyx":2729 + /* "pywrapfst.pyx":2730 * # Makes a copy of it as the derived type! Cool. * ofst._mfst = static_pointer_cast[fst.MutableFstClass, fst.FstClass](ofst._fst) * return ofst # <<<<<<<<<<<<<< @@ -28948,7 +28902,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable __pyx_r = __pyx_v_ofst; goto __pyx_L0; - /* "pywrapfst.pyx":2722 + /* "pywrapfst.pyx":2723 * * * cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -28970,7 +28924,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__init_Mutable return __pyx_r; } -/* "pywrapfst.pyx":2732 +/* "pywrapfst.pyx":2733 * * * cdef _Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -28985,7 +28939,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_XFst(__pyx_t_9 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_init_XFst", 0); - /* "pywrapfst.pyx":2733 + /* "pywrapfst.pyx":2734 * * cdef _Fst _init_XFst(FstClass_ptr tfst): * if tfst.Properties(fst.kMutable, True) == fst.kMutable: # <<<<<<<<<<<<<< @@ -28995,7 +28949,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_XFst(__pyx_t_9 __pyx_t_1 = ((__pyx_v_tfst->Properties(fst::kMutable, 1) == fst::kMutable) != 0); if (__pyx_t_1) { - /* "pywrapfst.pyx":2734 + /* "pywrapfst.pyx":2735 * cdef _Fst _init_XFst(FstClass_ptr tfst): * if tfst.Properties(fst.kMutable, True) == fst.kMutable: * return _init_MutableFst(static_cast[MutableFstClass_ptr](tfst)) # <<<<<<<<<<<<<< @@ -29003,13 +28957,13 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_XFst(__pyx_t_9 * return _init_Fst(tfst) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(static_cast<__pyx_t_9pywrapfst_MutableFstClass_ptr>(__pyx_v_tfst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2734, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(static_cast<__pyx_t_9pywrapfst_MutableFstClass_ptr>(__pyx_v_tfst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2733 + /* "pywrapfst.pyx":2734 * * cdef _Fst _init_XFst(FstClass_ptr tfst): * if tfst.Properties(fst.kMutable, True) == fst.kMutable: # <<<<<<<<<<<<<< @@ -29018,7 +28972,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_XFst(__pyx_t_9 */ } - /* "pywrapfst.pyx":2736 + /* "pywrapfst.pyx":2737 * return _init_MutableFst(static_cast[MutableFstClass_ptr](tfst)) * else: * return _init_Fst(tfst) # <<<<<<<<<<<<<< @@ -29027,14 +28981,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_XFst(__pyx_t_9 */ /*else*/ { __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_Fst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_Fst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; } - /* "pywrapfst.pyx":2732 + /* "pywrapfst.pyx":2733 * * * cdef _Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -29053,7 +29007,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__init_XFst(__pyx_t_9 return __pyx_r; } -/* "pywrapfst.pyx":2739 +/* "pywrapfst.pyx":2740 * * * cdef _MutableFst _create_Fst(arc_type=b"standard"): # <<<<<<<<<<<<<< @@ -29080,17 +29034,17 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__create_Fst(s } } - /* "pywrapfst.pyx":2741 + /* "pywrapfst.pyx":2742 * cdef _MutableFst _create_Fst(arc_type=b"standard"): * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(tostring(arc_type))) # <<<<<<<<<<<<<< * if tfst.get() == NULL: * raise FstOpError("Unknown arc type: {!r}".format(arc_type)) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2741, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2742, __pyx_L1_error) __pyx_v_tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "pywrapfst.pyx":2742 + /* "pywrapfst.pyx":2743 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(tostring(arc_type))) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -29100,16 +29054,16 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__create_Fst(s __pyx_t_2 = ((__pyx_v_tfst.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":2743 + /* "pywrapfst.pyx":2744 * tfst.reset(new fst.VectorFstClass(tostring(arc_type))) * if tfst.get() == NULL: * raise FstOpError("Unknown arc type: {!r}".format(arc_type)) # <<<<<<<<<<<<<< * return _init_MutableFst(tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2743, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_arc_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2743, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_arc_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -29123,7 +29077,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__create_Fst(s } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_arc_type) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_arc_type); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2743, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -29139,14 +29093,14 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__create_Fst(s __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2743, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2743, __pyx_L1_error) + __PYX_ERR(0, 2744, __pyx_L1_error) - /* "pywrapfst.pyx":2742 + /* "pywrapfst.pyx":2743 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(tostring(arc_type))) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -29155,7 +29109,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__create_Fst(s */ } - /* "pywrapfst.pyx":2744 + /* "pywrapfst.pyx":2745 * if tfst.get() == NULL: * raise FstOpError("Unknown arc type: {!r}".format(arc_type)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -29163,13 +29117,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__create_Fst(s * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2744, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2739 + /* "pywrapfst.pyx":2740 * * * cdef _MutableFst _create_Fst(arc_type=b"standard"): # <<<<<<<<<<<<<< @@ -29192,7 +29146,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst__create_Fst(s return __pyx_r; } -/* "pywrapfst.pyx":2747 +/* "pywrapfst.pyx":2748 * * * cpdef _Fst _read(filename): # <<<<<<<<<<<<<< @@ -29214,17 +29168,17 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read(PyObject *__py PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_read", 0); - /* "pywrapfst.pyx":2749 + /* "pywrapfst.pyx":2750 * cpdef _Fst _read(filename): * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.FstClass.Read(tostring(filename))) # <<<<<<<<<<<<<< * if tfst.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2749, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2750, __pyx_L1_error) __pyx_v_tfst.reset(fst::script::FstClass::Read(__pyx_t_1)); - /* "pywrapfst.pyx":2750 + /* "pywrapfst.pyx":2751 * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.FstClass.Read(tostring(filename))) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -29234,16 +29188,16 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read(PyObject *__py __pyx_t_2 = ((__pyx_v_tfst.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":2751 + /* "pywrapfst.pyx":2752 * tfst.reset(fst.FstClass.Read(tostring(filename))) * if tfst.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * return _init_XFst(tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2751, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2751, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -29257,7 +29211,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read(PyObject *__py } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2751, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -29273,14 +29227,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read(PyObject *__py __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2751, __pyx_L1_error) + __PYX_ERR(0, 2752, __pyx_L1_error) - /* "pywrapfst.pyx":2750 + /* "pywrapfst.pyx":2751 * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.FstClass.Read(tostring(filename))) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -29289,7 +29243,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read(PyObject *__py */ } - /* "pywrapfst.pyx":2752 + /* "pywrapfst.pyx":2753 * if tfst.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filename)) * return _init_XFst(tfst.release()) # <<<<<<<<<<<<<< @@ -29297,13 +29251,13 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read(PyObject *__py * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2752, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2747 + /* "pywrapfst.pyx":2748 * * * cpdef _Fst _read(filename): # <<<<<<<<<<<<<< @@ -29345,7 +29299,7 @@ static PyObject *__pyx_pf_9pywrapfst_14_read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_read", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29362,7 +29316,7 @@ static PyObject *__pyx_pf_9pywrapfst_14_read(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "pywrapfst.pyx":2755 +/* "pywrapfst.pyx":2756 * * * cpdef _Fst _read_Fst_from_string(state): # <<<<<<<<<<<<<< @@ -29383,17 +29337,17 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read_Fst_from_strin PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_read_Fst_from_string", 0); - /* "pywrapfst.pyx":2757 + /* "pywrapfst.pyx":2758 * cpdef _Fst _read_Fst_from_string(state): * cdef stringstream sstrm * sstrm << tostring(state) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.FstClass.ReadStream(sstrm, b"")) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2757, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2758, __pyx_L1_error) (void)((__pyx_v_sstrm << __pyx_t_1)); - /* "pywrapfst.pyx":2759 + /* "pywrapfst.pyx":2760 * sstrm << tostring(state) * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.FstClass.ReadStream(sstrm, b"")) # <<<<<<<<<<<<<< @@ -29402,7 +29356,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read_Fst_from_strin */ __pyx_v_tfst.reset(fst::script::FstClass::Read(__pyx_v_sstrm, __pyx_k_pywrapfst)); - /* "pywrapfst.pyx":2760 + /* "pywrapfst.pyx":2761 * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.FstClass.ReadStream(sstrm, b"")) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -29412,14 +29366,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read_Fst_from_strin __pyx_t_2 = ((__pyx_v_tfst.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":2761 + /* "pywrapfst.pyx":2762 * tfst.reset(fst.FstClass.ReadStream(sstrm, b"")) * if tfst.get() == NULL: * raise FstIOError("Read failed") # <<<<<<<<<<<<<< * return _init_XFst(tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2761, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -29433,14 +29387,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read_Fst_from_strin } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Read_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Read_failed); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2761, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2761, __pyx_L1_error) + __PYX_ERR(0, 2762, __pyx_L1_error) - /* "pywrapfst.pyx":2760 + /* "pywrapfst.pyx":2761 * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.FstClass.ReadStream(sstrm, b"")) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -29449,7 +29403,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read_Fst_from_strin */ } - /* "pywrapfst.pyx":2762 + /* "pywrapfst.pyx":2763 * if tfst.get() == NULL: * raise FstIOError("Read failed") * return _init_XFst(tfst.release()) # <<<<<<<<<<<<<< @@ -29457,13 +29411,13 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__read_Fst_from_strin * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2762, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2755 + /* "pywrapfst.pyx":2756 * * * cpdef _Fst _read_Fst_from_string(state): # <<<<<<<<<<<<<< @@ -29503,7 +29457,7 @@ static PyObject *__pyx_pf_9pywrapfst_16_read_Fst_from_string(CYTHON_UNUSED PyObj PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_read_Fst_from_string", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2755, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29520,7 +29474,7 @@ static PyObject *__pyx_pf_9pywrapfst_16_read_Fst_from_string(CYTHON_UNUSED PyObj return __pyx_r; } -/* "pywrapfst.pyx":2782 +/* "pywrapfst.pyx":2783 * """ * * def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<< @@ -29565,7 +29519,7 @@ static PyObject *__pyx_pw_9pywrapfst_3Fst_1__new__(PyObject *__pyx_self, PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 2782, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 2783, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -29581,7 +29535,7 @@ static PyObject *__pyx_pw_9pywrapfst_3Fst_1__new__(PyObject *__pyx_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2782, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2783, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.Fst.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -29601,7 +29555,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst___new__(CYTHON_UNUSED PyObject *__pyx_ struct __pyx_opt_args_9pywrapfst__create_Fst __pyx_t_2; __Pyx_RefNannySetupContext("__new__", 0); - /* "pywrapfst.pyx":2783 + /* "pywrapfst.pyx":2784 * * def __new__(cls, arc_type=b"standard"): * return _create_Fst(arc_type) # <<<<<<<<<<<<<< @@ -29611,13 +29565,13 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst___new__(CYTHON_UNUSED PyObject *__pyx_ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.arc_type = __pyx_v_arc_type; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__create_Fst(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2783, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__create_Fst(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2782 + /* "pywrapfst.pyx":2783 * """ * * def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<< @@ -29636,7 +29590,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst___new__(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "pywrapfst.pyx":2786 +/* "pywrapfst.pyx":2787 * * @staticmethod * def read(filename): # <<<<<<<<<<<<<< @@ -29665,7 +29619,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst_2read(CYTHON_UNUSED PyObject *__pyx_se PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("read", 0); - /* "pywrapfst.pyx":2801 + /* "pywrapfst.pyx":2802 * FstIOError: Read failed. * """ * return _read(filename) # <<<<<<<<<<<<<< @@ -29673,13 +29627,13 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst_2read(CYTHON_UNUSED PyObject *__pyx_se * @staticmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2801, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2786 + /* "pywrapfst.pyx":2787 * * @staticmethod * def read(filename): # <<<<<<<<<<<<<< @@ -29698,7 +29652,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst_2read(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "pywrapfst.pyx":2804 +/* "pywrapfst.pyx":2805 * * @staticmethod * def read_from_string(state): # <<<<<<<<<<<<<< @@ -29727,7 +29681,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst_4read_from_string(CYTHON_UNUSED PyObje PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("read_from_string", 0); - /* "pywrapfst.pyx":2822 + /* "pywrapfst.pyx":2823 * See also: `write_to_string`. * """ * return _read_Fst_from_string(state) # <<<<<<<<<<<<<< @@ -29735,13 +29689,13 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst_4read_from_string(CYTHON_UNUSED PyObje * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2822, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2804 + /* "pywrapfst.pyx":2805 * * @staticmethod * def read_from_string(state): # <<<<<<<<<<<<<< @@ -29760,7 +29714,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Fst_4read_from_string(CYTHON_UNUSED PyObje return __pyx_r; } -/* "pywrapfst.pyx":2935 +/* "pywrapfst.pyx":2936 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -29790,7 +29744,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc___repr__(struct __pyx_obj_9pywrapfst_A PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":2936 + /* "pywrapfst.pyx":2937 * * def __repr__(self): * return "".format(id(self)) # <<<<<<<<<<<<<< @@ -29798,9 +29752,9 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc___repr__(struct __pyx_obj_9pywrapfst_A * def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Arc_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2936, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Arc_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2936, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -29815,14 +29769,14 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc___repr__(struct __pyx_obj_9pywrapfst_A __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2936, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2935 + /* "pywrapfst.pyx":2936 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -29844,7 +29798,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc___repr__(struct __pyx_obj_9pywrapfst_A return __pyx_r; } -/* "pywrapfst.pyx":2938 +/* "pywrapfst.pyx":2939 * return "".format(id(self)) * * def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): # <<<<<<<<<<<<<< @@ -29889,23 +29843,23 @@ static int __pyx_pw_9pywrapfst_3Arc_3__init__(PyObject *__pyx_v_self, PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_olabel)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 2938, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 2939, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 2938, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 2939, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nextstate)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 2938, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 2939, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2938, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2939, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -29915,14 +29869,14 @@ static int __pyx_pw_9pywrapfst_3Arc_3__init__(PyObject *__pyx_v_self, PyObject * values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } - __pyx_v_ilabel = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_ilabel == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2938, __pyx_L3_error) - __pyx_v_olabel = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_olabel == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2938, __pyx_L3_error) + __pyx_v_ilabel = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_ilabel == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L3_error) + __pyx_v_olabel = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_olabel == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L3_error) __pyx_v_weight = values[2]; - __pyx_v_nextstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nextstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2938, __pyx_L3_error) + __pyx_v_nextstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nextstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2938, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2939, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.Arc.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -29942,17 +29896,17 @@ static int __pyx_pf_9pywrapfst_3Arc_2__init__(struct __pyx_obj_9pywrapfst_Arc *_ fst::script::WeightClass __pyx_t_1; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":2939 + /* "pywrapfst.pyx":2940 * * def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): * cdef fst.WeightClass wc = _get_WeightClass_or_One(b"tropical", weight) # <<<<<<<<<<<<<< * self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate)) * */ - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2940, __pyx_L1_error) __pyx_v_wc = __pyx_t_1; - /* "pywrapfst.pyx":2940 + /* "pywrapfst.pyx":2941 * def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): * cdef fst.WeightClass wc = _get_WeightClass_or_One(b"tropical", weight) * self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate)) # <<<<<<<<<<<<<< @@ -29961,11 +29915,11 @@ static int __pyx_pf_9pywrapfst_3Arc_2__init__(struct __pyx_obj_9pywrapfst_Arc *_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2940, __pyx_L1_error) + __PYX_ERR(0, 2941, __pyx_L1_error) } __pyx_v_self->_arc.reset(new fst::script::ArcClass(__pyx_v_ilabel, __pyx_v_olabel, __pyx_v_wc, __pyx_v_nextstate)); - /* "pywrapfst.pyx":2938 + /* "pywrapfst.pyx":2939 * return "".format(id(self)) * * def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): # <<<<<<<<<<<<<< @@ -29984,7 +29938,7 @@ static int __pyx_pf_9pywrapfst_3Arc_2__init__(struct __pyx_obj_9pywrapfst_Arc *_ return __pyx_r; } -/* "pywrapfst.pyx":2942 +/* "pywrapfst.pyx":2943 * self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate)) * * cpdef Arc copy(self): # <<<<<<<<<<<<<< @@ -30006,13 +29960,12 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst_3Arc_copy(struct __py if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2942, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Arc_5copy)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -30029,29 +29982,29 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst_3Arc_copy(struct __py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2942, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Arc))))) __PYX_ERR(0, 2942, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Arc))))) __PYX_ERR(0, 2943, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":2943 + /* "pywrapfst.pyx":2944 * * cpdef Arc copy(self): * return Arc(self.ilabel, self.olabel, self.weight, self.nextstate) # <<<<<<<<<<<<<< @@ -30059,15 +30012,15 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst_3Arc_copy(struct __py * property ilabel: */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2943, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2943, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nextstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2943, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nextstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2943, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); @@ -30081,14 +30034,14 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst_3Arc_copy(struct __py __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2943, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2942 + /* "pywrapfst.pyx":2943 * self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate)) * * cpdef Arc copy(self): # <<<<<<<<<<<<<< @@ -30130,7 +30083,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_4copy(struct __pyx_obj_9pywrapfst_Arc PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Arc_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2942, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Arc_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -30147,7 +30100,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_4copy(struct __pyx_obj_9pywrapfst_Arc return __pyx_r; } -/* "pywrapfst.pyx":2947 +/* "pywrapfst.pyx":2948 * property ilabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30174,7 +30127,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6ilabel___get__(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "pywrapfst.pyx":2948 + /* "pywrapfst.pyx":2949 * * def __get__(self): * return deref(self._arc).ilabel # <<<<<<<<<<<<<< @@ -30184,15 +30137,15 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6ilabel___get__(struct __pyx_obj_9pywr __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2948, __pyx_L1_error) + __PYX_ERR(0, 2949, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2948, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2947 + /* "pywrapfst.pyx":2948 * property ilabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30211,7 +30164,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6ilabel___get__(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":2950 +/* "pywrapfst.pyx":2951 * return deref(self._arc).ilabel * * def __set__(self, int64 value): # <<<<<<<<<<<<<< @@ -30227,7 +30180,7 @@ static int __pyx_pw_9pywrapfst_3Arc_6ilabel_3__set__(PyObject *__pyx_v_self, PyO __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); assert(__pyx_arg_value); { - __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2950, __pyx_L3_error) + __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2951, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30247,7 +30200,7 @@ static int __pyx_pf_9pywrapfst_3Arc_6ilabel_2__set__(struct __pyx_obj_9pywrapfst __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); - /* "pywrapfst.pyx":2951 + /* "pywrapfst.pyx":2952 * * def __set__(self, int64 value): * deref(self._arc).ilabel = value # <<<<<<<<<<<<<< @@ -30256,11 +30209,11 @@ static int __pyx_pf_9pywrapfst_3Arc_6ilabel_2__set__(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2951, __pyx_L1_error) + __PYX_ERR(0, 2952, __pyx_L1_error) } (*__pyx_v_self->_arc).ilabel = __pyx_v_value; - /* "pywrapfst.pyx":2950 + /* "pywrapfst.pyx":2951 * return deref(self._arc).ilabel * * def __set__(self, int64 value): # <<<<<<<<<<<<<< @@ -30279,7 +30232,7 @@ static int __pyx_pf_9pywrapfst_3Arc_6ilabel_2__set__(struct __pyx_obj_9pywrapfst return __pyx_r; } -/* "pywrapfst.pyx":2955 +/* "pywrapfst.pyx":2956 * property olabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30306,7 +30259,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6olabel___get__(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "pywrapfst.pyx":2956 + /* "pywrapfst.pyx":2957 * * def __get__(self): * return deref(self._arc).olabel # <<<<<<<<<<<<<< @@ -30316,15 +30269,15 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6olabel___get__(struct __pyx_obj_9pywr __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2956, __pyx_L1_error) + __PYX_ERR(0, 2957, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2956, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2955 + /* "pywrapfst.pyx":2956 * property olabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30343,7 +30296,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6olabel___get__(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":2958 +/* "pywrapfst.pyx":2959 * return deref(self._arc).olabel * * def __set__(self, int64 value): # <<<<<<<<<<<<<< @@ -30359,7 +30312,7 @@ static int __pyx_pw_9pywrapfst_3Arc_6olabel_3__set__(PyObject *__pyx_v_self, PyO __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); assert(__pyx_arg_value); { - __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2958, __pyx_L3_error) + __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2959, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30379,7 +30332,7 @@ static int __pyx_pf_9pywrapfst_3Arc_6olabel_2__set__(struct __pyx_obj_9pywrapfst __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); - /* "pywrapfst.pyx":2959 + /* "pywrapfst.pyx":2960 * * def __set__(self, int64 value): * deref(self._arc).olabel = value # <<<<<<<<<<<<<< @@ -30388,11 +30341,11 @@ static int __pyx_pf_9pywrapfst_3Arc_6olabel_2__set__(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2959, __pyx_L1_error) + __PYX_ERR(0, 2960, __pyx_L1_error) } (*__pyx_v_self->_arc).olabel = __pyx_v_value; - /* "pywrapfst.pyx":2958 + /* "pywrapfst.pyx":2959 * return deref(self._arc).olabel * * def __set__(self, int64 value): # <<<<<<<<<<<<<< @@ -30411,7 +30364,7 @@ static int __pyx_pf_9pywrapfst_3Arc_6olabel_2__set__(struct __pyx_obj_9pywrapfst return __pyx_r; } -/* "pywrapfst.pyx":2963 +/* "pywrapfst.pyx":2964 * property weight: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30439,19 +30392,19 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6weight___get__(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "pywrapfst.pyx":2964 + /* "pywrapfst.pyx":2965 * * def __get__(self): * cdef Weight weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * weight._weight.reset(new fst.WeightClass(deref(self._arc).weight)) * return weight */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2964, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2965, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2965 + /* "pywrapfst.pyx":2966 * def __get__(self): * cdef Weight weight = Weight.__new__(Weight) * weight._weight.reset(new fst.WeightClass(deref(self._arc).weight)) # <<<<<<<<<<<<<< @@ -30460,15 +30413,15 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6weight___get__(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 2965, __pyx_L1_error) + __PYX_ERR(0, 2966, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2965, __pyx_L1_error) + __PYX_ERR(0, 2966, __pyx_L1_error) } __pyx_v_weight->_weight.reset(new fst::script::WeightClass((*__pyx_v_self->_arc).weight)); - /* "pywrapfst.pyx":2966 + /* "pywrapfst.pyx":2967 * cdef Weight weight = Weight.__new__(Weight) * weight._weight.reset(new fst.WeightClass(deref(self._arc).weight)) * return weight # <<<<<<<<<<<<<< @@ -30480,7 +30433,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6weight___get__(struct __pyx_obj_9pywr __pyx_r = ((PyObject *)__pyx_v_weight); goto __pyx_L0; - /* "pywrapfst.pyx":2963 + /* "pywrapfst.pyx":2964 * property weight: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30500,7 +30453,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_6weight___get__(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":2968 +/* "pywrapfst.pyx":2969 * return weight * * def __set__(self, weight): # <<<<<<<<<<<<<< @@ -30527,21 +30480,21 @@ static int __pyx_pf_9pywrapfst_3Arc_6weight_2__set__(struct __pyx_obj_9pywrapfst fst::script::WeightClass __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - /* "pywrapfst.pyx":2969 + /* "pywrapfst.pyx":2970 * * def __set__(self, weight): * deref(self._arc).weight = _get_WeightClass_or_One(b"tropical", weight) # <<<<<<<<<<<<<< * * property nextstate: */ - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2969, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2970, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2969, __pyx_L1_error) + __PYX_ERR(0, 2970, __pyx_L1_error) } (*__pyx_v_self->_arc).weight = __pyx_t_1; - /* "pywrapfst.pyx":2968 + /* "pywrapfst.pyx":2969 * return weight * * def __set__(self, weight): # <<<<<<<<<<<<<< @@ -30560,7 +30513,7 @@ static int __pyx_pf_9pywrapfst_3Arc_6weight_2__set__(struct __pyx_obj_9pywrapfst return __pyx_r; } -/* "pywrapfst.pyx":2973 +/* "pywrapfst.pyx":2974 * property nextstate: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30587,7 +30540,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_9nextstate___get__(struct __pyx_obj_9p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "pywrapfst.pyx":2974 + /* "pywrapfst.pyx":2975 * * def __get__(self): * return deref(self._arc).nextstate # <<<<<<<<<<<<<< @@ -30597,15 +30550,15 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_9nextstate___get__(struct __pyx_obj_9p __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2974, __pyx_L1_error) + __PYX_ERR(0, 2975, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2974, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2973 + /* "pywrapfst.pyx":2974 * property nextstate: * * def __get__(self): # <<<<<<<<<<<<<< @@ -30624,7 +30577,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_9nextstate___get__(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":2976 +/* "pywrapfst.pyx":2977 * return deref(self._arc).nextstate * * def __set__(self, int64 value): # <<<<<<<<<<<<<< @@ -30640,7 +30593,7 @@ static int __pyx_pw_9pywrapfst_3Arc_9nextstate_3__set__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); assert(__pyx_arg_value); { - __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2976, __pyx_L3_error) + __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2977, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30660,7 +30613,7 @@ static int __pyx_pf_9pywrapfst_3Arc_9nextstate_2__set__(struct __pyx_obj_9pywrap __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); - /* "pywrapfst.pyx":2977 + /* "pywrapfst.pyx":2978 * * def __set__(self, int64 value): * deref(self._arc).nextstate = value # <<<<<<<<<<<<<< @@ -30669,11 +30622,11 @@ static int __pyx_pf_9pywrapfst_3Arc_9nextstate_2__set__(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2977, __pyx_L1_error) + __PYX_ERR(0, 2978, __pyx_L1_error) } (*__pyx_v_self->_arc).nextstate = __pyx_v_value; - /* "pywrapfst.pyx":2976 + /* "pywrapfst.pyx":2977 * return deref(self._arc).nextstate * * def __set__(self, int64 value): # <<<<<<<<<<<<<< @@ -30799,7 +30752,7 @@ static PyObject *__pyx_pf_9pywrapfst_3Arc_8__setstate_cython__(CYTHON_UNUSED str return __pyx_r; } -/* "pywrapfst.pyx":2980 +/* "pywrapfst.pyx":2981 * * * cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<< @@ -30817,19 +30770,19 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst__init_Arc(fst::script PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_init_Arc", 0); - /* "pywrapfst.pyx":2981 + /* "pywrapfst.pyx":2982 * * cdef Arc _init_Arc(const fst.ArcClass &arc): * cdef Weight weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * weight._weight.reset(new fst.WeightClass(arc.weight)) * return Arc(arc.ilabel, arc.olabel, weight, arc.nextstate) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2982, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2982 + /* "pywrapfst.pyx":2983 * cdef Arc _init_Arc(const fst.ArcClass &arc): * cdef Weight weight = Weight.__new__(Weight) * weight._weight.reset(new fst.WeightClass(arc.weight)) # <<<<<<<<<<<<<< @@ -30838,11 +30791,11 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst__init_Arc(fst::script */ if (unlikely(((PyObject *)__pyx_v_weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 2982, __pyx_L1_error) + __PYX_ERR(0, 2983, __pyx_L1_error) } __pyx_v_weight->_weight.reset(new fst::script::WeightClass(__pyx_v_arc.weight)); - /* "pywrapfst.pyx":2983 + /* "pywrapfst.pyx":2984 * cdef Weight weight = Weight.__new__(Weight) * weight._weight.reset(new fst.WeightClass(arc.weight)) * return Arc(arc.ilabel, arc.olabel, weight, arc.nextstate) # <<<<<<<<<<<<<< @@ -30850,13 +30803,13 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst__init_Arc(fst::script * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.nextstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.nextstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -30870,14 +30823,14 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst__init_Arc(fst::script __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2980 + /* "pywrapfst.pyx":2981 * * * cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<< @@ -30900,7 +30853,7 @@ static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst__init_Arc(fst::script return __pyx_r; } -/* "pywrapfst.pyx":2994 +/* "pywrapfst.pyx":2995 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -30930,7 +30883,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator___repr__(struct __pyx_obj_9py PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":2995 + /* "pywrapfst.pyx":2996 * * def __repr__(self): * return "".format(id(self)) # <<<<<<<<<<<<<< @@ -30938,9 +30891,9 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator___repr__(struct __pyx_obj_9py * def __init__(self, _Fst ifst, int64 state): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_ArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2995, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_ArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2995, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -30955,14 +30908,14 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator___repr__(struct __pyx_obj_9py __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2995, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":2994 + /* "pywrapfst.pyx":2995 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -30984,7 +30937,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator___repr__(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":2997 +/* "pywrapfst.pyx":2998 * return "".format(id(self)) * * def __init__(self, _Fst ifst, int64 state): # <<<<<<<<<<<<<< @@ -31023,11 +30976,11 @@ static int __pyx_pw_9pywrapfst_11ArcIterator_3__init__(PyObject *__pyx_v_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2997, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2998, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2997, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2998, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -31036,17 +30989,17 @@ static int __pyx_pw_9pywrapfst_11ArcIterator_3__init__(PyObject *__pyx_v_self, P values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2997, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2998, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2997, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2998, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.ArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 2997, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 2998, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_2__init__(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state); /* function exit code */ @@ -31068,7 +31021,7 @@ static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapf std::shared_ptr __pyx_t_5; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":2998 + /* "pywrapfst.pyx":2999 * * def __init__(self, _Fst ifst, int64 state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -31077,19 +31030,19 @@ static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2998, __pyx_L1_error) + __PYX_ERR(0, 2999, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_ifst->_fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":2999 + /* "pywrapfst.pyx":3000 * def __init__(self, _Fst ifst, int64 state): * if not ifst._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2999, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -31103,14 +31056,14 @@ static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapf } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2999, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2999, __pyx_L1_error) + __PYX_ERR(0, 3000, __pyx_L1_error) - /* "pywrapfst.pyx":2998 + /* "pywrapfst.pyx":2999 * * def __init__(self, _Fst ifst, int64 state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -31119,7 +31072,7 @@ static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapf */ } - /* "pywrapfst.pyx":3001 + /* "pywrapfst.pyx":3002 * raise FstIndexError("State index out of range") * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst # <<<<<<<<<<<<<< @@ -31128,16 +31081,16 @@ static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3001, __pyx_L1_error) + __PYX_ERR(0, 3002, __pyx_L1_error) } __pyx_t_5 = __pyx_v_ifst->_fst; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3001, __pyx_L1_error) + __PYX_ERR(0, 3002, __pyx_L1_error) } __pyx_v_self->_fst = __pyx_t_5; - /* "pywrapfst.pyx":3002 + /* "pywrapfst.pyx":3003 * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst * self._aiter.reset(new fst.ArcIteratorClass(deref(self._fst), state)) # <<<<<<<<<<<<<< @@ -31146,15 +31099,15 @@ static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3002, __pyx_L1_error) + __PYX_ERR(0, 3003, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3002, __pyx_L1_error) + __PYX_ERR(0, 3003, __pyx_L1_error) } __pyx_v_self->_aiter.reset(new fst::script::ArcIteratorClass((*__pyx_v_self->_fst), __pyx_v_state)); - /* "pywrapfst.pyx":2997 + /* "pywrapfst.pyx":2998 * return "".format(id(self)) * * def __init__(self, _Fst ifst, int64 state): # <<<<<<<<<<<<<< @@ -31176,7 +31129,7 @@ static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapf return __pyx_r; } -/* "pywrapfst.pyx":3005 +/* "pywrapfst.pyx":3006 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -31202,7 +31155,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_4__iter__(struct __pyx_obj_9p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "pywrapfst.pyx":3006 + /* "pywrapfst.pyx":3007 * # This just registers this class as a possible iterator. * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -31214,7 +31167,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_4__iter__(struct __pyx_obj_9p __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":3005 + /* "pywrapfst.pyx":3006 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -31229,7 +31182,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_4__iter__(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":3009 +/* "pywrapfst.pyx":3010 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -31258,7 +31211,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - /* "pywrapfst.pyx":3010 + /* "pywrapfst.pyx":3011 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -31267,12 +31220,12 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 3010, __pyx_L1_error) + __PYX_ERR(0, 3011, __pyx_L1_error) } __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":3011 + /* "pywrapfst.pyx":3012 * def __next__(self): * if self.done(): * raise StopIteration # <<<<<<<<<<<<<< @@ -31280,9 +31233,9 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p * self.next() */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 3011, __pyx_L1_error) + __PYX_ERR(0, 3012, __pyx_L1_error) - /* "pywrapfst.pyx":3010 + /* "pywrapfst.pyx":3011 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -31291,7 +31244,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p */ } - /* "pywrapfst.pyx":3012 + /* "pywrapfst.pyx":3013 * if self.done(): * raise StopIteration * result = self.value() # <<<<<<<<<<<<<< @@ -31300,14 +31253,14 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value"); - __PYX_ERR(0, 3012, __pyx_L1_error) + __PYX_ERR(0, 3013, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3012, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "pywrapfst.pyx":3013 + /* "pywrapfst.pyx":3014 * raise StopIteration * result = self.value() * self.next() # <<<<<<<<<<<<<< @@ -31316,11 +31269,11 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 3013, __pyx_L1_error) + __PYX_ERR(0, 3014, __pyx_L1_error) } ((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); - /* "pywrapfst.pyx":3014 + /* "pywrapfst.pyx":3015 * result = self.value() * self.next() * return result # <<<<<<<<<<<<<< @@ -31332,7 +31285,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pywrapfst.pyx":3009 + /* "pywrapfst.pyx":3010 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -31352,7 +31305,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":3016 +/* "pywrapfst.pyx":3017 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -31374,13 +31327,12 @@ static bool __pyx_f_9pywrapfst_11ArcIterator_done(struct __pyx_obj_9pywrapfst_Ar if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3016, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_9done)) { __Pyx_INCREF(__pyx_t_1); @@ -31396,29 +31348,29 @@ static bool __pyx_f_9pywrapfst_11ArcIterator_done(struct __pyx_obj_9pywrapfst_Ar } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3016, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3017, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3025 + /* "pywrapfst.pyx":3026 * True if the iterator is exhausted, False otherwise. * """ * return self._aiter.get().Done() # <<<<<<<<<<<<<< @@ -31427,12 +31379,12 @@ static bool __pyx_f_9pywrapfst_11ArcIterator_done(struct __pyx_obj_9pywrapfst_Ar */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3025, __pyx_L1_error) + __PYX_ERR(0, 3026, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Done(); goto __pyx_L0; - /* "pywrapfst.pyx":3016 + /* "pywrapfst.pyx":3017 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -31473,7 +31425,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_8done(struct __pyx_obj_9pywra PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("done", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_11ArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3016, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_11ArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31490,7 +31442,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_8done(struct __pyx_obj_9pywra return __pyx_r; } -/* "pywrapfst.pyx":3027 +/* "pywrapfst.pyx":3028 * return self._aiter.get().Done() * * cpdef uint32 flags(self): # <<<<<<<<<<<<<< @@ -31512,13 +31464,12 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_11ArcIterator_flags(struct if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_11flags)) { __Pyx_INCREF(__pyx_t_1); @@ -31534,29 +31485,29 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_11ArcIterator_flags(struct } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3027, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3027, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3028, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3036 + /* "pywrapfst.pyx":3037 * The current iterator behavioral flags as an integer. * """ * return self._aiter.get().Flags() # <<<<<<<<<<<<<< @@ -31565,12 +31516,12 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_11ArcIterator_flags(struct */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3036, __pyx_L1_error) + __PYX_ERR(0, 3037, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Flags(); goto __pyx_L0; - /* "pywrapfst.pyx":3027 + /* "pywrapfst.pyx":3028 * return self._aiter.get().Done() * * cpdef uint32 flags(self): # <<<<<<<<<<<<<< @@ -31611,7 +31562,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_10flags(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("flags", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_11ArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_11ArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31628,7 +31579,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_10flags(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":3038 +/* "pywrapfst.pyx":3039 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -31648,13 +31599,12 @@ static void __pyx_f_9pywrapfst_11ArcIterator_next(struct __pyx_obj_9pywrapfst_Ar if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3038, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_13next)) { __Pyx_INCREF(__pyx_t_1); @@ -31670,27 +31620,27 @@ static void __pyx_f_9pywrapfst_11ArcIterator_next(struct __pyx_obj_9pywrapfst_Ar } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3038, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3044 + /* "pywrapfst.pyx":3045 * Advances the iterator. * """ * self._aiter.get().Next() # <<<<<<<<<<<<<< @@ -31699,11 +31649,11 @@ static void __pyx_f_9pywrapfst_11ArcIterator_next(struct __pyx_obj_9pywrapfst_Ar */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3044, __pyx_L1_error) + __PYX_ERR(0, 3045, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Next(); - /* "pywrapfst.pyx":3038 + /* "pywrapfst.pyx":3039 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -31743,7 +31693,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_12next(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("next", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3038, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31760,7 +31710,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_12next(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":3046 +/* "pywrapfst.pyx":3047 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -31782,13 +31732,12 @@ static size_t __pyx_f_9pywrapfst_11ArcIterator_position(struct __pyx_obj_9pywrap if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_15position)) { __Pyx_INCREF(__pyx_t_1); @@ -31804,29 +31753,29 @@ static size_t __pyx_f_9pywrapfst_11ArcIterator_position(struct __pyx_obj_9pywrap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3046, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3046, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3047, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3055 + /* "pywrapfst.pyx":3056 * The iterator's position, expressed as an integer. * """ * return self._aiter.get().Position() # <<<<<<<<<<<<<< @@ -31835,12 +31784,12 @@ static size_t __pyx_f_9pywrapfst_11ArcIterator_position(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3055, __pyx_L1_error) + __PYX_ERR(0, 3056, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Position(); goto __pyx_L0; - /* "pywrapfst.pyx":3046 + /* "pywrapfst.pyx":3047 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -31881,7 +31830,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_14position(struct __pyx_obj_9 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("position", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_11ArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_11ArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31898,7 +31847,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_14position(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":3057 +/* "pywrapfst.pyx":3058 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -31918,13 +31867,12 @@ static void __pyx_f_9pywrapfst_11ArcIterator_reset(struct __pyx_obj_9pywrapfst_A if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3057, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_17reset)) { __Pyx_INCREF(__pyx_t_1); @@ -31940,27 +31888,27 @@ static void __pyx_f_9pywrapfst_11ArcIterator_reset(struct __pyx_obj_9pywrapfst_A } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3063 + /* "pywrapfst.pyx":3064 * Resets the iterator to the initial position. * """ * self._aiter.get().Reset() # <<<<<<<<<<<<<< @@ -31969,11 +31917,11 @@ static void __pyx_f_9pywrapfst_11ArcIterator_reset(struct __pyx_obj_9pywrapfst_A */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3063, __pyx_L1_error) + __PYX_ERR(0, 3064, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Reset(); - /* "pywrapfst.pyx":3057 + /* "pywrapfst.pyx":3058 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -32013,7 +31961,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_16reset(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reset", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3057, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32030,7 +31978,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_16reset(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":3065 +/* "pywrapfst.pyx":3066 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -32051,16 +31999,15 @@ static void __pyx_f_9pywrapfst_11ArcIterator_seek(struct __pyx_obj_9pywrapfst_Ar if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_19seek)) { - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -32076,27 +32023,27 @@ static void __pyx_f_9pywrapfst_11ArcIterator_seek(struct __pyx_obj_9pywrapfst_Ar __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3065, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3074 + /* "pywrapfst.pyx":3075 * a: The position to seek to. * """ * self._aiter.get().Seek(a) # <<<<<<<<<<<<<< @@ -32105,11 +32052,11 @@ static void __pyx_f_9pywrapfst_11ArcIterator_seek(struct __pyx_obj_9pywrapfst_Ar */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3074, __pyx_L1_error) + __PYX_ERR(0, 3075, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Seek(__pyx_v_a); - /* "pywrapfst.pyx":3065 + /* "pywrapfst.pyx":3066 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -32139,7 +32086,7 @@ static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_19seek(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("seek (wrapper)", 0); assert(__pyx_arg_a); { - __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3065, __pyx_L3_error) + __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3066, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32160,7 +32107,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_18seek(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("seek", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32177,7 +32124,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_18seek(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":3076 +/* "pywrapfst.pyx":3077 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<< @@ -32201,18 +32148,17 @@ static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapf if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_21set_flags)) { - __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -32230,7 +32176,7 @@ static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapf #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -32240,7 +32186,7 @@ static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapf #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -32248,7 +32194,7 @@ static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapf } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -32259,7 +32205,7 @@ static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapf PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -32268,20 +32214,20 @@ static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapf __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3086 + /* "pywrapfst.pyx":3087 * mask: A mask to be applied to the `flags` argument before setting them. * """ * self._aiter.get().SetFlags(flags, mask) # <<<<<<<<<<<<<< @@ -32290,11 +32236,11 @@ static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3086, __pyx_L1_error) + __PYX_ERR(0, 3087, __pyx_L1_error) } __pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask); - /* "pywrapfst.pyx":3076 + /* "pywrapfst.pyx":3077 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<< @@ -32349,11 +32295,11 @@ static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_21set_flags(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3076, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3077, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3076, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3077, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -32361,12 +32307,12 @@ static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_21set_flags(PyObject *__pyx_v values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_flags = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3076, __pyx_L3_error) - __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3076, __pyx_L3_error) + __pyx_v_flags = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3077, __pyx_L3_error) + __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3077, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3076, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3077, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -32385,7 +32331,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_20set_flags(struct __pyx_obj_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_flags", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32402,7 +32348,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_20set_flags(struct __pyx_obj_ return __pyx_r; } -/* "pywrapfst.pyx":3088 +/* "pywrapfst.pyx":3089 * self._aiter.get().SetFlags(flags, mask) * * cpdef object value(self): # <<<<<<<<<<<<<< @@ -32423,13 +32369,12 @@ static PyObject *__pyx_f_9pywrapfst_11ArcIterator_value(struct __pyx_obj_9pywrap if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3088, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_23value)) { __Pyx_XDECREF(__pyx_r); @@ -32446,7 +32391,7 @@ static PyObject *__pyx_f_9pywrapfst_11ArcIterator_value(struct __pyx_obj_9pywrap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3088, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -32454,20 +32399,20 @@ static PyObject *__pyx_f_9pywrapfst_11ArcIterator_value(struct __pyx_obj_9pywrap __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3094 + /* "pywrapfst.pyx":3095 * Returns the current arc. * """ * return _init_Arc(self._aiter.get().Value()) # <<<<<<<<<<<<<< @@ -32477,15 +32422,15 @@ static PyObject *__pyx_f_9pywrapfst_11ArcIterator_value(struct __pyx_obj_9pywrap __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3094, __pyx_L1_error) + __PYX_ERR(0, 3095, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3094, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3088 + /* "pywrapfst.pyx":3089 * self._aiter.get().SetFlags(flags, mask) * * cpdef object value(self): # <<<<<<<<<<<<<< @@ -32527,7 +32472,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_22value(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("value", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_11ArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3088, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_11ArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32651,7 +32596,7 @@ static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_26__setstate_cython__(CYTHON_ return __pyx_r; } -/* "pywrapfst.pyx":3106 +/* "pywrapfst.pyx":3107 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -32681,7 +32626,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator___repr__(struct __pyx_ PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":3107 + /* "pywrapfst.pyx":3108 * * def __repr__(self): * return "".format(id(self)) # <<<<<<<<<<<<<< @@ -32689,9 +32634,9 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator___repr__(struct __pyx_ * def __init__(self, _MutableFst ifst, int64 state): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_MutableArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3107, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_MutableArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3107, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -32706,14 +32651,14 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator___repr__(struct __pyx_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3107, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3106 + /* "pywrapfst.pyx":3107 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -32735,7 +32680,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator___repr__(struct __pyx_ return __pyx_r; } -/* "pywrapfst.pyx":3109 +/* "pywrapfst.pyx":3110 * return "".format(id(self)) * * def __init__(self, _MutableFst ifst, int64 state): # <<<<<<<<<<<<<< @@ -32774,11 +32719,11 @@ static int __pyx_pw_9pywrapfst_18MutableArcIterator_3__init__(PyObject *__pyx_v_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3109, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3110, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3109, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3110, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -32787,17 +32732,17 @@ static int __pyx_pw_9pywrapfst_18MutableArcIterator_3__init__(PyObject *__pyx_v_ values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__MutableFst *)values[0]); - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3109, __pyx_L3_error) + __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3110, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3109, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3110, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.MutableArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__MutableFst, 1, "ifst", 0))) __PYX_ERR(0, 3109, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__MutableFst, 1, "ifst", 0))) __PYX_ERR(0, 3110, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state); /* function exit code */ @@ -32819,7 +32764,7 @@ static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9 std::shared_ptr __pyx_t_5; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":3110 + /* "pywrapfst.pyx":3111 * * def __init__(self, _MutableFst ifst, int64 state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -32828,19 +32773,19 @@ static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3110, __pyx_L1_error) + __PYX_ERR(0, 3111, __pyx_L1_error) } __pyx_t_1 = ((!(__pyx_v_ifst->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":3111 + /* "pywrapfst.pyx":3112 * def __init__(self, _MutableFst ifst, int64 state): * if not ifst._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._mfst = ifst._mfst */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3111, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -32854,14 +32799,14 @@ static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3111, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 3111, __pyx_L1_error) + __PYX_ERR(0, 3112, __pyx_L1_error) - /* "pywrapfst.pyx":3110 + /* "pywrapfst.pyx":3111 * * def __init__(self, _MutableFst ifst, int64 state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -32870,7 +32815,7 @@ static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9 */ } - /* "pywrapfst.pyx":3113 + /* "pywrapfst.pyx":3114 * raise FstIndexError("State index out of range") * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._mfst = ifst._mfst # <<<<<<<<<<<<<< @@ -32879,16 +32824,16 @@ static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 3113, __pyx_L1_error) + __PYX_ERR(0, 3114, __pyx_L1_error) } __pyx_t_5 = __pyx_v_ifst->_mfst; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 3113, __pyx_L1_error) + __PYX_ERR(0, 3114, __pyx_L1_error) } __pyx_v_self->_mfst = __pyx_t_5; - /* "pywrapfst.pyx":3114 + /* "pywrapfst.pyx":3115 * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._mfst = ifst._mfst * self._aiter.reset(new fst.MutableArcIteratorClass(ifst._mfst.get(), state)) # <<<<<<<<<<<<<< @@ -32897,15 +32842,15 @@ static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3114, __pyx_L1_error) + __PYX_ERR(0, 3115, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 3114, __pyx_L1_error) + __PYX_ERR(0, 3115, __pyx_L1_error) } __pyx_v_self->_aiter.reset(new fst::script::MutableArcIteratorClass(__pyx_v_ifst->_mfst.get(), __pyx_v_state)); - /* "pywrapfst.pyx":3109 + /* "pywrapfst.pyx":3110 * return "".format(id(self)) * * def __init__(self, _MutableFst ifst, int64 state): # <<<<<<<<<<<<<< @@ -32928,7 +32873,7 @@ static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9 } static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "pywrapfst.pyx":3117 +/* "pywrapfst.pyx":3118 * * # Magic method used to get a Pythonic Iterator API out of the C++ API * def __iter__(self): # <<<<<<<<<<<<<< @@ -32958,7 +32903,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_4__iter__(struct __pyx if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 3117, __pyx_L1_error) + __PYX_ERR(0, 3118, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -32966,7 +32911,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_4__iter__(struct __pyx __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pywrapfst_18MutableArcIterator_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MutableArcIterator___iter, __pyx_n_s_pywrapfst_2); if (unlikely(!gen)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pywrapfst_18MutableArcIterator_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MutableArcIterator___iter, __pyx_n_s_pywrapfst_2); if (unlikely(!gen)) __PYX_ERR(0, 3118, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -32998,9 +32943,9 @@ static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_Corou return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3117, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3118, __pyx_L1_error) - /* "pywrapfst.pyx":3118 + /* "pywrapfst.pyx":3119 * # Magic method used to get a Pythonic Iterator API out of the C++ API * def __iter__(self): * while not self.done(): # <<<<<<<<<<<<<< @@ -33010,12 +32955,12 @@ static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_Corou while (1) { if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 3118, __pyx_L1_error) + __PYX_ERR(0, 3119, __pyx_L1_error) } __pyx_t_1 = ((!(((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->done(__pyx_cur_scope->__pyx_v_self, 0) != 0)) != 0); if (!__pyx_t_1) break; - /* "pywrapfst.pyx":3119 + /* "pywrapfst.pyx":3120 * def __iter__(self): * while not self.done(): * yield self.value() # <<<<<<<<<<<<<< @@ -33024,9 +32969,9 @@ static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_Corou */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value"); - __PYX_ERR(0, 3119, __pyx_L1_error) + __PYX_ERR(0, 3120, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->value(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3119, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->value(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -33037,9 +32982,9 @@ static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_Corou __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3119, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3120, __pyx_L1_error) - /* "pywrapfst.pyx":3120 + /* "pywrapfst.pyx":3121 * while not self.done(): * yield self.value() * self.next() # <<<<<<<<<<<<<< @@ -33048,13 +32993,13 @@ static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_Corou */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 3120, __pyx_L1_error) + __PYX_ERR(0, 3121, __pyx_L1_error) } ((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->next(__pyx_cur_scope->__pyx_v_self, 0); } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "pywrapfst.pyx":3117 + /* "pywrapfst.pyx":3118 * * # Magic method used to get a Pythonic Iterator API out of the C++ API * def __iter__(self): # <<<<<<<<<<<<<< @@ -33079,7 +33024,7 @@ static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_Corou return __pyx_r; } -/* "pywrapfst.pyx":3122 +/* "pywrapfst.pyx":3123 * self.next() * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -33101,13 +33046,12 @@ static bool __pyx_f_9pywrapfst_18MutableArcIterator_done(struct __pyx_obj_9pywra if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3122, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_8done)) { __Pyx_INCREF(__pyx_t_1); @@ -33123,29 +33067,29 @@ static bool __pyx_f_9pywrapfst_18MutableArcIterator_done(struct __pyx_obj_9pywra } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3122, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3131 + /* "pywrapfst.pyx":3132 * True if the iterator is exhausted, False otherwise. * """ * return self._aiter.get().Done() # <<<<<<<<<<<<<< @@ -33154,12 +33098,12 @@ static bool __pyx_f_9pywrapfst_18MutableArcIterator_done(struct __pyx_obj_9pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3131, __pyx_L1_error) + __PYX_ERR(0, 3132, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Done(); goto __pyx_L0; - /* "pywrapfst.pyx":3122 + /* "pywrapfst.pyx":3123 * self.next() * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -33200,7 +33144,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_7done(struct __pyx_obj PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("done", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_18MutableArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3122, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_18MutableArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33217,7 +33161,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_7done(struct __pyx_obj return __pyx_r; } -/* "pywrapfst.pyx":3133 +/* "pywrapfst.pyx":3134 * return self._aiter.get().Done() * * cpdef uint32 flags(self): # <<<<<<<<<<<<<< @@ -33239,13 +33183,12 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_18MutableArcIterator_flags if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_10flags)) { __Pyx_INCREF(__pyx_t_1); @@ -33261,29 +33204,29 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_18MutableArcIterator_flags } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3133, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3142 + /* "pywrapfst.pyx":3143 * The current iterator behavioral flags as an integer. * """ * return self._aiter.get().Flags() # <<<<<<<<<<<<<< @@ -33292,12 +33235,12 @@ static __pyx_t_10basictypes_uint32 __pyx_f_9pywrapfst_18MutableArcIterator_flags */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3142, __pyx_L1_error) + __PYX_ERR(0, 3143, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Flags(); goto __pyx_L0; - /* "pywrapfst.pyx":3133 + /* "pywrapfst.pyx":3134 * return self._aiter.get().Done() * * cpdef uint32 flags(self): # <<<<<<<<<<<<<< @@ -33338,7 +33281,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_9flags(struct __pyx_ob PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("flags", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_18MutableArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_18MutableArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33355,7 +33298,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_9flags(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":3144 +/* "pywrapfst.pyx":3145 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -33375,13 +33318,12 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_next(struct __pyx_obj_9pywra if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3144, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_12next)) { __Pyx_INCREF(__pyx_t_1); @@ -33397,27 +33339,27 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_next(struct __pyx_obj_9pywra } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3144, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3150 + /* "pywrapfst.pyx":3151 * Advances the iterator. * """ * self._aiter.get().Next() # <<<<<<<<<<<<<< @@ -33426,11 +33368,11 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_next(struct __pyx_obj_9pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3150, __pyx_L1_error) + __PYX_ERR(0, 3151, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Next(); - /* "pywrapfst.pyx":3144 + /* "pywrapfst.pyx":3145 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -33470,7 +33412,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_11next(struct __pyx_ob PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("next", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3144, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33487,7 +33429,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_11next(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":3152 +/* "pywrapfst.pyx":3153 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -33509,13 +33451,12 @@ static size_t __pyx_f_9pywrapfst_18MutableArcIterator_position(struct __pyx_obj_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3152, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_14position)) { __Pyx_INCREF(__pyx_t_1); @@ -33531,29 +33472,29 @@ static size_t __pyx_f_9pywrapfst_18MutableArcIterator_position(struct __pyx_obj_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3152, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3152, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3161 + /* "pywrapfst.pyx":3162 * The iterator's position, expressed as an integer. * """ * return self._aiter.get().Position() # <<<<<<<<<<<<<< @@ -33562,12 +33503,12 @@ static size_t __pyx_f_9pywrapfst_18MutableArcIterator_position(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3161, __pyx_L1_error) + __PYX_ERR(0, 3162, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Position(); goto __pyx_L0; - /* "pywrapfst.pyx":3152 + /* "pywrapfst.pyx":3153 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -33608,7 +33549,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_13position(struct __py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("position", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_18MutableArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3152, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_18MutableArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33625,7 +33566,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_13position(struct __py return __pyx_r; } -/* "pywrapfst.pyx":3163 +/* "pywrapfst.pyx":3164 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -33645,13 +33586,12 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_reset(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_16reset)) { __Pyx_INCREF(__pyx_t_1); @@ -33667,27 +33607,27 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_reset(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3163, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3169 + /* "pywrapfst.pyx":3170 * Resets the iterator to the initial position. * """ * self._aiter.get().Reset() # <<<<<<<<<<<<<< @@ -33696,11 +33636,11 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_reset(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3169, __pyx_L1_error) + __PYX_ERR(0, 3170, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Reset(); - /* "pywrapfst.pyx":3163 + /* "pywrapfst.pyx":3164 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -33740,7 +33680,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_15reset(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reset", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33757,7 +33697,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_15reset(struct __pyx_o return __pyx_r; } -/* "pywrapfst.pyx":3171 +/* "pywrapfst.pyx":3172 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -33778,16 +33718,15 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_seek(struct __pyx_obj_9pywra if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3171, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_18seek)) { - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -33803,27 +33742,27 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_seek(struct __pyx_obj_9pywra __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3171, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3180 + /* "pywrapfst.pyx":3181 * a: The position to seek to. * """ * self._aiter.get().Seek(a) # <<<<<<<<<<<<<< @@ -33832,11 +33771,11 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_seek(struct __pyx_obj_9pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3180, __pyx_L1_error) + __PYX_ERR(0, 3181, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Seek(__pyx_v_a); - /* "pywrapfst.pyx":3171 + /* "pywrapfst.pyx":3172 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -33866,7 +33805,7 @@ static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_18seek(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("seek (wrapper)", 0); assert(__pyx_arg_a); { - __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3171, __pyx_L3_error) + __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3172, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33887,7 +33826,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_17seek(struct __pyx_ob PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("seek", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3171, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33904,7 +33843,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_17seek(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":3182 +/* "pywrapfst.pyx":3183 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<< @@ -33928,18 +33867,17 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9 if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags)) { - __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -33957,7 +33895,7 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -33967,7 +33905,7 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -33975,7 +33913,7 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9 } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -33986,7 +33924,7 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -33995,20 +33933,20 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3192 + /* "pywrapfst.pyx":3193 * mask: A mask to be applied to the `flags` argument before setting them. * """ * self._aiter.get().SetFlags(flags, mask) # <<<<<<<<<<<<<< @@ -34017,11 +33955,11 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3192, __pyx_L1_error) + __PYX_ERR(0, 3193, __pyx_L1_error) } __pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask); - /* "pywrapfst.pyx":3182 + /* "pywrapfst.pyx":3183 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<< @@ -34076,11 +34014,11 @@ static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3182, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3183, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3182, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3183, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -34088,12 +34026,12 @@ static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags(PyObject * values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_flags = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3182, __pyx_L3_error) - __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3182, __pyx_L3_error) + __pyx_v_flags = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3183, __pyx_L3_error) + __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3183, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3182, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3183, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -34112,7 +34050,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_19set_flags(struct __p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_flags", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -34129,7 +34067,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_19set_flags(struct __p return __pyx_r; } -/* "pywrapfst.pyx":3194 +/* "pywrapfst.pyx":3195 * self._aiter.get().SetFlags(flags, mask) * * cpdef void set_value(self, Arc arc): # <<<<<<<<<<<<<< @@ -34149,13 +34087,12 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_value(struct __pyx_obj_9 if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_22set_value)) { __Pyx_INCREF(__pyx_t_1); @@ -34171,27 +34108,27 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_value(struct __pyx_obj_9 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_arc)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_arc)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3194, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3203 + /* "pywrapfst.pyx":3204 * arc: The arc to replace the current arc with. * """ * self._aiter.get().SetValue(deref(arc._arc)) # <<<<<<<<<<<<<< @@ -34200,15 +34137,15 @@ static void __pyx_f_9pywrapfst_18MutableArcIterator_set_value(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3203, __pyx_L1_error) + __PYX_ERR(0, 3204, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3203, __pyx_L1_error) + __PYX_ERR(0, 3204, __pyx_L1_error) } __pyx_v_self->_aiter.get()->SetValue((*__pyx_v_arc->_arc)); - /* "pywrapfst.pyx":3194 + /* "pywrapfst.pyx":3195 * self._aiter.get().SetFlags(flags, mask) * * cpdef void set_value(self, Arc arc): # <<<<<<<<<<<<<< @@ -34235,7 +34172,7 @@ static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_22set_value(PyObject * PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_value (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 3194, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 3195, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_21set_value(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_v_arc)); /* function exit code */ @@ -34253,7 +34190,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_21set_value(struct __p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_value", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_set_value(__pyx_v_self, __pyx_v_arc, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3194, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_set_value(__pyx_v_self, __pyx_v_arc, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -34270,7 +34207,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_21set_value(struct __p return __pyx_r; } -/* "pywrapfst.pyx":3205 +/* "pywrapfst.pyx":3206 * self._aiter.get().SetValue(deref(arc._arc)) * * cpdef object value(self): # <<<<<<<<<<<<<< @@ -34291,13 +34228,12 @@ static PyObject *__pyx_f_9pywrapfst_18MutableArcIterator_value(struct __pyx_obj_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_24value)) { __Pyx_XDECREF(__pyx_r); @@ -34314,7 +34250,7 @@ static PyObject *__pyx_f_9pywrapfst_18MutableArcIterator_value(struct __pyx_obj_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3205, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -34322,20 +34258,20 @@ static PyObject *__pyx_f_9pywrapfst_18MutableArcIterator_value(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3211 + /* "pywrapfst.pyx":3212 * Returns the current arc. * """ * return _init_Arc(self._aiter.get().Value()) # <<<<<<<<<<<<<< @@ -34345,15 +34281,15 @@ static PyObject *__pyx_f_9pywrapfst_18MutableArcIterator_value(struct __pyx_obj_ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3211, __pyx_L1_error) + __PYX_ERR(0, 3212, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3205 + /* "pywrapfst.pyx":3206 * self._aiter.get().SetValue(deref(arc._arc)) * * cpdef object value(self): # <<<<<<<<<<<<<< @@ -34395,7 +34331,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_23value(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("value", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_18MutableArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_18MutableArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -34519,7 +34455,7 @@ static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_27__setstate_cython__( return __pyx_r; } -/* "pywrapfst.pyx":3225 +/* "pywrapfst.pyx":3226 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -34549,7 +34485,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator___repr__(struct __pyx_obj_9 PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":3226 + /* "pywrapfst.pyx":3227 * * def __repr__(self): * return "".format(id(self)) # <<<<<<<<<<<<<< @@ -34557,9 +34493,9 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator___repr__(struct __pyx_obj_9 * def __init__(self, _Fst ifst): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_StateIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3226, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_StateIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3226, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -34574,14 +34510,14 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator___repr__(struct __pyx_obj_9 __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3226, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3225 + /* "pywrapfst.pyx":3226 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -34603,7 +34539,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator___repr__(struct __pyx_obj_9 return __pyx_r; } -/* "pywrapfst.pyx":3228 +/* "pywrapfst.pyx":3229 * return "".format(id(self)) * * def __init__(self, _Fst ifst): # <<<<<<<<<<<<<< @@ -34637,7 +34573,7 @@ static int __pyx_pw_9pywrapfst_13StateIterator_3__init__(PyObject *__pyx_v_self, else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3228, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3229, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -34648,13 +34584,13 @@ static int __pyx_pw_9pywrapfst_13StateIterator_3__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3228, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3229, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.StateIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3228, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3229, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_2__init__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self), __pyx_v_ifst); /* function exit code */ @@ -34672,7 +34608,7 @@ static int __pyx_pf_9pywrapfst_13StateIterator_2__init__(struct __pyx_obj_9pywra std::shared_ptr __pyx_t_1; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":3230 + /* "pywrapfst.pyx":3231 * def __init__(self, _Fst ifst): * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst # <<<<<<<<<<<<<< @@ -34681,16 +34617,16 @@ static int __pyx_pf_9pywrapfst_13StateIterator_2__init__(struct __pyx_obj_9pywra */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3230, __pyx_L1_error) + __PYX_ERR(0, 3231, __pyx_L1_error) } __pyx_t_1 = __pyx_v_ifst->_fst; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3230, __pyx_L1_error) + __PYX_ERR(0, 3231, __pyx_L1_error) } __pyx_v_self->_fst = __pyx_t_1; - /* "pywrapfst.pyx":3231 + /* "pywrapfst.pyx":3232 * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst * self._siter.reset(new fst.StateIteratorClass(deref(self._fst))) # <<<<<<<<<<<<<< @@ -34699,15 +34635,15 @@ static int __pyx_pf_9pywrapfst_13StateIterator_2__init__(struct __pyx_obj_9pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3231, __pyx_L1_error) + __PYX_ERR(0, 3232, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3231, __pyx_L1_error) + __PYX_ERR(0, 3232, __pyx_L1_error) } __pyx_v_self->_siter.reset(new fst::script::StateIteratorClass((*__pyx_v_self->_fst))); - /* "pywrapfst.pyx":3228 + /* "pywrapfst.pyx":3229 * return "".format(id(self)) * * def __init__(self, _Fst ifst): # <<<<<<<<<<<<<< @@ -34726,7 +34662,7 @@ static int __pyx_pf_9pywrapfst_13StateIterator_2__init__(struct __pyx_obj_9pywra return __pyx_r; } -/* "pywrapfst.pyx":3234 +/* "pywrapfst.pyx":3235 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -34752,7 +34688,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_4__iter__(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "pywrapfst.pyx":3235 + /* "pywrapfst.pyx":3236 * # This just registers this class as a possible iterator. * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -34764,7 +34700,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_4__iter__(struct __pyx_obj_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pywrapfst.pyx":3234 + /* "pywrapfst.pyx":3235 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -34779,7 +34715,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_4__iter__(struct __pyx_obj_ return __pyx_r; } -/* "pywrapfst.pyx":3238 +/* "pywrapfst.pyx":3239 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -34808,7 +34744,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - /* "pywrapfst.pyx":3239 + /* "pywrapfst.pyx":3240 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -34817,12 +34753,12 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 3239, __pyx_L1_error) + __PYX_ERR(0, 3240, __pyx_L1_error) } __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pywrapfst.pyx":3240 + /* "pywrapfst.pyx":3241 * def __next__(self): * if self.done(): * raise StopIteration # <<<<<<<<<<<<<< @@ -34830,9 +34766,9 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ * self.next() */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 3240, __pyx_L1_error) + __PYX_ERR(0, 3241, __pyx_L1_error) - /* "pywrapfst.pyx":3239 + /* "pywrapfst.pyx":3240 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -34841,7 +34777,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ */ } - /* "pywrapfst.pyx":3241 + /* "pywrapfst.pyx":3242 * if self.done(): * raise StopIteration * cdef int64 result = self.value() # <<<<<<<<<<<<<< @@ -34850,11 +34786,11 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value"); - __PYX_ERR(0, 3241, __pyx_L1_error) + __PYX_ERR(0, 3242, __pyx_L1_error) } __pyx_v_result = ((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0); - /* "pywrapfst.pyx":3242 + /* "pywrapfst.pyx":3243 * raise StopIteration * cdef int64 result = self.value() * self.next() # <<<<<<<<<<<<<< @@ -34863,11 +34799,11 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 3242, __pyx_L1_error) + __PYX_ERR(0, 3243, __pyx_L1_error) } ((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); - /* "pywrapfst.pyx":3243 + /* "pywrapfst.pyx":3244 * cdef int64 result = self.value() * self.next() * return result # <<<<<<<<<<<<<< @@ -34875,13 +34811,13 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ * cpdef bool done(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3243, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3238 + /* "pywrapfst.pyx":3239 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -34900,7 +34836,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_ return __pyx_r; } -/* "pywrapfst.pyx":3245 +/* "pywrapfst.pyx":3246 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -34922,13 +34858,12 @@ static bool __pyx_f_9pywrapfst_13StateIterator_done(struct __pyx_obj_9pywrapfst_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3245, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_9done)) { __Pyx_INCREF(__pyx_t_1); @@ -34944,29 +34879,29 @@ static bool __pyx_f_9pywrapfst_13StateIterator_done(struct __pyx_obj_9pywrapfst_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3245, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3245, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3254 + /* "pywrapfst.pyx":3255 * True if the iterator is exhausted, False otherwise. * """ * return self._siter.get().Done() # <<<<<<<<<<<<<< @@ -34975,12 +34910,12 @@ static bool __pyx_f_9pywrapfst_13StateIterator_done(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3254, __pyx_L1_error) + __PYX_ERR(0, 3255, __pyx_L1_error) } __pyx_r = __pyx_v_self->_siter.get()->Done(); goto __pyx_L0; - /* "pywrapfst.pyx":3245 + /* "pywrapfst.pyx":3246 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -35021,7 +34956,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_8done(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("done", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_13StateIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3245, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_13StateIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35038,7 +34973,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_8done(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":3256 +/* "pywrapfst.pyx":3257 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -35058,13 +34993,12 @@ static void __pyx_f_9pywrapfst_13StateIterator_next(struct __pyx_obj_9pywrapfst_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3256, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_11next)) { __Pyx_INCREF(__pyx_t_1); @@ -35080,27 +35014,27 @@ static void __pyx_f_9pywrapfst_13StateIterator_next(struct __pyx_obj_9pywrapfst_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3256, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3262 + /* "pywrapfst.pyx":3263 * Advances the iterator. * """ * self._siter.get().Next() # <<<<<<<<<<<<<< @@ -35109,11 +35043,11 @@ static void __pyx_f_9pywrapfst_13StateIterator_next(struct __pyx_obj_9pywrapfst_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3262, __pyx_L1_error) + __PYX_ERR(0, 3263, __pyx_L1_error) } __pyx_v_self->_siter.get()->Next(); - /* "pywrapfst.pyx":3256 + /* "pywrapfst.pyx":3257 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -35153,7 +35087,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_10next(struct __pyx_obj_9py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("next", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3256, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35170,7 +35104,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_10next(struct __pyx_obj_9py return __pyx_r; } -/* "pywrapfst.pyx":3264 +/* "pywrapfst.pyx":3265 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -35190,13 +35124,12 @@ static void __pyx_f_9pywrapfst_13StateIterator_reset(struct __pyx_obj_9pywrapfst if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3264, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_13reset)) { __Pyx_INCREF(__pyx_t_1); @@ -35212,27 +35145,27 @@ static void __pyx_f_9pywrapfst_13StateIterator_reset(struct __pyx_obj_9pywrapfst } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3264, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3270 + /* "pywrapfst.pyx":3271 * Resets the iterator to the initial position. * """ * self._siter.get().Reset() # <<<<<<<<<<<<<< @@ -35241,11 +35174,11 @@ static void __pyx_f_9pywrapfst_13StateIterator_reset(struct __pyx_obj_9pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3270, __pyx_L1_error) + __PYX_ERR(0, 3271, __pyx_L1_error) } __pyx_v_self->_siter.get()->Reset(); - /* "pywrapfst.pyx":3264 + /* "pywrapfst.pyx":3265 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -35285,7 +35218,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_12reset(struct __pyx_obj_9p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reset", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3264, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35302,7 +35235,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_12reset(struct __pyx_obj_9p return __pyx_r; } -/* "pywrapfst.pyx":3272 +/* "pywrapfst.pyx":3273 * self._siter.get().Reset() * * cpdef int64 value(self): # <<<<<<<<<<<<<< @@ -35324,13 +35257,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_13StateIterator_value(struc if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_15value)) { __Pyx_INCREF(__pyx_t_1); @@ -35346,29 +35278,29 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_13StateIterator_value(struc } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3272, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":3278 + /* "pywrapfst.pyx":3279 * Returns the current state index. * """ * return self._siter.get().Value() # <<<<<<<<<<<<<< @@ -35377,12 +35309,12 @@ static __pyx_t_10basictypes_int64 __pyx_f_9pywrapfst_13StateIterator_value(struc */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3278, __pyx_L1_error) + __PYX_ERR(0, 3279, __pyx_L1_error) } __pyx_r = __pyx_v_self->_siter.get()->Value(); goto __pyx_L0; - /* "pywrapfst.pyx":3272 + /* "pywrapfst.pyx":3273 * self._siter.get().Reset() * * cpdef int64 value(self): # <<<<<<<<<<<<<< @@ -35423,7 +35355,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_14value(struct __pyx_obj_9p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("value", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_13StateIterator_value(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_13StateIterator_value(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35547,7 +35479,7 @@ static PyObject *__pyx_pf_9pywrapfst_13StateIterator_18__setstate_cython__(CYTHO return __pyx_r; } -/* "pywrapfst.pyx":3284 +/* "pywrapfst.pyx":3285 * * * cdef _Fst _map(_Fst ifst, # <<<<<<<<<<<<<< @@ -35560,7 +35492,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob PyObject *__pyx_v_map_type = ((PyObject *)__pyx_n_b_identity); double __pyx_v_power = ((double)1.); - /* "pywrapfst.pyx":3288 + /* "pywrapfst.pyx":3289 * map_type=b"identity", * double power=1., * weight=None): # <<<<<<<<<<<<<< @@ -35597,27 +35529,27 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob } } - /* "pywrapfst.pyx":3290 + /* "pywrapfst.pyx":3291 * weight=None): * cdef fst.MapType map_type_enum * if not fst.GetMapType(tostring(map_type), addr(map_type_enum)): # <<<<<<<<<<<<<< * raise FstArgError("Unknown map type: {!r}".format(map_type)) * cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(), */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_map_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3290, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_map_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3291, __pyx_L1_error) __pyx_t_2 = ((!(fst::script::GetMapType(__pyx_t_1, (&__pyx_v_map_type_enum)) != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":3291 + /* "pywrapfst.pyx":3292 * cdef fst.MapType map_type_enum * if not fst.GetMapType(tostring(map_type), addr(map_type_enum)): * raise FstArgError("Unknown map type: {!r}".format(map_type)) # <<<<<<<<<<<<<< * cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(), * weight) if map_type_enum == fst.TIMES_MAPPER else */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3291, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_map_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3291, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_map_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -35631,7 +35563,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_map_type) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_map_type); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3291, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -35647,14 +35579,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3291, __pyx_L1_error) + __PYX_ERR(0, 3292, __pyx_L1_error) - /* "pywrapfst.pyx":3290 + /* "pywrapfst.pyx":3291 * weight=None): * cdef fst.MapType map_type_enum * if not fst.GetMapType(tostring(map_type), addr(map_type_enum)): # <<<<<<<<<<<<<< @@ -35663,7 +35595,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob */ } - /* "pywrapfst.pyx":3293 + /* "pywrapfst.pyx":3294 * raise FstArgError("Unknown map type: {!r}".format(map_type)) * cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(), * weight) if map_type_enum == fst.TIMES_MAPPER else # <<<<<<<<<<<<<< @@ -35672,7 +35604,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob */ if (((__pyx_v_map_type_enum == fst::script::TIMES_MAPPER) != 0)) { - /* "pywrapfst.pyx":3292 + /* "pywrapfst.pyx":3293 * if not fst.GetMapType(tostring(map_type), addr(map_type_enum)): * raise FstArgError("Unknown map type: {!r}".format(map_type)) * cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(), # <<<<<<<<<<<<<< @@ -35681,21 +35613,21 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3292, __pyx_L1_error) + __PYX_ERR(0, 3293, __pyx_L1_error) } - /* "pywrapfst.pyx":3293 + /* "pywrapfst.pyx":3294 * raise FstArgError("Unknown map type: {!r}".format(map_type)) * cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(), * weight) if map_type_enum == fst.TIMES_MAPPER else # <<<<<<<<<<<<<< * _get_WeightClass_or_Zero(ifst.weight_type(), weight)) * return _init_XFst(fst.Map(deref(ifst._fst), map_type_enum, delta, power, wc)) */ - __pyx_t_9 = __pyx_f_9pywrapfst__get_WeightClass_or_One(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3292, __pyx_L1_error) + __pyx_t_9 = __pyx_f_9pywrapfst__get_WeightClass_or_One(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3293, __pyx_L1_error) __pyx_t_8 = __pyx_t_9; } else { - /* "pywrapfst.pyx":3294 + /* "pywrapfst.pyx":3295 * cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(), * weight) if map_type_enum == fst.TIMES_MAPPER else * _get_WeightClass_or_Zero(ifst.weight_type(), weight)) # <<<<<<<<<<<<<< @@ -35704,14 +35636,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3294, __pyx_L1_error) + __PYX_ERR(0, 3295, __pyx_L1_error) } - __pyx_t_9 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3294, __pyx_L1_error) + __pyx_t_9 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3295, __pyx_L1_error) __pyx_t_8 = __pyx_t_9; } __pyx_v_wc = __pyx_t_8; - /* "pywrapfst.pyx":3295 + /* "pywrapfst.pyx":3296 * weight) if map_type_enum == fst.TIMES_MAPPER else * _get_WeightClass_or_Zero(ifst.weight_type(), weight)) * return _init_XFst(fst.Map(deref(ifst._fst), map_type_enum, delta, power, wc)) # <<<<<<<<<<<<<< @@ -35721,15 +35653,15 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3295, __pyx_L1_error) + __PYX_ERR(0, 3296, __pyx_L1_error) } - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v_map_type_enum, __pyx_v_delta, __pyx_v_power, __pyx_v_wc))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3295, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v_map_type_enum, __pyx_v_delta, __pyx_v_power, __pyx_v_wc))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3284 + /* "pywrapfst.pyx":3285 * * * cdef _Fst _map(_Fst ifst, # <<<<<<<<<<<<<< @@ -35752,7 +35684,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst__map(struct __pyx_ob return __pyx_r; } -/* "pywrapfst.pyx":3298 +/* "pywrapfst.pyx":3299 * * * cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<< @@ -35766,7 +35698,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_arcmap(struct __pyx_ PyObject *__pyx_v_map_type = ((PyObject *)__pyx_n_b_identity); double __pyx_v_power = ((double)1.); - /* "pywrapfst.pyx":3302 + /* "pywrapfst.pyx":3303 * map_type=b"identity", * double power=1., * weight=None): # <<<<<<<<<<<<<< @@ -35794,7 +35726,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_arcmap(struct __pyx_ } } - /* "pywrapfst.pyx":3345 + /* "pywrapfst.pyx":3346 * See also: `statemap`. * """ * return _map(ifst, delta, map_type, power, weight) # <<<<<<<<<<<<<< @@ -35807,13 +35739,13 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_arcmap(struct __pyx_ __pyx_t_2.map_type = __pyx_v_map_type; __pyx_t_2.power = __pyx_v_power; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3345, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3298 + /* "pywrapfst.pyx":3299 * * * cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<< @@ -35849,7 +35781,7 @@ static PyObject *__pyx_pw_9pywrapfst_19arcmap(PyObject *__pyx_self, PyObject *__ PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)__pyx_n_b_identity); - /* "pywrapfst.pyx":3302 + /* "pywrapfst.pyx":3303 * map_type=b"identity", * double power=1., * weight=None): # <<<<<<<<<<<<<< @@ -35905,7 +35837,7 @@ static PyObject *__pyx_pw_9pywrapfst_19arcmap(PyObject *__pyx_self, PyObject *__ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcmap") < 0)) __PYX_ERR(0, 3298, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcmap") < 0)) __PYX_ERR(0, 3299, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -35924,13 +35856,13 @@ static PyObject *__pyx_pw_9pywrapfst_19arcmap(PyObject *__pyx_self, PyObject *__ } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3299, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3300, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__32; } __pyx_v_map_type = values[2]; if (values[3]) { - __pyx_v_power = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_power == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3301, __pyx_L3_error) + __pyx_v_power = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_power == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3302, __pyx_L3_error) } else { __pyx_v_power = ((double)1.); } @@ -35938,16 +35870,16 @@ static PyObject *__pyx_pw_9pywrapfst_19arcmap(PyObject *__pyx_self, PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3298, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3299, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.arcmap", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3298, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3299, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_18arcmap(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_map_type, __pyx_v_power, __pyx_v_weight); - /* "pywrapfst.pyx":3298 + /* "pywrapfst.pyx":3299 * * * cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<< @@ -35976,7 +35908,7 @@ static PyObject *__pyx_pf_9pywrapfst_18arcmap(CYTHON_UNUSED PyObject *__pyx_self __pyx_t_2.map_type = __pyx_v_map_type; __pyx_t_2.power = __pyx_v_power; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_arcmap(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_arcmap(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35993,7 +35925,7 @@ static PyObject *__pyx_pf_9pywrapfst_18arcmap(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "pywrapfst.pyx":3348 +/* "pywrapfst.pyx":3349 * * * cpdef _MutableFst compose(_Fst ifst1, # <<<<<<<<<<<<<< @@ -36005,7 +35937,7 @@ static PyObject *__pyx_pw_9pywrapfst_21compose(PyObject *__pyx_self, PyObject *_ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_compose(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst1, struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_compose *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":3351 + /* "pywrapfst.pyx":3352 * _Fst ifst2, * compose_filter=b"auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -36030,7 +35962,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_compose(struc } } - /* "pywrapfst.pyx":3376 + /* "pywrapfst.pyx":3378 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<< @@ -36039,21 +35971,21 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_compose(struc */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3376, __pyx_L1_error) + __PYX_ERR(0, 3378, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0))); - /* "pywrapfst.pyx":3379 + /* "pywrapfst.pyx":3381 * cdef unique_ptr[fst.ComposeOptions] opts * opts.reset(new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<< * fst.Compose(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3379, __pyx_L1_error) - __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3379, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3381, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3381, __pyx_L1_error) - /* "pywrapfst.pyx":3378 + /* "pywrapfst.pyx":3380 * tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) * cdef unique_ptr[fst.ComposeOptions] opts * opts.reset(new fst.ComposeOptions(connect, # <<<<<<<<<<<<<< @@ -36062,7 +35994,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_compose(struc */ __pyx_v_opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2)); - /* "pywrapfst.pyx":3380 + /* "pywrapfst.pyx":3382 * opts.reset(new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) * fst.Compose(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -36071,15 +36003,15 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_compose(struc */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3380, __pyx_L1_error) + __PYX_ERR(0, 3382, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3380, __pyx_L1_error) + __PYX_ERR(0, 3382, __pyx_L1_error) } fst::script::Compose((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_tfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":3381 + /* "pywrapfst.pyx":3383 * _get_compose_filter(tostring(compose_filter)))) * fst.Compose(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -36087,13 +36019,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_compose(struc * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3381, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3348 + /* "pywrapfst.pyx":3349 * * * cpdef _MutableFst compose(_Fst ifst1, # <<<<<<<<<<<<<< @@ -36114,7 +36046,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_compose(struc /* Python wrapper */ static PyObject *__pyx_pw_9pywrapfst_21compose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9pywrapfst_20compose[] = "\n compose(ifst1, ifst2, compose_filter=\"auto\", connect=True)\n\n Constructively composes two FSTs.\n\n This operation computes the composition of two FSTs. If A transduces string\n x to y with weight a and B transduces y to z with weight b, then their\n composition transduces string x to z with weight a \\otimes b. The output\n labels of the first transducer or the input labels of the second transducer\n must be sorted (or otherwise support appropriate matchers).\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n compose_filter: A string matching a known composition filter; one of:\n \"alt_sequence\", \"auto\", \"match\", \"null\", \"sequence\", \"trivial\".\n connect: Should output be trimmed?\n\n Returns:\n An FST.\n\n See also: `arcsort`.\n "; +static char __pyx_doc_9pywrapfst_20compose[] = "\n compose(ifst1, ifst2, compose_filter=\"auto\", connect=True)\n\n Constructively composes two FSTs.\n\n This operation computes the composition of two FSTs. If A transduces string\n x to y with weight a and B transduces y to z with weight b, then their\n composition transduces string x to z with weight a \\otimes b. The output\n labels of the first transducer or the input labels of the second transducer\n must be sorted (or otherwise support appropriate matchers).\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n compose_filter: A string matching a known composition filter; one of:\n \"alt_sequence\", \"auto\", \"match\", \"no_match\", \"null\", \"sequence\",\n \"trivial\".\n connect: Should output be trimmed?\n\n Returns:\n An FST.\n\n See also: `arcsort`.\n "; static PyObject *__pyx_pw_9pywrapfst_21compose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst1 = 0; struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst2 = 0; @@ -36151,7 +36083,7 @@ static PyObject *__pyx_pw_9pywrapfst_21compose(PyObject *__pyx_self, PyObject *_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3348, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3349, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -36167,7 +36099,7 @@ static PyObject *__pyx_pw_9pywrapfst_21compose(PyObject *__pyx_self, PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose") < 0)) __PYX_ERR(0, 3348, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose") < 0)) __PYX_ERR(0, 3349, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -36185,10 +36117,10 @@ static PyObject *__pyx_pw_9pywrapfst_21compose(PyObject *__pyx_self, PyObject *_ __pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]); __pyx_v_compose_filter = values[2]; if (values[3]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3351, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3352, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3351 + /* "pywrapfst.pyx":3352 * _Fst ifst2, * compose_filter=b"auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -36200,17 +36132,17 @@ static PyObject *__pyx_pw_9pywrapfst_21compose(PyObject *__pyx_self, PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3348, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3349, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.compose", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3348, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3349, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3349, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3350, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_20compose(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect); - /* "pywrapfst.pyx":3348 + /* "pywrapfst.pyx":3349 * * * cpdef _MutableFst compose(_Fst ifst1, # <<<<<<<<<<<<<< @@ -36237,7 +36169,7 @@ static PyObject *__pyx_pf_9pywrapfst_20compose(CYTHON_UNUSED PyObject *__pyx_sel __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.connect = __pyx_v_connect; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compose(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3348, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compose(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36254,7 +36186,7 @@ static PyObject *__pyx_pf_9pywrapfst_20compose(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "pywrapfst.pyx":3384 +/* "pywrapfst.pyx":3386 * * * cpdef _Fst convert(_Fst ifst, fst_type=b""): # <<<<<<<<<<<<<< @@ -36283,17 +36215,17 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_convert(struct __pyx } } - /* "pywrapfst.pyx":3401 + /* "pywrapfst.pyx":3403 * FstOpError: Conversion failed. * """ * cdef string fst_type_string = tostring(fst_type) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.Convert(deref(ifst._fst), fst_type_string)) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3401, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3403, __pyx_L1_error) __pyx_v_fst_type_string = __pyx_t_1; - /* "pywrapfst.pyx":3403 + /* "pywrapfst.pyx":3405 * cdef string fst_type_string = tostring(fst_type) * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.Convert(deref(ifst._fst), fst_type_string)) # <<<<<<<<<<<<<< @@ -36302,11 +36234,11 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_convert(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3403, __pyx_L1_error) + __PYX_ERR(0, 3405, __pyx_L1_error) } __pyx_v_tfst.reset(fst::script::Convert((*__pyx_v_ifst->_fst), __pyx_v_fst_type_string)); - /* "pywrapfst.pyx":3405 + /* "pywrapfst.pyx":3407 * tfst.reset(fst.Convert(deref(ifst._fst), fst_type_string)) * # Script-land Convert returns a null pointer to signal failure. * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -36316,16 +36248,16 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_convert(struct __pyx __pyx_t_2 = ((__pyx_v_tfst.get() == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pywrapfst.pyx":3406 + /* "pywrapfst.pyx":3408 * # Script-land Convert returns a null pointer to signal failure. * if tfst.get() == NULL: * raise FstOpError("Conversion to {!r} failed".format(fst_type)) # <<<<<<<<<<<<<< * return _init_XFst(tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3406, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Conversion_to_r_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3406, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Conversion_to_r_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -36339,7 +36271,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_convert(struct __pyx } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_fst_type) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_fst_type); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3406, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -36355,14 +36287,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_convert(struct __pyx __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3406, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3406, __pyx_L1_error) + __PYX_ERR(0, 3408, __pyx_L1_error) - /* "pywrapfst.pyx":3405 + /* "pywrapfst.pyx":3407 * tfst.reset(fst.Convert(deref(ifst._fst), fst_type_string)) * # Script-land Convert returns a null pointer to signal failure. * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -36371,7 +36303,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_convert(struct __pyx */ } - /* "pywrapfst.pyx":3407 + /* "pywrapfst.pyx":3409 * if tfst.get() == NULL: * raise FstOpError("Conversion to {!r} failed".format(fst_type)) * return _init_XFst(tfst.release()) # <<<<<<<<<<<<<< @@ -36379,13 +36311,13 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_convert(struct __pyx * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3407, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3384 + /* "pywrapfst.pyx":3386 * * * cpdef _Fst convert(_Fst ifst, fst_type=b""): # <<<<<<<<<<<<<< @@ -36445,7 +36377,7 @@ static PyObject *__pyx_pw_9pywrapfst_23convert(PyObject *__pyx_self, PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert") < 0)) __PYX_ERR(0, 3384, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert") < 0)) __PYX_ERR(0, 3386, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -36461,13 +36393,13 @@ static PyObject *__pyx_pw_9pywrapfst_23convert(PyObject *__pyx_self, PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("convert", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3384, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("convert", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3386, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.convert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3384, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3386, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_22convert(__pyx_self, __pyx_v_ifst, __pyx_v_fst_type); /* function exit code */ @@ -36488,7 +36420,7 @@ static PyObject *__pyx_pf_9pywrapfst_22convert(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.fst_type = __pyx_v_fst_type; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_convert(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3384, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_convert(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36505,7 +36437,7 @@ static PyObject *__pyx_pf_9pywrapfst_22convert(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "pywrapfst.pyx":3410 +/* "pywrapfst.pyx":3412 * * * cpdef _MutableFst determinize(_Fst ifst, # <<<<<<<<<<<<<< @@ -36520,7 +36452,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s __pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__34; __pyx_t_10basictypes_int64 __pyx_v_subsequential_label = ((__pyx_t_10basictypes_int64)0); - /* "pywrapfst.pyx":3415 + /* "pywrapfst.pyx":3417 * int64 nstate=fst.kNoStateId, * int64 subsequential_label=0, * weight=None, # <<<<<<<<<<<<<< @@ -36529,7 +36461,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ PyObject *__pyx_v_weight = ((PyObject *)Py_None); - /* "pywrapfst.pyx":3416 + /* "pywrapfst.pyx":3418 * int64 subsequential_label=0, * weight=None, * bool increment_subsequential_label=False): # <<<<<<<<<<<<<< @@ -36573,7 +36505,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s } } - /* "pywrapfst.pyx":3452 + /* "pywrapfst.pyx":3454 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -36582,11 +36514,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3452, __pyx_L1_error) + __PYX_ERR(0, 3454, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3454 + /* "pywrapfst.pyx":3456 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * # Threshold is set to semiring Zero (no pruning) if weight unspecified. * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), # <<<<<<<<<<<<<< @@ -36595,29 +36527,29 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3454, __pyx_L1_error) + __PYX_ERR(0, 3456, __pyx_L1_error) } - /* "pywrapfst.pyx":3455 + /* "pywrapfst.pyx":3457 * # Threshold is set to semiring Zero (no pruning) if weight unspecified. * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef fst.DeterminizeType determinize_type_enum * if not fst.GetDeterminizeType(tostring(det_type), */ - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3454, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3456, __pyx_L1_error) __pyx_v_wc = __pyx_t_1; - /* "pywrapfst.pyx":3457 + /* "pywrapfst.pyx":3459 * weight) * cdef fst.DeterminizeType determinize_type_enum * if not fst.GetDeterminizeType(tostring(det_type), # <<<<<<<<<<<<<< * addr(determinize_type_enum)): * raise FstArgError("Unknown determinization type: {!r}".format(det_type)) */ - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_det_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3457, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_det_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3459, __pyx_L1_error) - /* "pywrapfst.pyx":3458 + /* "pywrapfst.pyx":3460 * cdef fst.DeterminizeType determinize_type_enum * if not fst.GetDeterminizeType(tostring(det_type), * addr(determinize_type_enum)): # <<<<<<<<<<<<<< @@ -36626,7 +36558,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ __pyx_t_3 = ((!(fst::script::GetDeterminizeType(__pyx_t_2, (&__pyx_v_determinize_type_enum)) != 0)) != 0); - /* "pywrapfst.pyx":3457 + /* "pywrapfst.pyx":3459 * weight) * cdef fst.DeterminizeType determinize_type_enum * if not fst.GetDeterminizeType(tostring(det_type), # <<<<<<<<<<<<<< @@ -36635,16 +36567,16 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ if (unlikely(__pyx_t_3)) { - /* "pywrapfst.pyx":3459 + /* "pywrapfst.pyx":3461 * if not fst.GetDeterminizeType(tostring(det_type), * addr(determinize_type_enum)): * raise FstArgError("Unknown determinization type: {!r}".format(det_type)) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.DeterminizeOptions] opts * opts.reset(new fst.DeterminizeOptions(delta, wc, nstate, subsequential_label, */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3459, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_determinization_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3459, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_determinization_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -36658,7 +36590,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_det_type) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_det_type); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3459, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -36674,14 +36606,14 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3459, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 3459, __pyx_L1_error) + __PYX_ERR(0, 3461, __pyx_L1_error) - /* "pywrapfst.pyx":3457 + /* "pywrapfst.pyx":3459 * weight) * cdef fst.DeterminizeType determinize_type_enum * if not fst.GetDeterminizeType(tostring(det_type), # <<<<<<<<<<<<<< @@ -36690,7 +36622,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ } - /* "pywrapfst.pyx":3461 + /* "pywrapfst.pyx":3463 * raise FstArgError("Unknown determinization type: {!r}".format(det_type)) * cdef unique_ptr[fst.DeterminizeOptions] opts * opts.reset(new fst.DeterminizeOptions(delta, wc, nstate, subsequential_label, # <<<<<<<<<<<<<< @@ -36699,7 +36631,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ __pyx_v_opts.reset(new fst::script::DeterminizeOptions(__pyx_v_delta, __pyx_v_wc, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_determinize_type_enum, __pyx_v_increment_subsequential_label)); - /* "pywrapfst.pyx":3464 + /* "pywrapfst.pyx":3466 * determinize_type_enum, * increment_subsequential_label)) * fst.Determinize(deref(ifst._fst), tfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -36708,11 +36640,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3464, __pyx_L1_error) + __PYX_ERR(0, 3466, __pyx_L1_error) } fst::script::Determinize((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":3465 + /* "pywrapfst.pyx":3467 * increment_subsequential_label)) * fst.Determinize(deref(ifst._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -36720,13 +36652,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_determinize(s * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3465, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3410 + /* "pywrapfst.pyx":3412 * * * cpdef _MutableFst determinize(_Fst ifst, # <<<<<<<<<<<<<< @@ -36768,7 +36700,7 @@ static PyObject *__pyx_pw_9pywrapfst_25determinize(PyObject *__pyx_self, PyObjec PyObject* values[7] = {0,0,0,0,0,0,0}; values[2] = ((PyObject *)__pyx_n_b_functional); - /* "pywrapfst.pyx":3415 + /* "pywrapfst.pyx":3417 * int64 nstate=fst.kNoStateId, * int64 subsequential_label=0, * weight=None, # <<<<<<<<<<<<<< @@ -36840,7 +36772,7 @@ static PyObject *__pyx_pw_9pywrapfst_25determinize(PyObject *__pyx_self, PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "determinize") < 0)) __PYX_ERR(0, 3410, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "determinize") < 0)) __PYX_ERR(0, 3412, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -36863,27 +36795,27 @@ static PyObject *__pyx_pw_9pywrapfst_25determinize(PyObject *__pyx_self, PyObjec } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3411, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3413, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__33; } __pyx_v_det_type = values[2]; if (values[3]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3413, __pyx_L3_error) + __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3415, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_k__34; } if (values[4]) { - __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3414, __pyx_L3_error) + __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3416, __pyx_L3_error) } else { __pyx_v_subsequential_label = ((__pyx_t_10basictypes_int64)0); } __pyx_v_weight = values[5]; if (values[6]) { - __pyx_v_increment_subsequential_label = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_increment_subsequential_label == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3416, __pyx_L3_error) + __pyx_v_increment_subsequential_label = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_increment_subsequential_label == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3418, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3416 + /* "pywrapfst.pyx":3418 * int64 subsequential_label=0, * weight=None, * bool increment_subsequential_label=False): # <<<<<<<<<<<<<< @@ -36895,16 +36827,16 @@ static PyObject *__pyx_pw_9pywrapfst_25determinize(PyObject *__pyx_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("determinize", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3410, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("determinize", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3412, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.determinize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3410, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3412, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_24determinize(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_det_type, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight, __pyx_v_increment_subsequential_label); - /* "pywrapfst.pyx":3410 + /* "pywrapfst.pyx":3412 * * * cpdef _MutableFst determinize(_Fst ifst, # <<<<<<<<<<<<<< @@ -36935,7 +36867,7 @@ static PyObject *__pyx_pf_9pywrapfst_24determinize(CYTHON_UNUSED PyObject *__pyx __pyx_t_2.subsequential_label = __pyx_v_subsequential_label; __pyx_t_2.weight = __pyx_v_weight; __pyx_t_2.increment_subsequential_label = __pyx_v_increment_subsequential_label; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_determinize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3410, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_determinize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36952,7 +36884,7 @@ static PyObject *__pyx_pf_9pywrapfst_24determinize(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "pywrapfst.pyx":3468 +/* "pywrapfst.pyx":3470 * * * cpdef _MutableFst difference(_Fst ifst1, # <<<<<<<<<<<<<< @@ -36964,7 +36896,7 @@ static PyObject *__pyx_pw_9pywrapfst_27difference(PyObject *__pyx_self, PyObject static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_difference(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst1, struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_difference *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":3471 + /* "pywrapfst.pyx":3473 * _Fst ifst2, * compose_filter=b"auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -36989,7 +36921,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_difference(st } } - /* "pywrapfst.pyx":3495 + /* "pywrapfst.pyx":3498 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<< @@ -36998,30 +36930,30 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_difference(st */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3495, __pyx_L1_error) + __PYX_ERR(0, 3498, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0))); - /* "pywrapfst.pyx":3498 + /* "pywrapfst.pyx":3501 * cdef unique_ptr[fst.ComposeOptions] opts * opts.reset(new fst.ComposeOptions(connect, _get_compose_filter( * tostring(compose_filter)))) # <<<<<<<<<<<<<< * fst.Difference(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3498, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3501, __pyx_L1_error) - /* "pywrapfst.pyx":3497 + /* "pywrapfst.pyx":3500 * tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) * cdef unique_ptr[fst.ComposeOptions] opts * opts.reset(new fst.ComposeOptions(connect, _get_compose_filter( # <<<<<<<<<<<<<< * tostring(compose_filter)))) * fst.Difference(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) */ - __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3497, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3500, __pyx_L1_error) __pyx_v_opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2)); - /* "pywrapfst.pyx":3499 + /* "pywrapfst.pyx":3502 * opts.reset(new fst.ComposeOptions(connect, _get_compose_filter( * tostring(compose_filter)))) * fst.Difference(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -37030,15 +36962,15 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_difference(st */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3499, __pyx_L1_error) + __PYX_ERR(0, 3502, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3499, __pyx_L1_error) + __PYX_ERR(0, 3502, __pyx_L1_error) } fst::script::Difference((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_tfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":3500 + /* "pywrapfst.pyx":3503 * tostring(compose_filter)))) * fst.Difference(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -37046,13 +36978,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_difference(st * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3500, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3468 + /* "pywrapfst.pyx":3470 * * * cpdef _MutableFst difference(_Fst ifst1, # <<<<<<<<<<<<<< @@ -37073,7 +37005,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_difference(st /* Python wrapper */ static PyObject *__pyx_pw_9pywrapfst_27difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9pywrapfst_26difference[] = "\n difference(ifst1, ifst2, compose_filter=\"auto\", connect=True)\n\n Constructively computes the difference of two FSTs.\n\n This operation computes the difference between two FSAs. Only strings that are\n in the first automaton but not in second are retained in the result. The first\n argument must be an acceptor; the second argument must be an unweighted,\n epsilon-free, deterministic acceptor. The output labels of the first\n transducer or the input labels of the second transducer must be sorted (or\n otherwise support appropriate matchers).\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n compose_filter: A string matching a known composition filter; one of:\n \"alt_sequence\", \"auto\", \"match\", \"null\", \"sequence\", \"trivial\".\n connect: Should the output FST be trimmed?\n\n Returns:\n An FST representing the difference of the FSTs.\n "; +static char __pyx_doc_9pywrapfst_26difference[] = "\n difference(ifst1, ifst2, compose_filter=\"auto\", connect=True)\n\n Constructively computes the difference of two FSTs.\n\n This operation computes the difference between two FSAs. Only strings that are\n in the first automaton but not in second are retained in the result. The first\n argument must be an acceptor; the second argument must be an unweighted,\n epsilon-free, deterministic acceptor. The output labels of the first\n transducer or the input labels of the second transducer must be sorted (or\n otherwise support appropriate matchers).\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n compose_filter: A string matching a known composition filter; one of:\n \"alt_sequence\", \"auto\", \"match\", \"no_match\", \"null\", \"sequence\",\n \"trivial\".\n connect: Should the output FST be trimmed?\n\n Returns:\n An FST representing the difference of the FSTs.\n "; static PyObject *__pyx_pw_9pywrapfst_27difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst1 = 0; struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst2 = 0; @@ -37110,7 +37042,7 @@ static PyObject *__pyx_pw_9pywrapfst_27difference(PyObject *__pyx_self, PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3468, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3470, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -37126,7 +37058,7 @@ static PyObject *__pyx_pw_9pywrapfst_27difference(PyObject *__pyx_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "difference") < 0)) __PYX_ERR(0, 3468, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "difference") < 0)) __PYX_ERR(0, 3470, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -37144,10 +37076,10 @@ static PyObject *__pyx_pw_9pywrapfst_27difference(PyObject *__pyx_self, PyObject __pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]); __pyx_v_compose_filter = values[2]; if (values[3]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3471, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3473, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3471 + /* "pywrapfst.pyx":3473 * _Fst ifst2, * compose_filter=b"auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -37159,17 +37091,17 @@ static PyObject *__pyx_pw_9pywrapfst_27difference(PyObject *__pyx_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3468, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3470, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.difference", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3468, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3469, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3470, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3471, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_26difference(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect); - /* "pywrapfst.pyx":3468 + /* "pywrapfst.pyx":3470 * * * cpdef _MutableFst difference(_Fst ifst1, # <<<<<<<<<<<<<< @@ -37196,7 +37128,7 @@ static PyObject *__pyx_pf_9pywrapfst_26difference(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.connect = __pyx_v_connect; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_difference(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3468, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_difference(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37213,7 +37145,7 @@ static PyObject *__pyx_pf_9pywrapfst_26difference(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "pywrapfst.pyx":3503 +/* "pywrapfst.pyx":3506 * * * cpdef _MutableFst disambiguate(_Fst ifst, # <<<<<<<<<<<<<< @@ -37227,7 +37159,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_disambiguate( __pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__36; __pyx_t_10basictypes_int64 __pyx_v_subsequential_label = ((__pyx_t_10basictypes_int64)0); - /* "pywrapfst.pyx":3507 + /* "pywrapfst.pyx":3510 * int64 nstate=fst.kNoStateId, * int64 subsequential_label=0, * weight=None): # <<<<<<<<<<<<<< @@ -37258,7 +37190,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_disambiguate( } } - /* "pywrapfst.pyx":3534 + /* "pywrapfst.pyx":3537 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -37267,11 +37199,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_disambiguate( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3534, __pyx_L1_error) + __PYX_ERR(0, 3537, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3536 + /* "pywrapfst.pyx":3539 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), # <<<<<<<<<<<<<< @@ -37280,20 +37212,20 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_disambiguate( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3536, __pyx_L1_error) + __PYX_ERR(0, 3539, __pyx_L1_error) } - /* "pywrapfst.pyx":3537 + /* "pywrapfst.pyx":3540 * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.DisambiguateOptions] opts * opts.reset(new fst.DisambiguateOptions(delta, wc, nstate, */ - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3536, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3539, __pyx_L1_error) __pyx_v_wc = __pyx_t_1; - /* "pywrapfst.pyx":3539 + /* "pywrapfst.pyx":3542 * weight) * cdef unique_ptr[fst.DisambiguateOptions] opts * opts.reset(new fst.DisambiguateOptions(delta, wc, nstate, # <<<<<<<<<<<<<< @@ -37302,7 +37234,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_disambiguate( */ __pyx_v_opts.reset(new fst::script::DisambiguateOptions(__pyx_v_delta, __pyx_v_wc, __pyx_v_nstate, __pyx_v_subsequential_label)); - /* "pywrapfst.pyx":3541 + /* "pywrapfst.pyx":3544 * opts.reset(new fst.DisambiguateOptions(delta, wc, nstate, * subsequential_label)) * fst.Disambiguate(deref(ifst._fst), tfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -37311,11 +37243,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_disambiguate( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3541, __pyx_L1_error) + __PYX_ERR(0, 3544, __pyx_L1_error) } fst::script::Disambiguate((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":3542 + /* "pywrapfst.pyx":3545 * subsequential_label)) * fst.Disambiguate(deref(ifst._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -37323,13 +37255,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_disambiguate( * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3542, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3503 + /* "pywrapfst.pyx":3506 * * * cpdef _MutableFst disambiguate(_Fst ifst, # <<<<<<<<<<<<<< @@ -37364,7 +37296,7 @@ static PyObject *__pyx_pw_9pywrapfst_29disambiguate(PyObject *__pyx_self, PyObje static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_subsequential_label,&__pyx_n_s_weight,0}; PyObject* values[5] = {0,0,0,0,0}; - /* "pywrapfst.pyx":3507 + /* "pywrapfst.pyx":3510 * int64 nstate=fst.kNoStateId, * int64 subsequential_label=0, * weight=None): # <<<<<<<<<<<<<< @@ -37420,7 +37352,7 @@ static PyObject *__pyx_pw_9pywrapfst_29disambiguate(PyObject *__pyx_self, PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "disambiguate") < 0)) __PYX_ERR(0, 3503, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "disambiguate") < 0)) __PYX_ERR(0, 3506, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -37439,17 +37371,17 @@ static PyObject *__pyx_pw_9pywrapfst_29disambiguate(PyObject *__pyx_self, PyObje } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3504, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3507, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__35; } if (values[2]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3505, __pyx_L3_error) + __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3508, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_k__36; } if (values[3]) { - __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3506, __pyx_L3_error) + __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3509, __pyx_L3_error) } else { __pyx_v_subsequential_label = ((__pyx_t_10basictypes_int64)0); } @@ -37457,16 +37389,16 @@ static PyObject *__pyx_pw_9pywrapfst_29disambiguate(PyObject *__pyx_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("disambiguate", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3503, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("disambiguate", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3506, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.disambiguate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3503, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3506, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_28disambiguate(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight); - /* "pywrapfst.pyx":3503 + /* "pywrapfst.pyx":3506 * * * cpdef _MutableFst disambiguate(_Fst ifst, # <<<<<<<<<<<<<< @@ -37495,7 +37427,7 @@ static PyObject *__pyx_pf_9pywrapfst_28disambiguate(CYTHON_UNUSED PyObject *__py __pyx_t_2.nstate = __pyx_v_nstate; __pyx_t_2.subsequential_label = __pyx_v_subsequential_label; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_disambiguate(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3503, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_disambiguate(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37512,7 +37444,7 @@ static PyObject *__pyx_pf_9pywrapfst_28disambiguate(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "pywrapfst.pyx":3545 +/* "pywrapfst.pyx":3548 * * * cpdef _MutableFst epsnormalize(_Fst ifst, bool eps_norm_output=False): # <<<<<<<<<<<<<< @@ -37535,7 +37467,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( } } - /* "pywrapfst.pyx":3568 + /* "pywrapfst.pyx":3571 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -37544,11 +37476,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3568, __pyx_L1_error) + __PYX_ERR(0, 3571, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3569 + /* "pywrapfst.pyx":3572 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.EpsNormalize(deref(ifst._fst), tfst.get(), fst.EPS_NORM_OUTPUT if # <<<<<<<<<<<<<< @@ -37557,10 +37489,10 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3569, __pyx_L1_error) + __PYX_ERR(0, 3572, __pyx_L1_error) } - /* "pywrapfst.pyx":3570 + /* "pywrapfst.pyx":3573 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.EpsNormalize(deref(ifst._fst), tfst.get(), fst.EPS_NORM_OUTPUT if * eps_norm_output else # <<<<<<<<<<<<<< @@ -37569,7 +37501,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( */ if ((__pyx_v_eps_norm_output != 0)) { - /* "pywrapfst.pyx":3569 + /* "pywrapfst.pyx":3572 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.EpsNormalize(deref(ifst._fst), tfst.get(), fst.EPS_NORM_OUTPUT if # <<<<<<<<<<<<<< @@ -37579,7 +37511,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( __pyx_t_1 = fst::EPS_NORM_OUTPUT; } else { - /* "pywrapfst.pyx":3571 + /* "pywrapfst.pyx":3574 * fst.EpsNormalize(deref(ifst._fst), tfst.get(), fst.EPS_NORM_OUTPUT if * eps_norm_output else * fst.EPS_NORM_INPUT) # <<<<<<<<<<<<<< @@ -37589,7 +37521,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( __pyx_t_1 = fst::EPS_NORM_INPUT; } - /* "pywrapfst.pyx":3569 + /* "pywrapfst.pyx":3572 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.EpsNormalize(deref(ifst._fst), tfst.get(), fst.EPS_NORM_OUTPUT if # <<<<<<<<<<<<<< @@ -37598,7 +37530,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( */ fst::script::EpsNormalize((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), __pyx_t_1); - /* "pywrapfst.pyx":3572 + /* "pywrapfst.pyx":3575 * eps_norm_output else * fst.EPS_NORM_INPUT) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -37606,13 +37538,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_epsnormalize( * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3572, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3545 + /* "pywrapfst.pyx":3548 * * * cpdef _MutableFst epsnormalize(_Fst ifst, bool eps_norm_output=False): # <<<<<<<<<<<<<< @@ -37667,7 +37599,7 @@ static PyObject *__pyx_pw_9pywrapfst_31epsnormalize(PyObject *__pyx_self, PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "epsnormalize") < 0)) __PYX_ERR(0, 3545, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "epsnormalize") < 0)) __PYX_ERR(0, 3548, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -37680,20 +37612,20 @@ static PyObject *__pyx_pw_9pywrapfst_31epsnormalize(PyObject *__pyx_self, PyObje } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_eps_norm_output = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_eps_norm_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error) + __pyx_v_eps_norm_output = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_eps_norm_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3548, __pyx_L3_error) } else { __pyx_v_eps_norm_output = ((bool)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("epsnormalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3545, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("epsnormalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3548, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.epsnormalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3545, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3548, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_30epsnormalize(__pyx_self, __pyx_v_ifst, __pyx_v_eps_norm_output); /* function exit code */ @@ -37714,7 +37646,7 @@ static PyObject *__pyx_pf_9pywrapfst_30epsnormalize(CYTHON_UNUSED PyObject *__py __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.eps_norm_output = __pyx_v_eps_norm_output; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_epsnormalize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3545, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_epsnormalize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37731,7 +37663,7 @@ static PyObject *__pyx_pf_9pywrapfst_30epsnormalize(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "pywrapfst.pyx":3575 +/* "pywrapfst.pyx":3578 * * * cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -37751,7 +37683,7 @@ static bool __pyx_f_9pywrapfst_equal(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_i } } - /* "pywrapfst.pyx":3595 + /* "pywrapfst.pyx":3598 * See also: `equivalent`, `isomorphic`, `randequivalent`. * """ * return fst.Equal(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<< @@ -37760,16 +37692,16 @@ static bool __pyx_f_9pywrapfst_equal(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_i */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3595, __pyx_L1_error) + __PYX_ERR(0, 3598, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3595, __pyx_L1_error) + __PYX_ERR(0, 3598, __pyx_L1_error) } __pyx_r = fst::script::Equal((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta); goto __pyx_L0; - /* "pywrapfst.pyx":3575 + /* "pywrapfst.pyx":3578 * * * cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -37821,7 +37753,7 @@ static PyObject *__pyx_pw_9pywrapfst_33equal(PyObject *__pyx_self, PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3575, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3578, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -37831,7 +37763,7 @@ static PyObject *__pyx_pw_9pywrapfst_33equal(PyObject *__pyx_self, PyObject *__p } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equal") < 0)) __PYX_ERR(0, 3575, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equal") < 0)) __PYX_ERR(0, 3578, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -37846,21 +37778,21 @@ static PyObject *__pyx_pw_9pywrapfst_33equal(PyObject *__pyx_self, PyObject *__p __pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]); if (values[2]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3575, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3578, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__37; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3575, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3578, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.equal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3575, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3575, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3578, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3578, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_32equal(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta); /* function exit code */ @@ -37883,7 +37815,7 @@ static PyObject *__pyx_pf_9pywrapfst_32equal(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_2.__pyx_n = 1; __pyx_t_2.delta = __pyx_v_delta; __pyx_t_1 = __pyx_f_9pywrapfst_equal(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3575, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -37900,7 +37832,7 @@ static PyObject *__pyx_pf_9pywrapfst_32equal(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "pywrapfst.pyx":3598 +/* "pywrapfst.pyx":3601 * * * cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<< @@ -37920,7 +37852,7 @@ static bool __pyx_f_9pywrapfst_equivalent(struct __pyx_obj_9pywrapfst__Fst *__py } } - /* "pywrapfst.pyx":3618 + /* "pywrapfst.pyx":3621 * See also: `equal`, `isomorphic`, `randequivalent`. * """ * return fst.Equivalent(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<< @@ -37929,16 +37861,16 @@ static bool __pyx_f_9pywrapfst_equivalent(struct __pyx_obj_9pywrapfst__Fst *__py */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3618, __pyx_L1_error) + __PYX_ERR(0, 3621, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3618, __pyx_L1_error) + __PYX_ERR(0, 3621, __pyx_L1_error) } __pyx_r = fst::script::Equivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta); goto __pyx_L0; - /* "pywrapfst.pyx":3598 + /* "pywrapfst.pyx":3601 * * * cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<< @@ -37990,7 +37922,7 @@ static PyObject *__pyx_pw_9pywrapfst_35equivalent(PyObject *__pyx_self, PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3598, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3601, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -38000,7 +37932,7 @@ static PyObject *__pyx_pw_9pywrapfst_35equivalent(PyObject *__pyx_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equivalent") < 0)) __PYX_ERR(0, 3598, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equivalent") < 0)) __PYX_ERR(0, 3601, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -38015,21 +37947,21 @@ static PyObject *__pyx_pw_9pywrapfst_35equivalent(PyObject *__pyx_self, PyObject __pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]); if (values[2]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3598, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3601, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__38; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3598, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3601, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.equivalent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3598, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3598, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3601, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3601, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_34equivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta); /* function exit code */ @@ -38051,8 +37983,8 @@ static PyObject *__pyx_pf_9pywrapfst_34equivalent(CYTHON_UNUSED PyObject *__pyx_ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.delta = __pyx_v_delta; - __pyx_t_1 = __pyx_f_9pywrapfst_equivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3598, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3598, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_equivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3601, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -38069,7 +38001,7 @@ static PyObject *__pyx_pf_9pywrapfst_34equivalent(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "pywrapfst.pyx":3621 +/* "pywrapfst.pyx":3624 * * * cpdef _MutableFst intersect(_Fst ifst1, # <<<<<<<<<<<<<< @@ -38081,7 +38013,7 @@ static PyObject *__pyx_pw_9pywrapfst_37intersect(PyObject *__pyx_self, PyObject static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_intersect(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst1, struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_intersect *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":3624 + /* "pywrapfst.pyx":3627 * _Fst ifst2, * compose_filter=b"auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -38106,7 +38038,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_intersect(str } } - /* "pywrapfst.pyx":3646 + /* "pywrapfst.pyx":3650 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<< @@ -38115,21 +38047,21 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_intersect(str */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3646, __pyx_L1_error) + __PYX_ERR(0, 3650, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0))); - /* "pywrapfst.pyx":3649 + /* "pywrapfst.pyx":3653 * cdef unique_ptr[fst.ComposeOptions] opts * opts.reset(new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<< * fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3649, __pyx_L1_error) - __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3649, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3653, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3653, __pyx_L1_error) - /* "pywrapfst.pyx":3648 + /* "pywrapfst.pyx":3652 * tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) * cdef unique_ptr[fst.ComposeOptions] opts * opts.reset(new fst.ComposeOptions(connect, # <<<<<<<<<<<<<< @@ -38138,7 +38070,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_intersect(str */ __pyx_v_opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2)); - /* "pywrapfst.pyx":3650 + /* "pywrapfst.pyx":3654 * opts.reset(new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) * fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -38147,15 +38079,15 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_intersect(str */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3650, __pyx_L1_error) + __PYX_ERR(0, 3654, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3650, __pyx_L1_error) + __PYX_ERR(0, 3654, __pyx_L1_error) } fst::script::Intersect((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_tfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":3651 + /* "pywrapfst.pyx":3655 * _get_compose_filter(tostring(compose_filter)))) * fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -38163,13 +38095,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_intersect(str * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3651, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3621 + /* "pywrapfst.pyx":3624 * * * cpdef _MutableFst intersect(_Fst ifst1, # <<<<<<<<<<<<<< @@ -38190,7 +38122,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_intersect(str /* Python wrapper */ static PyObject *__pyx_pw_9pywrapfst_37intersect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9pywrapfst_36intersect[] = "\n intersect(ifst1, ifst2, compose_filter=\"auto\", connect=True)\n\n Constructively intersects two FSTs.\n\n This operation computes the intersection (Hadamard product) of two FSTs.\n Only strings that are in both automata are retained in the result. The two\n arguments must be acceptors. One of the arguments must be label-sorted (or\n otherwise support appropriate matchers).\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n compose_filter: A string matching a known composition filter; one of:\n \"alt_sequence\", \"auto\", \"match\", \"null\", \"sequence\", \"trivial\".\n connect: Should output be trimmed?\n\n Returns:\n An intersected FST.\n "; +static char __pyx_doc_9pywrapfst_36intersect[] = "\n intersect(ifst1, ifst2, compose_filter=\"auto\", connect=True)\n\n Constructively intersects two FSTs.\n\n This operation computes the intersection (Hadamard product) of two FSTs.\n Only strings that are in both automata are retained in the result. The two\n arguments must be acceptors. One of the arguments must be label-sorted (or\n otherwise support appropriate matchers).\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n compose_filter: A string matching a known composition filter; one of:\n \"alt_sequence\", \"auto\", \"match\", \"no_match\", \"null\", \"sequence\",\n \"trivial\".\n connect: Should output be trimmed?\n\n Returns:\n An intersected FST.\n "; static PyObject *__pyx_pw_9pywrapfst_37intersect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst1 = 0; struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst2 = 0; @@ -38227,7 +38159,7 @@ static PyObject *__pyx_pw_9pywrapfst_37intersect(PyObject *__pyx_self, PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3621, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3624, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -38243,7 +38175,7 @@ static PyObject *__pyx_pw_9pywrapfst_37intersect(PyObject *__pyx_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersect") < 0)) __PYX_ERR(0, 3621, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersect") < 0)) __PYX_ERR(0, 3624, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -38261,10 +38193,10 @@ static PyObject *__pyx_pw_9pywrapfst_37intersect(PyObject *__pyx_self, PyObject __pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]); __pyx_v_compose_filter = values[2]; if (values[3]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3624, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3627, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3624 + /* "pywrapfst.pyx":3627 * _Fst ifst2, * compose_filter=b"auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -38276,17 +38208,17 @@ static PyObject *__pyx_pw_9pywrapfst_37intersect(PyObject *__pyx_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3621, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3624, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3621, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3622, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3624, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3625, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_36intersect(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect); - /* "pywrapfst.pyx":3621 + /* "pywrapfst.pyx":3624 * * * cpdef _MutableFst intersect(_Fst ifst1, # <<<<<<<<<<<<<< @@ -38313,7 +38245,7 @@ static PyObject *__pyx_pf_9pywrapfst_36intersect(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.connect = __pyx_v_connect; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_intersect(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3621, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_intersect(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -38330,7 +38262,7 @@ static PyObject *__pyx_pf_9pywrapfst_36intersect(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "pywrapfst.pyx":3654 +/* "pywrapfst.pyx":3658 * * * cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -38350,7 +38282,7 @@ static bool __pyx_f_9pywrapfst_isomorphic(struct __pyx_obj_9pywrapfst__Fst *__py } } - /* "pywrapfst.pyx":3677 + /* "pywrapfst.pyx":3681 * See also: `equal`, `equivalent`, `randequivalent`. * """ * return fst.Isomorphic(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<< @@ -38359,16 +38291,16 @@ static bool __pyx_f_9pywrapfst_isomorphic(struct __pyx_obj_9pywrapfst__Fst *__py */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3677, __pyx_L1_error) + __PYX_ERR(0, 3681, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3677, __pyx_L1_error) + __PYX_ERR(0, 3681, __pyx_L1_error) } __pyx_r = fst::script::Isomorphic((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta); goto __pyx_L0; - /* "pywrapfst.pyx":3654 + /* "pywrapfst.pyx":3658 * * * cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -38420,7 +38352,7 @@ static PyObject *__pyx_pw_9pywrapfst_39isomorphic(PyObject *__pyx_self, PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3654, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3658, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -38430,7 +38362,7 @@ static PyObject *__pyx_pw_9pywrapfst_39isomorphic(PyObject *__pyx_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3654, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3658, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -38445,21 +38377,21 @@ static PyObject *__pyx_pw_9pywrapfst_39isomorphic(PyObject *__pyx_self, PyObject __pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]); if (values[2]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__39; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3654, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3658, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.isomorphic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3654, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3654, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3658, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3658, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_38isomorphic(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta); /* function exit code */ @@ -38482,7 +38414,7 @@ static PyObject *__pyx_pf_9pywrapfst_38isomorphic(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2.__pyx_n = 1; __pyx_t_2.delta = __pyx_v_delta; __pyx_t_1 = __pyx_f_9pywrapfst_isomorphic(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3654, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -38499,7 +38431,7 @@ static PyObject *__pyx_pf_9pywrapfst_38isomorphic(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "pywrapfst.pyx":3680 +/* "pywrapfst.pyx":3684 * * * cpdef _MutableFst prune(_Fst ifst, # <<<<<<<<<<<<<< @@ -38512,7 +38444,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_prune(struct float __pyx_v_delta = __pyx_k__40; __pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__41; - /* "pywrapfst.pyx":3683 + /* "pywrapfst.pyx":3687 * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, * weight=None): # <<<<<<<<<<<<<< @@ -38539,7 +38471,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_prune(struct } } - /* "pywrapfst.pyx":3707 + /* "pywrapfst.pyx":3711 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -38548,11 +38480,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_prune(struct */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3707, __pyx_L1_error) + __PYX_ERR(0, 3711, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3708 + /* "pywrapfst.pyx":3712 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight) # <<<<<<<<<<<<<< @@ -38561,12 +38493,12 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_prune(struct */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3708, __pyx_L1_error) + __PYX_ERR(0, 3712, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3708, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3712, __pyx_L1_error) __pyx_v_wc = __pyx_t_1; - /* "pywrapfst.pyx":3709 + /* "pywrapfst.pyx":3713 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight) * fst.Prune(deref(ifst._fst), tfst.get(), wc, nstate, delta) # <<<<<<<<<<<<<< @@ -38575,11 +38507,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_prune(struct */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3709, __pyx_L1_error) + __PYX_ERR(0, 3713, __pyx_L1_error) } fst::script::Prune((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), __pyx_v_wc, __pyx_v_nstate, __pyx_v_delta); - /* "pywrapfst.pyx":3710 + /* "pywrapfst.pyx":3714 * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight) * fst.Prune(deref(ifst._fst), tfst.get(), wc, nstate, delta) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -38587,13 +38519,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_prune(struct * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3710, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3680 + /* "pywrapfst.pyx":3684 * * * cpdef _MutableFst prune(_Fst ifst, # <<<<<<<<<<<<<< @@ -38627,7 +38559,7 @@ static PyObject *__pyx_pw_9pywrapfst_41prune(PyObject *__pyx_self, PyObject *__p static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_weight,0}; PyObject* values[4] = {0,0,0,0}; - /* "pywrapfst.pyx":3683 + /* "pywrapfst.pyx":3687 * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, * weight=None): # <<<<<<<<<<<<<< @@ -38675,7 +38607,7 @@ static PyObject *__pyx_pw_9pywrapfst_41prune(PyObject *__pyx_self, PyObject *__p } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 3680, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 3684, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -38692,12 +38624,12 @@ static PyObject *__pyx_pw_9pywrapfst_41prune(PyObject *__pyx_self, PyObject *__p } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3681, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3685, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__40; } if (values[2]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3682, __pyx_L3_error) + __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3686, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_k__41; } @@ -38705,16 +38637,16 @@ static PyObject *__pyx_pw_9pywrapfst_41prune(PyObject *__pyx_self, PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3680, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3684, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.prune", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3680, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3684, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_40prune(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight); - /* "pywrapfst.pyx":3680 + /* "pywrapfst.pyx":3684 * * * cpdef _MutableFst prune(_Fst ifst, # <<<<<<<<<<<<<< @@ -38742,7 +38674,7 @@ static PyObject *__pyx_pf_9pywrapfst_40prune(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_2.delta = __pyx_v_delta; __pyx_t_2.nstate = __pyx_v_nstate; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_prune(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3680, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_prune(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -38759,7 +38691,7 @@ static PyObject *__pyx_pf_9pywrapfst_40prune(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "pywrapfst.pyx":3713 +/* "pywrapfst.pyx":3717 * * * cpdef _MutableFst push(_Fst ifst, # <<<<<<<<<<<<<< @@ -38771,7 +38703,7 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_push *__pyx_optional_args) { float __pyx_v_delta = __pyx_k__42; - /* "pywrapfst.pyx":3715 + /* "pywrapfst.pyx":3719 * cpdef _MutableFst push(_Fst ifst, * float delta=fst.kDelta, * bool push_weights=False, # <<<<<<<<<<<<<< @@ -38780,7 +38712,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ bool __pyx_v_push_weights = ((bool)0); - /* "pywrapfst.pyx":3716 + /* "pywrapfst.pyx":3720 * float delta=fst.kDelta, * bool push_weights=False, * bool push_labels=False, # <<<<<<<<<<<<<< @@ -38789,7 +38721,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ bool __pyx_v_push_labels = ((bool)0); - /* "pywrapfst.pyx":3717 + /* "pywrapfst.pyx":3721 * bool push_weights=False, * bool push_labels=False, * bool remove_common_affix=False, # <<<<<<<<<<<<<< @@ -38798,7 +38730,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ bool __pyx_v_remove_common_affix = ((bool)0); - /* "pywrapfst.pyx":3718 + /* "pywrapfst.pyx":3722 * bool push_labels=False, * bool remove_common_affix=False, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -38807,7 +38739,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ bool __pyx_v_remove_total_weight = ((bool)0); - /* "pywrapfst.pyx":3719 + /* "pywrapfst.pyx":3723 * bool remove_common_affix=False, * bool remove_total_weight=False, * bool to_final=False): # <<<<<<<<<<<<<< @@ -38842,7 +38774,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ } } - /* "pywrapfst.pyx":3759 + /* "pywrapfst.pyx":3763 * # This is copied, almost verbatim, from nlp/fst/bin/fstpush.cc. * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -38851,11 +38783,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3759, __pyx_L1_error) + __PYX_ERR(0, 3763, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3760 + /* "pywrapfst.pyx":3764 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * cdef uint32 flags = fst.GetPushFlags(push_weights, push_labels, # <<<<<<<<<<<<<< @@ -38864,7 +38796,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ __pyx_v_flags = fst::script::GetPushFlags(__pyx_v_push_weights, __pyx_v_push_labels, __pyx_v_remove_common_affix, __pyx_v_remove_total_weight); - /* "pywrapfst.pyx":3762 + /* "pywrapfst.pyx":3766 * cdef uint32 flags = fst.GetPushFlags(push_weights, push_labels, * remove_common_affix, remove_total_weight) * fst.Push(deref(ifst._fst), tfst.get(), flags, fst.GetReweightType(to_final), # <<<<<<<<<<<<<< @@ -38873,10 +38805,10 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3762, __pyx_L1_error) + __PYX_ERR(0, 3766, __pyx_L1_error) } - /* "pywrapfst.pyx":3763 + /* "pywrapfst.pyx":3767 * remove_common_affix, remove_total_weight) * fst.Push(deref(ifst._fst), tfst.get(), flags, fst.GetReweightType(to_final), * delta) # <<<<<<<<<<<<<< @@ -38885,7 +38817,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ */ fst::script::Push((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), __pyx_v_flags, fst::script::GetReweightType(__pyx_v_to_final), __pyx_v_delta); - /* "pywrapfst.pyx":3764 + /* "pywrapfst.pyx":3768 * fst.Push(deref(ifst._fst), tfst.get(), flags, fst.GetReweightType(to_final), * delta) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -38893,13 +38825,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_push(struct _ * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3713 + /* "pywrapfst.pyx":3717 * * * cpdef _MutableFst push(_Fst ifst, # <<<<<<<<<<<<<< @@ -38999,7 +38931,7 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 3713, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 3717, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -39022,15 +38954,15 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3714, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__42; } if (values[2]) { - __pyx_v_push_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_push_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3715, __pyx_L3_error) + __pyx_v_push_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_push_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3719, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3715 + /* "pywrapfst.pyx":3719 * cpdef _MutableFst push(_Fst ifst, * float delta=fst.kDelta, * bool push_weights=False, # <<<<<<<<<<<<<< @@ -39040,10 +38972,10 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py __pyx_v_push_weights = ((bool)0); } if (values[3]) { - __pyx_v_push_labels = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_push_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) + __pyx_v_push_labels = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_push_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3720, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3716 + /* "pywrapfst.pyx":3720 * float delta=fst.kDelta, * bool push_weights=False, * bool push_labels=False, # <<<<<<<<<<<<<< @@ -39053,10 +38985,10 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py __pyx_v_push_labels = ((bool)0); } if (values[4]) { - __pyx_v_remove_common_affix = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_remove_common_affix == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3717, __pyx_L3_error) + __pyx_v_remove_common_affix = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_remove_common_affix == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3721, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3717 + /* "pywrapfst.pyx":3721 * bool push_weights=False, * bool push_labels=False, * bool remove_common_affix=False, # <<<<<<<<<<<<<< @@ -39066,10 +38998,10 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py __pyx_v_remove_common_affix = ((bool)0); } if (values[5]) { - __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3722, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3718 + /* "pywrapfst.pyx":3722 * bool push_labels=False, * bool remove_common_affix=False, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -39079,10 +39011,10 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py __pyx_v_remove_total_weight = ((bool)0); } if (values[6]) { - __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3719, __pyx_L3_error) + __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3723, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3719 + /* "pywrapfst.pyx":3723 * bool remove_common_affix=False, * bool remove_total_weight=False, * bool to_final=False): # <<<<<<<<<<<<<< @@ -39094,16 +39026,16 @@ static PyObject *__pyx_pw_9pywrapfst_43push(PyObject *__pyx_self, PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("push", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3713, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("push", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3717, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.push", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3713, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3717, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_42push(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_push_weights, __pyx_v_push_labels, __pyx_v_remove_common_affix, __pyx_v_remove_total_weight, __pyx_v_to_final); - /* "pywrapfst.pyx":3713 + /* "pywrapfst.pyx":3717 * * * cpdef _MutableFst push(_Fst ifst, # <<<<<<<<<<<<<< @@ -39134,7 +39066,7 @@ static PyObject *__pyx_pf_9pywrapfst_42push(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_2.remove_common_affix = __pyx_v_remove_common_affix; __pyx_t_2.remove_total_weight = __pyx_v_remove_total_weight; __pyx_t_2.to_final = __pyx_v_to_final; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_push(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3713, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_push(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -39151,7 +39083,7 @@ static PyObject *__pyx_pf_9pywrapfst_42push(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "pywrapfst.pyx":3767 +/* "pywrapfst.pyx":3771 * * * cpdef bool randequivalent(_Fst ifst1, # <<<<<<<<<<<<<< @@ -39192,18 +39124,18 @@ static bool __pyx_f_9pywrapfst_randequivalent(struct __pyx_obj_9pywrapfst__Fst * } } - /* "pywrapfst.pyx":3802 + /* "pywrapfst.pyx":3806 * See also: `equal`, `equivalent`, `isomorphic`, `randgen`. * """ * cdef fst.RandArcSelection ras = _get_rand_arc_selection(tostring(select)) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] opts * # The three trailing options will be ignored by RandEquivalent. */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3802, __pyx_L1_error) - __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3802, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3806, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3806, __pyx_L1_error) __pyx_v_ras = __pyx_t_2; - /* "pywrapfst.pyx":3805 + /* "pywrapfst.pyx":3809 * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] opts * # The three trailing options will be ignored by RandEquivalent. * opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length, # <<<<<<<<<<<<<< @@ -39212,7 +39144,7 @@ static bool __pyx_f_9pywrapfst_randequivalent(struct __pyx_obj_9pywrapfst__Fst * */ __pyx_v_opts.reset(new fst::RandGenOptions (__pyx_v_ras, __pyx_v_max_length, 1, 0, 0)); - /* "pywrapfst.pyx":3807 + /* "pywrapfst.pyx":3811 * opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length, * 1, False, False)) * if seed == 0: # <<<<<<<<<<<<<< @@ -39222,7 +39154,7 @@ static bool __pyx_f_9pywrapfst_randequivalent(struct __pyx_obj_9pywrapfst__Fst * __pyx_t_3 = ((__pyx_v_seed == 0) != 0); if (__pyx_t_3) { - /* "pywrapfst.pyx":3808 + /* "pywrapfst.pyx":3812 * 1, False, False)) * if seed == 0: * seed = time(NULL) + getpid() # <<<<<<<<<<<<<< @@ -39231,7 +39163,7 @@ static bool __pyx_f_9pywrapfst_randequivalent(struct __pyx_obj_9pywrapfst__Fst * */ __pyx_v_seed = (time(NULL) + getpid()); - /* "pywrapfst.pyx":3807 + /* "pywrapfst.pyx":3811 * opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length, * 1, False, False)) * if seed == 0: # <<<<<<<<<<<<<< @@ -39240,7 +39172,7 @@ static bool __pyx_f_9pywrapfst_randequivalent(struct __pyx_obj_9pywrapfst__Fst * */ } - /* "pywrapfst.pyx":3809 + /* "pywrapfst.pyx":3813 * if seed == 0: * seed = time(NULL) + getpid() * return fst.RandEquivalent(deref(ifst1._fst), deref(ifst2._fst), npath, delta, # <<<<<<<<<<<<<< @@ -39249,14 +39181,14 @@ static bool __pyx_f_9pywrapfst_randequivalent(struct __pyx_obj_9pywrapfst__Fst * */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3809, __pyx_L1_error) + __PYX_ERR(0, 3813, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3809, __pyx_L1_error) + __PYX_ERR(0, 3813, __pyx_L1_error) } - /* "pywrapfst.pyx":3810 + /* "pywrapfst.pyx":3814 * seed = time(NULL) + getpid() * return fst.RandEquivalent(deref(ifst1._fst), deref(ifst2._fst), npath, delta, * seed, deref(opts)) # <<<<<<<<<<<<<< @@ -39266,7 +39198,7 @@ static bool __pyx_f_9pywrapfst_randequivalent(struct __pyx_obj_9pywrapfst__Fst * __pyx_r = fst::script::RandEquivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_npath, __pyx_v_delta, __pyx_v_seed, (*__pyx_v_opts)); goto __pyx_L0; - /* "pywrapfst.pyx":3767 + /* "pywrapfst.pyx":3771 * * * cpdef bool randequivalent(_Fst ifst1, # <<<<<<<<<<<<<< @@ -39331,7 +39263,7 @@ static PyObject *__pyx_pw_9pywrapfst_45randequivalent(PyObject *__pyx_self, PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 3767, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 3771, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -39365,7 +39297,7 @@ static PyObject *__pyx_pw_9pywrapfst_45randequivalent(PyObject *__pyx_self, PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randequivalent") < 0)) __PYX_ERR(0, 3767, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randequivalent") < 0)) __PYX_ERR(0, 3771, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -39388,37 +39320,37 @@ static PyObject *__pyx_pw_9pywrapfst_45randequivalent(PyObject *__pyx_self, PyOb __pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]); if (values[2]) { - __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_npath == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3769, __pyx_L3_error) + __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_npath == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3773, __pyx_L3_error) } else { __pyx_v_npath = ((__pyx_t_10basictypes_int32)1); } if (values[3]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3770, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3774, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__43; } if (values[4]) { - __pyx_v_seed = __Pyx_PyInt_As_time_t(values[4]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3771, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyInt_As_time_t(values[4]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3775, __pyx_L3_error) } else { __pyx_v_seed = ((time_t)0); } __pyx_v_select = values[5]; if (values[6]) { - __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[6]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3773, __pyx_L3_error) + __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[6]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3777, __pyx_L3_error) } else { __pyx_v_max_length = __pyx_k__44; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3767, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3771, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.randequivalent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3767, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3768, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3771, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3772, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_44randequivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_npath, __pyx_v_delta, __pyx_v_seed, __pyx_v_select, __pyx_v_max_length); /* function exit code */ @@ -39444,8 +39376,8 @@ static PyObject *__pyx_pf_9pywrapfst_44randequivalent(CYTHON_UNUSED PyObject *__ __pyx_t_2.seed = __pyx_v_seed; __pyx_t_2.select = __pyx_v_select; __pyx_t_2.max_length = __pyx_v_max_length; - __pyx_t_1 = __pyx_f_9pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3767, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3767, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3771, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -39462,7 +39394,7 @@ static PyObject *__pyx_pf_9pywrapfst_44randequivalent(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "pywrapfst.pyx":3813 +/* "pywrapfst.pyx":3817 * * * cpdef _MutableFst randgen(_Fst ifst, # <<<<<<<<<<<<<< @@ -39477,7 +39409,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc PyObject *__pyx_v_select = ((PyObject *)__pyx_n_b_uniform); __pyx_t_10basictypes_int32 __pyx_v_max_length = __pyx_k__45; - /* "pywrapfst.pyx":3818 + /* "pywrapfst.pyx":3822 * select=b"uniform", * int32 max_length=INT32_MAX, * bool weighted=False, # <<<<<<<<<<<<<< @@ -39486,7 +39418,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc */ bool __pyx_v_weighted = ((bool)0); - /* "pywrapfst.pyx":3819 + /* "pywrapfst.pyx":3823 * int32 max_length=INT32_MAX, * bool weighted=False, * bool remove_total_weight=False): # <<<<<<<<<<<<<< @@ -39525,18 +39457,18 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc } } - /* "pywrapfst.pyx":3851 + /* "pywrapfst.pyx":3855 * See also: `randequivalent`. * """ * cdef fst.RandArcSelection ras = _get_rand_arc_selection(tostring(select)) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] opts * opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length, */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3851, __pyx_L1_error) - __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3851, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3855, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3855, __pyx_L1_error) __pyx_v_ras = __pyx_t_2; - /* "pywrapfst.pyx":3853 + /* "pywrapfst.pyx":3857 * cdef fst.RandArcSelection ras = _get_rand_arc_selection(tostring(select)) * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] opts * opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length, # <<<<<<<<<<<<<< @@ -39545,7 +39477,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc */ __pyx_v_opts.reset(new fst::RandGenOptions (__pyx_v_ras, __pyx_v_max_length, __pyx_v_npath, __pyx_v_weighted, __pyx_v_remove_total_weight)); - /* "pywrapfst.pyx":3857 + /* "pywrapfst.pyx":3861 * remove_total_weight)) * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -39554,11 +39486,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3857, __pyx_L1_error) + __PYX_ERR(0, 3861, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3858 + /* "pywrapfst.pyx":3862 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * if seed == 0: # <<<<<<<<<<<<<< @@ -39568,7 +39500,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc __pyx_t_3 = ((__pyx_v_seed == 0) != 0); if (__pyx_t_3) { - /* "pywrapfst.pyx":3859 + /* "pywrapfst.pyx":3863 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * if seed == 0: * seed = time(NULL) + getpid() # <<<<<<<<<<<<<< @@ -39577,7 +39509,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc */ __pyx_v_seed = (time(NULL) + getpid()); - /* "pywrapfst.pyx":3858 + /* "pywrapfst.pyx":3862 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * if seed == 0: # <<<<<<<<<<<<<< @@ -39586,7 +39518,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc */ } - /* "pywrapfst.pyx":3860 + /* "pywrapfst.pyx":3864 * if seed == 0: * seed = time(NULL) + getpid() * fst.RandGen(deref(ifst._fst), tfst.get(), seed, deref(opts)) # <<<<<<<<<<<<<< @@ -39595,11 +39527,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3860, __pyx_L1_error) + __PYX_ERR(0, 3864, __pyx_L1_error) } fst::script::RandGen((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), __pyx_v_seed, (*__pyx_v_opts)); - /* "pywrapfst.pyx":3861 + /* "pywrapfst.pyx":3865 * seed = time(NULL) + getpid() * fst.RandGen(deref(ifst._fst), tfst.get(), seed, deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -39607,13 +39539,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_randgen(struc * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3861, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3813 + /* "pywrapfst.pyx":3817 * * * cpdef _MutableFst randgen(_Fst ifst, # <<<<<<<<<<<<<< @@ -39714,7 +39646,7 @@ static PyObject *__pyx_pw_9pywrapfst_47randgen(PyObject *__pyx_self, PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randgen") < 0)) __PYX_ERR(0, 3813, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randgen") < 0)) __PYX_ERR(0, 3817, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -39737,26 +39669,26 @@ static PyObject *__pyx_pw_9pywrapfst_47randgen(PyObject *__pyx_self, PyObject *_ } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_npath == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3814, __pyx_L3_error) + __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_npath == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3818, __pyx_L3_error) } else { __pyx_v_npath = ((__pyx_t_10basictypes_int32)1); } if (values[2]) { - __pyx_v_seed = __Pyx_PyInt_As_time_t(values[2]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyInt_As_time_t(values[2]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3819, __pyx_L3_error) } else { __pyx_v_seed = ((time_t)0); } __pyx_v_select = values[3]; if (values[4]) { - __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[4]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error) + __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[4]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3821, __pyx_L3_error) } else { __pyx_v_max_length = __pyx_k__45; } if (values[5]) { - __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3818, __pyx_L3_error) + __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3822, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3818 + /* "pywrapfst.pyx":3822 * select=b"uniform", * int32 max_length=INT32_MAX, * bool weighted=False, # <<<<<<<<<<<<<< @@ -39766,10 +39698,10 @@ static PyObject *__pyx_pw_9pywrapfst_47randgen(PyObject *__pyx_self, PyObject *_ __pyx_v_weighted = ((bool)0); } if (values[6]) { - __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3819, __pyx_L3_error) + __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3823, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3819 + /* "pywrapfst.pyx":3823 * int32 max_length=INT32_MAX, * bool weighted=False, * bool remove_total_weight=False): # <<<<<<<<<<<<<< @@ -39781,16 +39713,16 @@ static PyObject *__pyx_pw_9pywrapfst_47randgen(PyObject *__pyx_self, PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3813, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3817, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.randgen", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3813, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3817, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_46randgen(__pyx_self, __pyx_v_ifst, __pyx_v_npath, __pyx_v_seed, __pyx_v_select, __pyx_v_max_length, __pyx_v_weighted, __pyx_v_remove_total_weight); - /* "pywrapfst.pyx":3813 + /* "pywrapfst.pyx":3817 * * * cpdef _MutableFst randgen(_Fst ifst, # <<<<<<<<<<<<<< @@ -39821,7 +39753,7 @@ static PyObject *__pyx_pf_9pywrapfst_46randgen(CYTHON_UNUSED PyObject *__pyx_sel __pyx_t_2.max_length = __pyx_v_max_length; __pyx_t_2.remove_total_weight = __pyx_v_weighted; __pyx_t_2.weighted = __pyx_v_remove_total_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_randgen(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_randgen(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -39838,7 +39770,7 @@ static PyObject *__pyx_pf_9pywrapfst_46randgen(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "pywrapfst.pyx":3864 +/* "pywrapfst.pyx":3868 * * * cpdef _MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -39851,7 +39783,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj PyObject *__pyx_v_call_arc_labeling = ((PyObject *)__pyx_n_b_input); PyObject *__pyx_v_return_arc_labeling = ((PyObject *)__pyx_n_b_neither); - /* "pywrapfst.pyx":3867 + /* "pywrapfst.pyx":3871 * call_arc_labeling=b"input", * return_arc_labeling=b"neither", * bool epsilon_on_replace=False, # <<<<<<<<<<<<<< @@ -39899,26 +39831,26 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj } } - /* "pywrapfst.pyx":3909 + /* "pywrapfst.pyx":3913 * cdef int64 label * cdef _Fst ifst * it = iter(pairs) # <<<<<<<<<<<<<< * (root_label, ifst) = next(it) * _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get())) */ - __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_it = __pyx_t_1; __pyx_t_1 = 0; - /* "pywrapfst.pyx":3910 + /* "pywrapfst.pyx":3914 * cdef _Fst ifst * it = iter(pairs) * (root_label, ifst) = next(it) # <<<<<<<<<<<<<< * _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get())) * cdef unique_ptr[fst.VectorFstClass] tfst */ - __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -39926,7 +39858,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 3910, __pyx_L1_error) + __PYX_ERR(0, 3914, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -39939,15 +39871,15 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -39955,7 +39887,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 3910, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 3914, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -39963,17 +39895,17 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 3910, __pyx_L1_error) + __PYX_ERR(0, 3914, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3910, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3914, __pyx_L1_error) __pyx_v_root_label = __pyx_t_6; __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "pywrapfst.pyx":3911 + /* "pywrapfst.pyx":3915 * it = iter(pairs) * (root_label, ifst) = next(it) * _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get())) # <<<<<<<<<<<<<< @@ -39982,22 +39914,22 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3911, __pyx_L1_error) + __PYX_ERR(0, 3915, __pyx_L1_error) } try { __pyx_t_7 = __pyx_t_3fst_LabelFstClassPair(__pyx_v_root_label, __pyx_v_ifst->_fst.get()); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 3911, __pyx_L1_error) + __PYX_ERR(0, 3915, __pyx_L1_error) } try { __pyx_v__pairs.push_back(__pyx_t_7); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 3911, __pyx_L1_error) + __PYX_ERR(0, 3915, __pyx_L1_error) } - /* "pywrapfst.pyx":3913 + /* "pywrapfst.pyx":3917 * _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get())) * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -40006,11 +39938,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3913, __pyx_L1_error) + __PYX_ERR(0, 3917, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3914 + /* "pywrapfst.pyx":3918 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * for (label, ifst) in it: # <<<<<<<<<<<<<< @@ -40021,26 +39953,26 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj __pyx_t_1 = __pyx_v_it; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3918, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3918, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3918, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -40050,7 +39982,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 3914, __pyx_L1_error) + else __PYX_ERR(0, 3918, __pyx_L1_error) } break; } @@ -40062,7 +39994,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 3914, __pyx_L1_error) + __PYX_ERR(0, 3918, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -40075,15 +40007,15 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -40091,7 +40023,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_10), 2) < 0) __PYX_ERR(0, 3914, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_10), 2) < 0) __PYX_ERR(0, 3918, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L8_unpacking_done; @@ -40099,17 +40031,17 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 3914, __pyx_L1_error) + __PYX_ERR(0, 3918, __pyx_L1_error) __pyx_L8_unpacking_done:; } - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3914, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3918, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3914, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3918, __pyx_L1_error) __pyx_v_label = __pyx_t_6; __Pyx_DECREF_SET(__pyx_v_ifst, ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_4)); __pyx_t_4 = 0; - /* "pywrapfst.pyx":3915 + /* "pywrapfst.pyx":3919 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * for (label, ifst) in it: * _pairs.push_back(fst.LabelFstClassPair(label, ifst._fst.get())) # <<<<<<<<<<<<<< @@ -40118,22 +40050,22 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3915, __pyx_L1_error) + __PYX_ERR(0, 3919, __pyx_L1_error) } try { __pyx_t_7 = __pyx_t_3fst_LabelFstClassPair(__pyx_v_label, __pyx_v_ifst->_fst.get()); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 3915, __pyx_L1_error) + __PYX_ERR(0, 3919, __pyx_L1_error) } try { __pyx_v__pairs.push_back(__pyx_t_7); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 3915, __pyx_L1_error) + __PYX_ERR(0, 3919, __pyx_L1_error) } - /* "pywrapfst.pyx":3914 + /* "pywrapfst.pyx":3918 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * for (label, ifst) in it: # <<<<<<<<<<<<<< @@ -40143,45 +40075,45 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":3917 + /* "pywrapfst.pyx":3921 * _pairs.push_back(fst.LabelFstClassPair(label, ifst._fst.get())) * cdef fst.ReplaceLabelType cal = _get_replace_label_type( * tostring(call_arc_labeling), epsilon_on_replace) # <<<<<<<<<<<<<< * cdef fst.ReplaceLabelType ral = _get_replace_label_type( * tostring(return_arc_labeling), epsilon_on_replace) */ - __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_call_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3917, __pyx_L1_error) + __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_call_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3921, __pyx_L1_error) - /* "pywrapfst.pyx":3916 + /* "pywrapfst.pyx":3920 * for (label, ifst) in it: * _pairs.push_back(fst.LabelFstClassPair(label, ifst._fst.get())) * cdef fst.ReplaceLabelType cal = _get_replace_label_type( # <<<<<<<<<<<<<< * tostring(call_arc_labeling), epsilon_on_replace) * cdef fst.ReplaceLabelType ral = _get_replace_label_type( */ - __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3916, __pyx_L1_error) + __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3920, __pyx_L1_error) __pyx_v_cal = __pyx_t_12; - /* "pywrapfst.pyx":3919 + /* "pywrapfst.pyx":3923 * tostring(call_arc_labeling), epsilon_on_replace) * cdef fst.ReplaceLabelType ral = _get_replace_label_type( * tostring(return_arc_labeling), epsilon_on_replace) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.ReplaceOptions] opts * opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label)) */ - __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_return_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3919, __pyx_L1_error) + __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_return_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3923, __pyx_L1_error) - /* "pywrapfst.pyx":3918 + /* "pywrapfst.pyx":3922 * cdef fst.ReplaceLabelType cal = _get_replace_label_type( * tostring(call_arc_labeling), epsilon_on_replace) * cdef fst.ReplaceLabelType ral = _get_replace_label_type( # <<<<<<<<<<<<<< * tostring(return_arc_labeling), epsilon_on_replace) * cdef unique_ptr[fst.ReplaceOptions] opts */ - __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3918, __pyx_L1_error) + __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3922, __pyx_L1_error) __pyx_v_ral = __pyx_t_12; - /* "pywrapfst.pyx":3921 + /* "pywrapfst.pyx":3925 * tostring(return_arc_labeling), epsilon_on_replace) * cdef unique_ptr[fst.ReplaceOptions] opts * opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label)) # <<<<<<<<<<<<<< @@ -40190,7 +40122,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj */ __pyx_v_opts.reset(new fst::script::ReplaceOptions(__pyx_v_root_label, __pyx_v_cal, __pyx_v_ral, __pyx_v_return_label)); - /* "pywrapfst.pyx":3922 + /* "pywrapfst.pyx":3926 * cdef unique_ptr[fst.ReplaceOptions] opts * opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label)) * fst.Replace(_pairs, tfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -40199,7 +40131,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj */ fst::script::Replace(__pyx_v__pairs, __pyx_v_tfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":3923 + /* "pywrapfst.pyx":3927 * opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label)) * fst.Replace(_pairs, tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -40207,13 +40139,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_replace(PyObj * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3923, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3864 + /* "pywrapfst.pyx":3868 * * * cpdef _MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -40303,7 +40235,7 @@ static PyObject *__pyx_pw_9pywrapfst_49replace(PyObject *__pyx_self, PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(0, 3864, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(0, 3868, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -40324,10 +40256,10 @@ static PyObject *__pyx_pw_9pywrapfst_49replace(PyObject *__pyx_self, PyObject *_ __pyx_v_call_arc_labeling = values[1]; __pyx_v_return_arc_labeling = values[2]; if (values[3]) { - __pyx_v_epsilon_on_replace = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_epsilon_on_replace == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3867, __pyx_L3_error) + __pyx_v_epsilon_on_replace = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_epsilon_on_replace == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3871, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3867 + /* "pywrapfst.pyx":3871 * call_arc_labeling=b"input", * return_arc_labeling=b"neither", * bool epsilon_on_replace=False, # <<<<<<<<<<<<<< @@ -40337,14 +40269,14 @@ static PyObject *__pyx_pw_9pywrapfst_49replace(PyObject *__pyx_self, PyObject *_ __pyx_v_epsilon_on_replace = ((bool)0); } if (values[4]) { - __pyx_v_return_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_return_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3868, __pyx_L3_error) + __pyx_v_return_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_return_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3872, __pyx_L3_error) } else { __pyx_v_return_label = ((__pyx_t_10basictypes_int64)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3864, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3868, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -40352,7 +40284,7 @@ static PyObject *__pyx_pw_9pywrapfst_49replace(PyObject *__pyx_self, PyObject *_ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9pywrapfst_48replace(__pyx_self, __pyx_v_pairs, __pyx_v_call_arc_labeling, __pyx_v_return_arc_labeling, __pyx_v_epsilon_on_replace, __pyx_v_return_label); - /* "pywrapfst.pyx":3864 + /* "pywrapfst.pyx":3868 * * * cpdef _MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -40377,7 +40309,7 @@ static PyObject *__pyx_pf_9pywrapfst_48replace(CYTHON_UNUSED PyObject *__pyx_sel __pyx_t_2.return_arc_labeling = __pyx_v_return_arc_labeling; __pyx_t_2.epsilon_on_replace = __pyx_v_epsilon_on_replace; __pyx_t_2.return_label = __pyx_v_return_label; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3864, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -40394,7 +40326,7 @@ static PyObject *__pyx_pf_9pywrapfst_48replace(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "pywrapfst.pyx":3926 +/* "pywrapfst.pyx":3930 * * * cpdef _MutableFst reverse(_Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<< @@ -40416,7 +40348,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_reverse(struc } } - /* "pywrapfst.pyx":3946 + /* "pywrapfst.pyx":3950 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -40425,11 +40357,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_reverse(struc */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3946, __pyx_L1_error) + __PYX_ERR(0, 3950, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":3947 + /* "pywrapfst.pyx":3951 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Reverse(deref(ifst._fst), tfst.get(), require_superinitial) # <<<<<<<<<<<<<< @@ -40438,11 +40370,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_reverse(struc */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3947, __pyx_L1_error) + __PYX_ERR(0, 3951, __pyx_L1_error) } fst::script::Reverse((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), __pyx_v_require_superinitial); - /* "pywrapfst.pyx":3948 + /* "pywrapfst.pyx":3952 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Reverse(deref(ifst._fst), tfst.get(), require_superinitial) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -40450,13 +40382,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_reverse(struc * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3948, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3926 + /* "pywrapfst.pyx":3930 * * * cpdef _MutableFst reverse(_Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<< @@ -40511,7 +40443,7 @@ static PyObject *__pyx_pw_9pywrapfst_51reverse(PyObject *__pyx_self, PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reverse") < 0)) __PYX_ERR(0, 3926, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reverse") < 0)) __PYX_ERR(0, 3930, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -40524,20 +40456,20 @@ static PyObject *__pyx_pw_9pywrapfst_51reverse(PyObject *__pyx_self, PyObject *_ } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_require_superinitial = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_require_superinitial == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3926, __pyx_L3_error) + __pyx_v_require_superinitial = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_require_superinitial == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3930, __pyx_L3_error) } else { __pyx_v_require_superinitial = ((bool)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3926, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3930, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3926, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3930, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_50reverse(__pyx_self, __pyx_v_ifst, __pyx_v_require_superinitial); /* function exit code */ @@ -40558,7 +40490,7 @@ static PyObject *__pyx_pf_9pywrapfst_50reverse(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.require_superinitial = __pyx_v_require_superinitial; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_reverse(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3926, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_reverse(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -40575,7 +40507,7 @@ static PyObject *__pyx_pf_9pywrapfst_50reverse(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "pywrapfst.pyx":3954 +/* "pywrapfst.pyx":3958 * * * cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst, # <<<<<<<<<<<<<< @@ -40588,7 +40520,7 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista __pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__47; PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":3958 + /* "pywrapfst.pyx":3962 * int64 nstate=fst.kNoStateId, * queue_type=b"auto", * bool reverse=False) except *: # <<<<<<<<<<<<<< @@ -40620,7 +40552,7 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista } } - /* "pywrapfst.pyx":3960 + /* "pywrapfst.pyx":3964 * bool reverse=False) except *: * cdef unique_ptr[vector[fst.WeightClass]] distance * distance.reset(new vector[fst.WeightClass]()) # <<<<<<<<<<<<<< @@ -40631,11 +40563,11 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista __pyx_t_1 = new std::vector (); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 3960, __pyx_L1_error) + __PYX_ERR(0, 3964, __pyx_L1_error) } __pyx_v_distance.reset(__pyx_t_1); - /* "pywrapfst.pyx":3964 + /* "pywrapfst.pyx":3968 * # not be used in all cases. * cdef unique_ptr[fst.ShortestDistanceOptions] opts * if reverse: # <<<<<<<<<<<<<< @@ -40645,7 +40577,7 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista __pyx_t_2 = (__pyx_v_reverse != 0); if (__pyx_t_2) { - /* "pywrapfst.pyx":3967 + /* "pywrapfst.pyx":3971 * # Only the simpler signature supports shortest distance to final states; * # `nstate` and `queue_type` arguments are ignored. * fst.ShortestDistance(deref(ifst._fst), distance.get(), True, delta) # <<<<<<<<<<<<<< @@ -40654,11 +40586,11 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3967, __pyx_L1_error) + __PYX_ERR(0, 3971, __pyx_L1_error) } fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance.get(), 1, __pyx_v_delta); - /* "pywrapfst.pyx":3964 + /* "pywrapfst.pyx":3968 * # not be used in all cases. * cdef unique_ptr[fst.ShortestDistanceOptions] opts * if reverse: # <<<<<<<<<<<<<< @@ -40668,7 +40600,7 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista goto __pyx_L3; } - /* "pywrapfst.pyx":3969 + /* "pywrapfst.pyx":3973 * fst.ShortestDistance(deref(ifst._fst), distance.get(), True, delta) * else: * opts.reset(new fst.ShortestDistanceOptions( # <<<<<<<<<<<<<< @@ -40677,17 +40609,17 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista */ /*else*/ { - /* "pywrapfst.pyx":3970 + /* "pywrapfst.pyx":3974 * else: * opts.reset(new fst.ShortestDistanceOptions( * _get_queue_type(tostring(queue_type)), fst.ANY_ARC_FILTER, nstate, # <<<<<<<<<<<<<< * delta)) * fst.ShortestDistance(deref(ifst._fst), distance.get(), deref(opts)) */ - __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3970, __pyx_L1_error) - __pyx_t_4 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3970, __pyx_L1_error) + __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3974, __pyx_L1_error) + __pyx_t_4 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3974, __pyx_L1_error) - /* "pywrapfst.pyx":3969 + /* "pywrapfst.pyx":3973 * fst.ShortestDistance(deref(ifst._fst), distance.get(), True, delta) * else: * opts.reset(new fst.ShortestDistanceOptions( # <<<<<<<<<<<<<< @@ -40696,7 +40628,7 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista */ __pyx_v_opts.reset(new fst::script::ShortestDistanceOptions(__pyx_t_4, fst::script::ANY_ARC_FILTER, __pyx_v_nstate, __pyx_v_delta)); - /* "pywrapfst.pyx":3972 + /* "pywrapfst.pyx":3976 * _get_queue_type(tostring(queue_type)), fst.ANY_ARC_FILTER, nstate, * delta)) * fst.ShortestDistance(deref(ifst._fst), distance.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -40705,13 +40637,13 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3972, __pyx_L1_error) + __PYX_ERR(0, 3976, __pyx_L1_error) } fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance.get(), (*__pyx_v_opts)); } __pyx_L3:; - /* "pywrapfst.pyx":3973 + /* "pywrapfst.pyx":3977 * delta)) * fst.ShortestDistance(deref(ifst._fst), distance.get(), deref(opts)) * return distance.release() # <<<<<<<<<<<<<< @@ -40721,7 +40653,7 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista __pyx_r = __pyx_v_distance.release(); goto __pyx_L0; - /* "pywrapfst.pyx":3954 + /* "pywrapfst.pyx":3958 * * * cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst, # <<<<<<<<<<<<<< @@ -40738,7 +40670,7 @@ static std::vector *__pyx_f_9pywrapfst__shortestdista return __pyx_r; } -/* "pywrapfst.pyx":3976 +/* "pywrapfst.pyx":3980 * * * def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<< @@ -40811,7 +40743,7 @@ static PyObject *__pyx_pw_9pywrapfst_53shortestdistance(PyObject *__pyx_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestdistance") < 0)) __PYX_ERR(0, 3976, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestdistance") < 0)) __PYX_ERR(0, 3980, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -40830,21 +40762,21 @@ static PyObject *__pyx_pw_9pywrapfst_53shortestdistance(PyObject *__pyx_self, Py } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3977, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3981, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__48; } if (values[2]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error) + __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3982, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_k__49; } __pyx_v_queue_type = values[3]; if (values[4]) { - __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3980, __pyx_L3_error) + __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3984, __pyx_L3_error) } else { - /* "pywrapfst.pyx":3980 + /* "pywrapfst.pyx":3984 * int64 nstate=fst.kNoStateId, * queue_type=b"auto", * bool reverse=False): # <<<<<<<<<<<<<< @@ -40856,16 +40788,16 @@ static PyObject *__pyx_pw_9pywrapfst_53shortestdistance(PyObject *__pyx_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("shortestdistance", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3976, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("shortestdistance", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3980, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.shortestdistance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3976, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3980, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_52shortestdistance(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_queue_type, __pyx_v_reverse); - /* "pywrapfst.pyx":3976 + /* "pywrapfst.pyx":3980 * * * def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<< @@ -40898,7 +40830,7 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("shortestdistance", 0); - /* "pywrapfst.pyx":4008 + /* "pywrapfst.pyx":4012 * """ * cdef unique_ptr[vector[fst.WeightClass]] distance * distance.reset(_shortestdistance(ifst, delta, nstate, queue_type, reverse)) # <<<<<<<<<<<<<< @@ -40910,10 +40842,10 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * __pyx_t_2.nstate = __pyx_v_nstate; __pyx_t_2.queue_type = __pyx_v_queue_type; __pyx_t_2.reverse = __pyx_v_reverse; - __pyx_t_1 = __pyx_f_9pywrapfst__shortestdistance(__pyx_v_ifst, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4008, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__shortestdistance(__pyx_v_ifst, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4012, __pyx_L1_error) __pyx_v_distance.reset(__pyx_t_1); - /* "pywrapfst.pyx":4009 + /* "pywrapfst.pyx":4013 * cdef unique_ptr[vector[fst.WeightClass]] distance * distance.reset(_shortestdistance(ifst, delta, nstate, queue_type, reverse)) * cdef string weight_type = ifst.weight_type() # <<<<<<<<<<<<<< @@ -40922,11 +40854,11 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 4009, __pyx_L1_error) + __PYX_ERR(0, 4013, __pyx_L1_error) } __pyx_v_weight_type = ((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); - /* "pywrapfst.pyx":4010 + /* "pywrapfst.pyx":4014 * distance.reset(_shortestdistance(ifst, delta, nstate, queue_type, reverse)) * cdef string weight_type = ifst.weight_type() * return [Weight(weight_type, weight.ToString()) for weight in deref(distance)] # <<<<<<<<<<<<<< @@ -40935,7 +40867,7 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = &(*__pyx_v_distance); __pyx_t_4 = __pyx_t_1->begin(); @@ -40944,11 +40876,11 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * __pyx_t_5 = *__pyx_t_4; ++__pyx_t_4; __pyx_7genexpr__pyx_v_weight = __pyx_t_5; - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_weight_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_weight_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_7genexpr__pyx_v_weight.ToString()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_7 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_7genexpr__pyx_v_weight.ToString()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); @@ -40956,10 +40888,10 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4010, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* exit inner scope */ @@ -40967,7 +40899,7 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":3976 + /* "pywrapfst.pyx":3980 * * * def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<< @@ -40989,7 +40921,7 @@ static PyObject *__pyx_pf_9pywrapfst_52shortestdistance(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "pywrapfst.pyx":4013 +/* "pywrapfst.pyx":4017 * * * cpdef _MutableFst shortestpath(_Fst ifst, # <<<<<<<<<<<<<< @@ -41004,7 +40936,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( __pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__51; PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":4018 + /* "pywrapfst.pyx":4022 * int64 nstate=fst.kNoStateId, * queue_type=b"auto", * bool unique=False, # <<<<<<<<<<<<<< @@ -41013,7 +40945,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( */ bool __pyx_v_unique = ((bool)0); - /* "pywrapfst.pyx":4019 + /* "pywrapfst.pyx":4023 * queue_type=b"auto", * bool unique=False, * weight=None): # <<<<<<<<<<<<<< @@ -41052,7 +40984,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( } } - /* "pywrapfst.pyx":4051 + /* "pywrapfst.pyx":4055 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -41061,11 +40993,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4051, __pyx_L1_error) + __PYX_ERR(0, 4055, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":4053 + /* "pywrapfst.pyx":4057 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight) # <<<<<<<<<<<<<< @@ -41074,22 +41006,22 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 4053, __pyx_L1_error) + __PYX_ERR(0, 4057, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4053, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_Zero(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4057, __pyx_L1_error) __pyx_v_wc = __pyx_t_1; - /* "pywrapfst.pyx":4055 + /* "pywrapfst.pyx":4059 * cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight) * cdef unique_ptr[fst.ShortestPathOptions] opts * opts.reset(new fst.ShortestPathOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<< * nshortest, unique, delta, wc, nstate)) * fst.ShortestPath(deref(ifst._fst), tfst.get(), deref(opts)) */ - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4055, __pyx_L1_error) - __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4055, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4059, __pyx_L1_error) + __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4059, __pyx_L1_error) - /* "pywrapfst.pyx":4056 + /* "pywrapfst.pyx":4060 * cdef unique_ptr[fst.ShortestPathOptions] opts * opts.reset(new fst.ShortestPathOptions(_get_queue_type(tostring(queue_type)), * nshortest, unique, delta, wc, nstate)) # <<<<<<<<<<<<<< @@ -41098,7 +41030,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( */ __pyx_v_opts.reset(new fst::script::ShortestPathOptions(__pyx_t_3, __pyx_v_nshortest, __pyx_v_unique, __pyx_v_delta, __pyx_v_wc, __pyx_v_nstate)); - /* "pywrapfst.pyx":4057 + /* "pywrapfst.pyx":4061 * opts.reset(new fst.ShortestPathOptions(_get_queue_type(tostring(queue_type)), * nshortest, unique, delta, wc, nstate)) * fst.ShortestPath(deref(ifst._fst), tfst.get(), deref(opts)) # <<<<<<<<<<<<<< @@ -41107,11 +41039,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4057, __pyx_L1_error) + __PYX_ERR(0, 4061, __pyx_L1_error) } fst::script::ShortestPath((*__pyx_v_ifst->_fst), __pyx_v_tfst.get(), (*__pyx_v_opts)); - /* "pywrapfst.pyx":4058 + /* "pywrapfst.pyx":4062 * nshortest, unique, delta, wc, nstate)) * fst.ShortestPath(deref(ifst._fst), tfst.get(), deref(opts)) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -41119,13 +41051,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_shortestpath( * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4058, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4013 + /* "pywrapfst.pyx":4017 * * * cpdef _MutableFst shortestpath(_Fst ifst, # <<<<<<<<<<<<<< @@ -41163,7 +41095,7 @@ static PyObject *__pyx_pw_9pywrapfst_55shortestpath(PyObject *__pyx_self, PyObje PyObject* values[7] = {0,0,0,0,0,0,0}; values[4] = ((PyObject *)__pyx_n_b_auto); - /* "pywrapfst.pyx":4019 + /* "pywrapfst.pyx":4023 * queue_type=b"auto", * bool unique=False, * weight=None): # <<<<<<<<<<<<<< @@ -41235,7 +41167,7 @@ static PyObject *__pyx_pw_9pywrapfst_55shortestpath(PyObject *__pyx_self, PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestpath") < 0)) __PYX_ERR(0, 4013, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestpath") < 0)) __PYX_ERR(0, 4017, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -41258,26 +41190,26 @@ static PyObject *__pyx_pw_9pywrapfst_55shortestpath(PyObject *__pyx_self, PyObje } __pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)values[0]); if (values[1]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4014, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4018, __pyx_L3_error) } else { __pyx_v_delta = __pyx_k__50; } if (values[2]) { - __pyx_v_nshortest = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_nshortest == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4015, __pyx_L3_error) + __pyx_v_nshortest = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_nshortest == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4019, __pyx_L3_error) } else { __pyx_v_nshortest = ((__pyx_t_10basictypes_int32)1); } if (values[3]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4016, __pyx_L3_error) + __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4020, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_k__51; } __pyx_v_queue_type = values[4]; if (values[5]) { - __pyx_v_unique = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_unique == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4018, __pyx_L3_error) + __pyx_v_unique = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_unique == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4022, __pyx_L3_error) } else { - /* "pywrapfst.pyx":4018 + /* "pywrapfst.pyx":4022 * int64 nstate=fst.kNoStateId, * queue_type=b"auto", * bool unique=False, # <<<<<<<<<<<<<< @@ -41290,16 +41222,16 @@ static PyObject *__pyx_pw_9pywrapfst_55shortestpath(PyObject *__pyx_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("shortestpath", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4013, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("shortestpath", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4017, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.shortestpath", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4013, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4017, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_54shortestpath(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nshortest, __pyx_v_nstate, __pyx_v_queue_type, __pyx_v_unique, __pyx_v_weight); - /* "pywrapfst.pyx":4013 + /* "pywrapfst.pyx":4017 * * * cpdef _MutableFst shortestpath(_Fst ifst, # <<<<<<<<<<<<<< @@ -41330,7 +41262,7 @@ static PyObject *__pyx_pf_9pywrapfst_54shortestpath(CYTHON_UNUSED PyObject *__py __pyx_t_2.queue_type = __pyx_v_queue_type; __pyx_t_2.unique = __pyx_v_unique; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_shortestpath(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4013, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_shortestpath(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -41347,7 +41279,7 @@ static PyObject *__pyx_pf_9pywrapfst_54shortestpath(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "pywrapfst.pyx":4061 +/* "pywrapfst.pyx":4065 * * * cpdef _Fst statemap(_Fst ifst, map_type): # <<<<<<<<<<<<<< @@ -41363,7 +41295,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_statemap(struct __py struct __pyx_opt_args_9pywrapfst__map __pyx_t_2; __Pyx_RefNannySetupContext("statemap", 0); - /* "pywrapfst.pyx":4084 + /* "pywrapfst.pyx":4088 * See also: `arcmap`. * """ * return _map(ifst, fst.kDelta, map_type, 1., None) # <<<<<<<<<<<<<< @@ -41376,13 +41308,13 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_statemap(struct __py __pyx_t_2.map_type = __pyx_v_map_type; __pyx_t_2.power = 1.; __pyx_t_2.weight = Py_None; - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4084, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4061 + /* "pywrapfst.pyx":4065 * * * cpdef _Fst statemap(_Fst ifst, map_type): # <<<<<<<<<<<<<< @@ -41433,11 +41365,11 @@ static PyObject *__pyx_pw_9pywrapfst_57statemap(PyObject *__pyx_self, PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_map_type)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4061, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4065, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "statemap") < 0)) __PYX_ERR(0, 4061, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "statemap") < 0)) __PYX_ERR(0, 4065, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -41450,13 +41382,13 @@ static PyObject *__pyx_pw_9pywrapfst_57statemap(PyObject *__pyx_self, PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4061, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4065, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.statemap", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4061, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4065, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_56statemap(__pyx_self, __pyx_v_ifst, __pyx_v_map_type); /* function exit code */ @@ -41474,7 +41406,7 @@ static PyObject *__pyx_pf_9pywrapfst_56statemap(CYTHON_UNUSED PyObject *__pyx_se PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("statemap", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_statemap(__pyx_v_ifst, __pyx_v_map_type, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4061, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_statemap(__pyx_v_ifst, __pyx_v_map_type, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -41491,7 +41423,7 @@ static PyObject *__pyx_pf_9pywrapfst_56statemap(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "pywrapfst.pyx":4087 +/* "pywrapfst.pyx":4091 * * * cpdef _MutableFst synchronize(_Fst ifst): # <<<<<<<<<<<<<< @@ -41507,7 +41439,7 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_synchronize(s PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("synchronize", 0); - /* "pywrapfst.pyx":4107 + /* "pywrapfst.pyx":4111 * """ * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -41516,11 +41448,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_synchronize(s */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4107, __pyx_L1_error) + __PYX_ERR(0, 4111, __pyx_L1_error) } __pyx_v_tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0))); - /* "pywrapfst.pyx":4108 + /* "pywrapfst.pyx":4112 * cdef unique_ptr[fst.VectorFstClass] tfst * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Synchronize(deref(ifst._fst), tfst.get()) # <<<<<<<<<<<<<< @@ -41529,11 +41461,11 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_synchronize(s */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4108, __pyx_L1_error) + __PYX_ERR(0, 4112, __pyx_L1_error) } fst::script::Synchronize((*__pyx_v_ifst->_fst), __pyx_v_tfst.get()); - /* "pywrapfst.pyx":4109 + /* "pywrapfst.pyx":4113 * tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Synchronize(deref(ifst._fst), tfst.get()) * return _init_MutableFst(tfst.release()) # <<<<<<<<<<<<<< @@ -41541,13 +41473,13 @@ static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_synchronize(s * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4087 + /* "pywrapfst.pyx":4091 * * * cpdef _MutableFst synchronize(_Fst ifst): # <<<<<<<<<<<<<< @@ -41573,7 +41505,7 @@ static PyObject *__pyx_pw_9pywrapfst_59synchronize(PyObject *__pyx_self, PyObjec PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("synchronize (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4087, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4091, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_58synchronize(__pyx_self, ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_ifst)); /* function exit code */ @@ -41591,7 +41523,7 @@ static PyObject *__pyx_pf_9pywrapfst_58synchronize(CYTHON_UNUSED PyObject *__pyx PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("synchronize", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_synchronize(__pyx_v_ifst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4087, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_synchronize(__pyx_v_ifst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -41608,7 +41540,7 @@ static PyObject *__pyx_pf_9pywrapfst_58synchronize(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "pywrapfst.pyx":4166 +/* "pywrapfst.pyx":4170 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -41636,7 +41568,7 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fst_type,&__pyx_n_s_arc_type,&__pyx_n_s_isymbols,&__pyx_n_s_osymbols,&__pyx_n_s_ssymbols,&__pyx_n_s_acceptor,&__pyx_n_s_keep_isymbols,&__pyx_n_s_keep_osymbols,&__pyx_n_s_keep_state_numbering,&__pyx_n_s_allow_negative_labels,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; - /* "pywrapfst.pyx":4169 + /* "pywrapfst.pyx":4173 * string fst_type=b"vector", * string arc_type=b"standard", * SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -41645,7 +41577,7 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb */ values[2] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None); - /* "pywrapfst.pyx":4170 + /* "pywrapfst.pyx":4174 * string arc_type=b"standard", * SymbolTable isymbols=None, * SymbolTable osymbols=None, # <<<<<<<<<<<<<< @@ -41654,7 +41586,7 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb */ values[3] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None); - /* "pywrapfst.pyx":4171 + /* "pywrapfst.pyx":4175 * SymbolTable isymbols=None, * SymbolTable osymbols=None, * SymbolTable ssymbols=None, # <<<<<<<<<<<<<< @@ -41752,7 +41684,7 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4166, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4170, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -41781,12 +41713,12 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb } } if (values[0]) { - __pyx_v_fst_type = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4167, __pyx_L3_error) + __pyx_v_fst_type = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4171, __pyx_L3_error) } else { __pyx_v_fst_type = __pyx_k__52; } if (values[1]) { - __pyx_v_arc_type = __pyx_convert_string_from_py_std__in_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4168, __pyx_L3_error) + __pyx_v_arc_type = __pyx_convert_string_from_py_std__in_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4172, __pyx_L3_error) } else { __pyx_v_arc_type = __pyx_k__53; } @@ -41794,10 +41726,10 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb __pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTable *)values[3]); __pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTable *)values[4]); if (values[5]) { - __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4172, __pyx_L3_error) + __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4176, __pyx_L3_error) } else { - /* "pywrapfst.pyx":4172 + /* "pywrapfst.pyx":4176 * SymbolTable osymbols=None, * SymbolTable ssymbols=None, * bool acceptor=False, # <<<<<<<<<<<<<< @@ -41807,10 +41739,10 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb __pyx_v_acceptor = ((bool)0); } if (values[6]) { - __pyx_v_keep_isymbols = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_keep_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4173, __pyx_L3_error) + __pyx_v_keep_isymbols = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_keep_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4177, __pyx_L3_error) } else { - /* "pywrapfst.pyx":4173 + /* "pywrapfst.pyx":4177 * SymbolTable ssymbols=None, * bool acceptor=False, * bool keep_isymbols=False, # <<<<<<<<<<<<<< @@ -41820,10 +41752,10 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb __pyx_v_keep_isymbols = ((bool)0); } if (values[7]) { - __pyx_v_keep_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_keep_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4174, __pyx_L3_error) + __pyx_v_keep_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_keep_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4178, __pyx_L3_error) } else { - /* "pywrapfst.pyx":4174 + /* "pywrapfst.pyx":4178 * bool acceptor=False, * bool keep_isymbols=False, * bool keep_osymbols=False, # <<<<<<<<<<<<<< @@ -41833,10 +41765,10 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb __pyx_v_keep_osymbols = ((bool)0); } if (values[8]) { - __pyx_v_keep_state_numbering = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_keep_state_numbering == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L3_error) + __pyx_v_keep_state_numbering = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_keep_state_numbering == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4179, __pyx_L3_error) } else { - /* "pywrapfst.pyx":4175 + /* "pywrapfst.pyx":4179 * bool keep_isymbols=False, * bool keep_osymbols=False, * bool keep_state_numbering=False, # <<<<<<<<<<<<<< @@ -41846,10 +41778,10 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb __pyx_v_keep_state_numbering = ((bool)0); } if (values[9]) { - __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4176, __pyx_L3_error) + __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4180, __pyx_L3_error) } else { - /* "pywrapfst.pyx":4176 + /* "pywrapfst.pyx":4180 * bool keep_osymbols=False, * bool keep_state_numbering=False, * bool allow_negative_labels=False): # <<<<<<<<<<<<<< @@ -41861,18 +41793,18 @@ static int __pyx_pw_9pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4166, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4170, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.Compiler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4169, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4170, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4171, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4173, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4174, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4175, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_8Compiler___cinit__(((struct __pyx_obj_9pywrapfst_Compiler *)__pyx_v_self), __pyx_v_fst_type, __pyx_v_arc_type, __pyx_v_isymbols, __pyx_v_osymbols, __pyx_v_ssymbols, __pyx_v_acceptor, __pyx_v_keep_isymbols, __pyx_v_keep_osymbols, __pyx_v_keep_state_numbering, __pyx_v_allow_negative_labels); - /* "pywrapfst.pyx":4166 + /* "pywrapfst.pyx":4170 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -41899,7 +41831,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C fst::SymbolTable *__pyx_t_5; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "pywrapfst.pyx":4177 + /* "pywrapfst.pyx":4181 * bool keep_state_numbering=False, * bool allow_negative_labels=False): * self._sstrm.reset(new stringstream()) # <<<<<<<<<<<<<< @@ -41908,45 +41840,45 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm"); - __PYX_ERR(0, 4177, __pyx_L1_error) + __PYX_ERR(0, 4181, __pyx_L1_error) } __pyx_v_self->_sstrm.reset(new std::stringstream()); - /* "pywrapfst.pyx":4178 + /* "pywrapfst.pyx":4182 * bool allow_negative_labels=False): * self._sstrm.reset(new stringstream()) * self._fst_type = tostring(fst_type) # <<<<<<<<<<<<<< * self._arc_type = tostring(arc_type) * self._isymbols = NULL */ - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4178, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4178, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst_type"); - __PYX_ERR(0, 4178, __pyx_L1_error) + __PYX_ERR(0, 4182, __pyx_L1_error) } __pyx_v_self->_fst_type = __pyx_t_2; - /* "pywrapfst.pyx":4179 + /* "pywrapfst.pyx":4183 * self._sstrm.reset(new stringstream()) * self._fst_type = tostring(fst_type) * self._arc_type = tostring(arc_type) # <<<<<<<<<<<<<< * self._isymbols = NULL * if isymbols is not None: */ - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4179, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4179, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc_type"); - __PYX_ERR(0, 4179, __pyx_L1_error) + __PYX_ERR(0, 4183, __pyx_L1_error) } __pyx_v_self->_arc_type = __pyx_t_2; - /* "pywrapfst.pyx":4180 + /* "pywrapfst.pyx":4184 * self._fst_type = tostring(fst_type) * self._arc_type = tostring(arc_type) * self._isymbols = NULL # <<<<<<<<<<<<<< @@ -41955,11 +41887,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols"); - __PYX_ERR(0, 4180, __pyx_L1_error) + __PYX_ERR(0, 4184, __pyx_L1_error) } __pyx_v_self->_isymbols = NULL; - /* "pywrapfst.pyx":4181 + /* "pywrapfst.pyx":4185 * self._arc_type = tostring(arc_type) * self._isymbols = NULL * if isymbols is not None: # <<<<<<<<<<<<<< @@ -41970,7 +41902,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "pywrapfst.pyx":4182 + /* "pywrapfst.pyx":4186 * self._isymbols = NULL * if isymbols is not None: * self._isymbols = isymbols._table # <<<<<<<<<<<<<< @@ -41979,16 +41911,16 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 4182, __pyx_L1_error) + __PYX_ERR(0, 4186, __pyx_L1_error) } __pyx_t_5 = __pyx_v_isymbols->__pyx_base.__pyx_base._table; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols"); - __PYX_ERR(0, 4182, __pyx_L1_error) + __PYX_ERR(0, 4186, __pyx_L1_error) } __pyx_v_self->_isymbols = __pyx_t_5; - /* "pywrapfst.pyx":4181 + /* "pywrapfst.pyx":4185 * self._arc_type = tostring(arc_type) * self._isymbols = NULL * if isymbols is not None: # <<<<<<<<<<<<<< @@ -41997,7 +41929,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ } - /* "pywrapfst.pyx":4183 + /* "pywrapfst.pyx":4187 * if isymbols is not None: * self._isymbols = isymbols._table * self._osymbols = NULL # <<<<<<<<<<<<<< @@ -42006,11 +41938,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols"); - __PYX_ERR(0, 4183, __pyx_L1_error) + __PYX_ERR(0, 4187, __pyx_L1_error) } __pyx_v_self->_osymbols = NULL; - /* "pywrapfst.pyx":4184 + /* "pywrapfst.pyx":4188 * self._isymbols = isymbols._table * self._osymbols = NULL * if osymbols is not None: # <<<<<<<<<<<<<< @@ -42021,7 +41953,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "pywrapfst.pyx":4185 + /* "pywrapfst.pyx":4189 * self._osymbols = NULL * if osymbols is not None: * self._osymbols = osymbols._table # <<<<<<<<<<<<<< @@ -42030,16 +41962,16 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 4185, __pyx_L1_error) + __PYX_ERR(0, 4189, __pyx_L1_error) } __pyx_t_5 = __pyx_v_osymbols->__pyx_base.__pyx_base._table; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols"); - __PYX_ERR(0, 4185, __pyx_L1_error) + __PYX_ERR(0, 4189, __pyx_L1_error) } __pyx_v_self->_osymbols = __pyx_t_5; - /* "pywrapfst.pyx":4184 + /* "pywrapfst.pyx":4188 * self._isymbols = isymbols._table * self._osymbols = NULL * if osymbols is not None: # <<<<<<<<<<<<<< @@ -42048,7 +41980,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ } - /* "pywrapfst.pyx":4186 + /* "pywrapfst.pyx":4190 * if osymbols is not None: * self._osymbols = osymbols._table * self._ssymbols = NULL # <<<<<<<<<<<<<< @@ -42057,11 +41989,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols"); - __PYX_ERR(0, 4186, __pyx_L1_error) + __PYX_ERR(0, 4190, __pyx_L1_error) } __pyx_v_self->_ssymbols = NULL; - /* "pywrapfst.pyx":4187 + /* "pywrapfst.pyx":4191 * self._osymbols = osymbols._table * self._ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -42072,7 +42004,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "pywrapfst.pyx":4188 + /* "pywrapfst.pyx":4192 * self._ssymbols = NULL * if ssymbols is not None: * self._ssymbols = ssymbols._table # <<<<<<<<<<<<<< @@ -42081,16 +42013,16 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 4188, __pyx_L1_error) + __PYX_ERR(0, 4192, __pyx_L1_error) } __pyx_t_5 = __pyx_v_ssymbols->__pyx_base.__pyx_base._table; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols"); - __PYX_ERR(0, 4188, __pyx_L1_error) + __PYX_ERR(0, 4192, __pyx_L1_error) } __pyx_v_self->_ssymbols = __pyx_t_5; - /* "pywrapfst.pyx":4187 + /* "pywrapfst.pyx":4191 * self._osymbols = osymbols._table * self._ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -42099,7 +42031,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ } - /* "pywrapfst.pyx":4189 + /* "pywrapfst.pyx":4193 * if ssymbols is not None: * self._ssymbols = ssymbols._table * self._acceptor = acceptor # <<<<<<<<<<<<<< @@ -42108,11 +42040,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_acceptor"); - __PYX_ERR(0, 4189, __pyx_L1_error) + __PYX_ERR(0, 4193, __pyx_L1_error) } __pyx_v_self->_acceptor = __pyx_v_acceptor; - /* "pywrapfst.pyx":4190 + /* "pywrapfst.pyx":4194 * self._ssymbols = ssymbols._table * self._acceptor = acceptor * self._keep_isymbols = keep_isymbols # <<<<<<<<<<<<<< @@ -42121,11 +42053,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_isymbols"); - __PYX_ERR(0, 4190, __pyx_L1_error) + __PYX_ERR(0, 4194, __pyx_L1_error) } __pyx_v_self->_keep_isymbols = __pyx_v_keep_isymbols; - /* "pywrapfst.pyx":4191 + /* "pywrapfst.pyx":4195 * self._acceptor = acceptor * self._keep_isymbols = keep_isymbols * self._keep_osymbols = keep_osymbols # <<<<<<<<<<<<<< @@ -42134,11 +42066,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_osymbols"); - __PYX_ERR(0, 4191, __pyx_L1_error) + __PYX_ERR(0, 4195, __pyx_L1_error) } __pyx_v_self->_keep_osymbols = __pyx_v_keep_osymbols; - /* "pywrapfst.pyx":4192 + /* "pywrapfst.pyx":4196 * self._keep_isymbols = keep_isymbols * self._keep_osymbols = keep_osymbols * self._keep_state_numbering = keep_state_numbering # <<<<<<<<<<<<<< @@ -42147,11 +42079,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_state_numbering"); - __PYX_ERR(0, 4192, __pyx_L1_error) + __PYX_ERR(0, 4196, __pyx_L1_error) } __pyx_v_self->_keep_state_numbering = __pyx_v_keep_state_numbering; - /* "pywrapfst.pyx":4193 + /* "pywrapfst.pyx":4197 * self._keep_osymbols = keep_osymbols * self._keep_state_numbering = keep_state_numbering * self._allow_negative_labels = allow_negative_labels # <<<<<<<<<<<<<< @@ -42160,11 +42092,11 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_allow_negative_labels"); - __PYX_ERR(0, 4193, __pyx_L1_error) + __PYX_ERR(0, 4197, __pyx_L1_error) } __pyx_v_self->_allow_negative_labels = __pyx_v_allow_negative_labels; - /* "pywrapfst.pyx":4166 + /* "pywrapfst.pyx":4170 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -42184,7 +42116,7 @@ static int __pyx_pf_9pywrapfst_8Compiler___cinit__(struct __pyx_obj_9pywrapfst_C return __pyx_r; } -/* "pywrapfst.pyx":4195 +/* "pywrapfst.pyx":4199 * self._allow_negative_labels = allow_negative_labels * * cpdef _Fst compile(self): # <<<<<<<<<<<<<< @@ -42207,13 +42139,12 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4195, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_8Compiler_3compile)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -42230,29 +42161,29 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4195, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 4195, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 4199, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4210 + /* "pywrapfst.pyx":4214 * """ * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<< @@ -42261,10 +42192,10 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm"); - __PYX_ERR(0, 4210, __pyx_L1_error) + __PYX_ERR(0, 4214, __pyx_L1_error) } - /* "pywrapfst.pyx":4211 + /* "pywrapfst.pyx":4215 * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.CompileFstInternal(deref(self._sstrm), * b"", self._fst_type, self._arc_type, self._isymbols, # <<<<<<<<<<<<<< @@ -42273,18 +42204,18 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst_type"); - __PYX_ERR(0, 4211, __pyx_L1_error) + __PYX_ERR(0, 4215, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc_type"); - __PYX_ERR(0, 4211, __pyx_L1_error) + __PYX_ERR(0, 4215, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols"); - __PYX_ERR(0, 4211, __pyx_L1_error) + __PYX_ERR(0, 4215, __pyx_L1_error) } - /* "pywrapfst.pyx":4212 + /* "pywrapfst.pyx":4216 * tfst.reset(fst.CompileFstInternal(deref(self._sstrm), * b"", self._fst_type, self._arc_type, self._isymbols, * self._osymbols, self._ssymbols, self._acceptor, self._keep_isymbols, # <<<<<<<<<<<<<< @@ -42293,22 +42224,22 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols"); - __PYX_ERR(0, 4212, __pyx_L1_error) + __PYX_ERR(0, 4216, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols"); - __PYX_ERR(0, 4212, __pyx_L1_error) + __PYX_ERR(0, 4216, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_acceptor"); - __PYX_ERR(0, 4212, __pyx_L1_error) + __PYX_ERR(0, 4216, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_isymbols"); - __PYX_ERR(0, 4212, __pyx_L1_error) + __PYX_ERR(0, 4216, __pyx_L1_error) } - /* "pywrapfst.pyx":4213 + /* "pywrapfst.pyx":4217 * b"", self._fst_type, self._arc_type, self._isymbols, * self._osymbols, self._ssymbols, self._acceptor, self._keep_isymbols, * self._keep_osymbols, self._keep_state_numbering, # <<<<<<<<<<<<<< @@ -42317,14 +42248,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_osymbols"); - __PYX_ERR(0, 4213, __pyx_L1_error) + __PYX_ERR(0, 4217, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_state_numbering"); - __PYX_ERR(0, 4213, __pyx_L1_error) + __PYX_ERR(0, 4217, __pyx_L1_error) } - /* "pywrapfst.pyx":4214 + /* "pywrapfst.pyx":4218 * self._osymbols, self._ssymbols, self._acceptor, self._keep_isymbols, * self._keep_osymbols, self._keep_state_numbering, * self._allow_negative_labels)) # <<<<<<<<<<<<<< @@ -42333,10 +42264,10 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_allow_negative_labels"); - __PYX_ERR(0, 4214, __pyx_L1_error) + __PYX_ERR(0, 4218, __pyx_L1_error) } - /* "pywrapfst.pyx":4210 + /* "pywrapfst.pyx":4214 * """ * cdef unique_ptr[fst.FstClass] tfst * tfst.reset(fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<< @@ -42345,7 +42276,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ __pyx_v_tfst.reset(fst::script::CompileFstInternal((*__pyx_v_self->_sstrm), __pyx_k_pywrapfst, __pyx_v_self->_fst_type, __pyx_v_self->_arc_type, __pyx_v_self->_isymbols, __pyx_v_self->_osymbols, __pyx_v_self->_ssymbols, __pyx_v_self->_acceptor, __pyx_v_self->_keep_isymbols, __pyx_v_self->_keep_osymbols, __pyx_v_self->_keep_state_numbering, __pyx_v_self->_allow_negative_labels)); - /* "pywrapfst.pyx":4215 + /* "pywrapfst.pyx":4219 * self._keep_osymbols, self._keep_state_numbering, * self._allow_negative_labels)) * self._sstrm.reset(new stringstream()) # <<<<<<<<<<<<<< @@ -42354,11 +42285,11 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm"); - __PYX_ERR(0, 4215, __pyx_L1_error) + __PYX_ERR(0, 4219, __pyx_L1_error) } __pyx_v_self->_sstrm.reset(new std::stringstream()); - /* "pywrapfst.pyx":4216 + /* "pywrapfst.pyx":4220 * self._allow_negative_labels)) * self._sstrm.reset(new stringstream()) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -42368,14 +42299,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st __pyx_t_5 = ((__pyx_v_tfst.get() == NULL) != 0); if (unlikely(__pyx_t_5)) { - /* "pywrapfst.pyx":4217 + /* "pywrapfst.pyx":4221 * self._sstrm.reset(new stringstream()) * if tfst.get() == NULL: * raise FstOpError("Compilation failed") # <<<<<<<<<<<<<< * return _init_XFst(tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4217, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -42389,14 +42320,14 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Compilation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Compilation_failed); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4217, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4217, __pyx_L1_error) + __PYX_ERR(0, 4221, __pyx_L1_error) - /* "pywrapfst.pyx":4216 + /* "pywrapfst.pyx":4220 * self._allow_negative_labels)) * self._sstrm.reset(new stringstream()) * if tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -42405,7 +42336,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st */ } - /* "pywrapfst.pyx":4218 + /* "pywrapfst.pyx":4222 * if tfst.get() == NULL: * raise FstOpError("Compilation failed") * return _init_XFst(tfst.release()) # <<<<<<<<<<<<<< @@ -42413,13 +42344,13 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_8Compiler_compile(st * cpdef void write(self, expression): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4218, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4195 + /* "pywrapfst.pyx":4199 * self._allow_negative_labels = allow_negative_labels * * cpdef _Fst compile(self): # <<<<<<<<<<<<<< @@ -42461,7 +42392,7 @@ static PyObject *__pyx_pf_9pywrapfst_8Compiler_2compile(struct __pyx_obj_9pywrap PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("compile", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_8Compiler_compile(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4195, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_8Compiler_compile(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -42478,7 +42409,7 @@ static PyObject *__pyx_pf_9pywrapfst_8Compiler_2compile(struct __pyx_obj_9pywrap return __pyx_r; } -/* "pywrapfst.pyx":4220 +/* "pywrapfst.pyx":4224 * return _init_XFst(tfst.release()) * * cpdef void write(self, expression): # <<<<<<<<<<<<<< @@ -42502,13 +42433,12 @@ static void __pyx_f_9pywrapfst_8Compiler_write(struct __pyx_obj_9pywrapfst_Compi if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4220, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_8Compiler_5write)) { __Pyx_INCREF(__pyx_t_1); @@ -42524,37 +42454,37 @@ static void __pyx_f_9pywrapfst_8Compiler_write(struct __pyx_obj_9pywrapfst_Compi } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_expression) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_expression); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4220, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4236 + /* "pywrapfst.pyx":4240 * expression: A string expression to add to compiler string buffer. * """ * cdef string line = tostring(expression) # <<<<<<<<<<<<<< * if not line.empty() and line.back() != b'\n': * line.append(b'\n') */ - __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_expression); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4236, __pyx_L1_error) + __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_expression); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4240, __pyx_L1_error) __pyx_v_line = __pyx_t_5; - /* "pywrapfst.pyx":4237 + /* "pywrapfst.pyx":4241 * """ * cdef string line = tostring(expression) * if not line.empty() and line.back() != b'\n': # <<<<<<<<<<<<<< @@ -42572,7 +42502,7 @@ static void __pyx_f_9pywrapfst_8Compiler_write(struct __pyx_obj_9pywrapfst_Compi __pyx_L4_bool_binop_done:; if (__pyx_t_6) { - /* "pywrapfst.pyx":4238 + /* "pywrapfst.pyx":4242 * cdef string line = tostring(expression) * if not line.empty() and line.back() != b'\n': * line.append(b'\n') # <<<<<<<<<<<<<< @@ -42581,7 +42511,7 @@ static void __pyx_f_9pywrapfst_8Compiler_write(struct __pyx_obj_9pywrapfst_Compi */ (void)(__pyx_v_line.append(((char const *)"\n"))); - /* "pywrapfst.pyx":4237 + /* "pywrapfst.pyx":4241 * """ * cdef string line = tostring(expression) * if not line.empty() and line.back() != b'\n': # <<<<<<<<<<<<<< @@ -42590,7 +42520,7 @@ static void __pyx_f_9pywrapfst_8Compiler_write(struct __pyx_obj_9pywrapfst_Compi */ } - /* "pywrapfst.pyx":4239 + /* "pywrapfst.pyx":4243 * if not line.empty() and line.back() != b'\n': * line.append(b'\n') * deref(self._sstrm) << line # <<<<<<<<<<<<<< @@ -42599,11 +42529,11 @@ static void __pyx_f_9pywrapfst_8Compiler_write(struct __pyx_obj_9pywrapfst_Compi */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm"); - __PYX_ERR(0, 4239, __pyx_L1_error) + __PYX_ERR(0, 4243, __pyx_L1_error) } (void)(((*__pyx_v_self->_sstrm) << __pyx_v_line)); - /* "pywrapfst.pyx":4220 + /* "pywrapfst.pyx":4224 * return _init_XFst(tfst.release()) * * cpdef void write(self, expression): # <<<<<<<<<<<<<< @@ -42643,7 +42573,7 @@ static PyObject *__pyx_pf_9pywrapfst_8Compiler_4write(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("write", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_8Compiler_write(__pyx_v_self, __pyx_v_expression, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4220, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_8Compiler_write(__pyx_v_self, __pyx_v_expression, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -42767,7 +42697,7 @@ static PyObject *__pyx_pf_9pywrapfst_8Compiler_8__setstate_cython__(CYTHON_UNUSE return __pyx_r; } -/* "pywrapfst.pyx":4261 +/* "pywrapfst.pyx":4265 * """ * * def __init__(self): # <<<<<<<<<<<<<< @@ -42802,28 +42732,28 @@ static int __pyx_pf_9pywrapfst_9FarReader___init__(struct __pyx_obj_9pywrapfst_F PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":4262 + /* "pywrapfst.pyx":4266 * * def __init__(self): * raise FstDeletedConstructorError( # <<<<<<<<<<<<<< * "Cannot construct {}".format(self.__class__.__name__)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4262, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":4263 + /* "pywrapfst.pyx":4267 * def __init__(self): * raise FstDeletedConstructorError( * "Cannot construct {}".format(self.__class__.__name__)) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4263, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4263, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4263, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -42839,7 +42769,7 @@ static int __pyx_pf_9pywrapfst_9FarReader___init__(struct __pyx_obj_9pywrapfst_F __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4263, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -42855,14 +42785,14 @@ static int __pyx_pf_9pywrapfst_9FarReader___init__(struct __pyx_obj_9pywrapfst_F __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4262, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4262, __pyx_L1_error) + __PYX_ERR(0, 4266, __pyx_L1_error) - /* "pywrapfst.pyx":4261 + /* "pywrapfst.pyx":4265 * """ * * def __init__(self): # <<<<<<<<<<<<<< @@ -42884,7 +42814,7 @@ static int __pyx_pf_9pywrapfst_9FarReader___init__(struct __pyx_obj_9pywrapfst_F return __pyx_r; } -/* "pywrapfst.pyx":4265 +/* "pywrapfst.pyx":4269 * "Cannot construct {}".format(self.__class__.__name__)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -42917,7 +42847,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":4266 + /* "pywrapfst.pyx":4270 * * def __repr__(self): * return "<{} FarReader at 0x{:x}>".format(self.far_type(), id(self)) # <<<<<<<<<<<<<< @@ -42925,15 +42855,15 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_FarReader_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_FarReader_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "far_type"); - __PYX_ERR(0, 4266, __pyx_L1_error) + __PYX_ERR(0, 4270, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -42950,7 +42880,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4270, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -42960,7 +42890,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4270, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -42968,7 +42898,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -42979,7 +42909,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -42988,7 +42918,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4265 + /* "pywrapfst.pyx":4269 * "Cannot construct {}".format(self.__class__.__name__)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -43012,7 +42942,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_2__repr__(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":4269 +/* "pywrapfst.pyx":4273 * * @classmethod * def open(cls, *filenames): # <<<<<<<<<<<<<< @@ -43056,7 +42986,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("open", 0); - /* "pywrapfst.pyx":4288 + /* "pywrapfst.pyx":4292 * """ * cdef vector[string] filename_strings * for filename in filenames: # <<<<<<<<<<<<<< @@ -43067,30 +42997,30 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4288, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4292, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4288, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_filename, __pyx_t_3); __pyx_t_3 = 0; - /* "pywrapfst.pyx":4289 + /* "pywrapfst.pyx":4293 * cdef vector[string] filename_strings * for filename in filenames: * filename_strings.push_back(tostring(filename)) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.FarReaderClass] tfar * tfar.reset(fst.FarReaderClass.Open(filename_strings)) */ - __pyx_t_4 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4289, __pyx_L1_error) + __pyx_t_4 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4293, __pyx_L1_error) try { __pyx_v_filename_strings.push_back(__pyx_t_4); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 4289, __pyx_L1_error) + __PYX_ERR(0, 4293, __pyx_L1_error) } - /* "pywrapfst.pyx":4288 + /* "pywrapfst.pyx":4292 * """ * cdef vector[string] filename_strings * for filename in filenames: # <<<<<<<<<<<<<< @@ -43100,7 +43030,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":4291 + /* "pywrapfst.pyx":4295 * filename_strings.push_back(tostring(filename)) * cdef unique_ptr[fst.FarReaderClass] tfar * tfar.reset(fst.FarReaderClass.Open(filename_strings)) # <<<<<<<<<<<<<< @@ -43109,7 +43039,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject */ __pyx_v_tfar.reset(fst::script::FarReaderClass::Open(__pyx_v_filename_strings)); - /* "pywrapfst.pyx":4292 + /* "pywrapfst.pyx":4296 * cdef unique_ptr[fst.FarReaderClass] tfar * tfar.reset(fst.FarReaderClass.Open(filename_strings)) * if tfar.get() == NULL: # <<<<<<<<<<<<<< @@ -43119,16 +43049,16 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject __pyx_t_5 = ((__pyx_v_tfar.get() == NULL) != 0); if (unlikely(__pyx_t_5)) { - /* "pywrapfst.pyx":4293 + /* "pywrapfst.pyx":4297 * tfar.reset(fst.FarReaderClass.Open(filename_strings)) * if tfar.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filenames)) # <<<<<<<<<<<<<< * cdef FarReader result = FarReader.__new__(FarReader) * result._reader.reset(tfar.release()) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4293, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4293, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -43142,7 +43072,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_filenames) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_filenames); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4293, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -43158,14 +43088,14 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4293, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4293, __pyx_L1_error) + __PYX_ERR(0, 4297, __pyx_L1_error) - /* "pywrapfst.pyx":4292 + /* "pywrapfst.pyx":4296 * cdef unique_ptr[fst.FarReaderClass] tfar * tfar.reset(fst.FarReaderClass.Open(filename_strings)) * if tfar.get() == NULL: # <<<<<<<<<<<<<< @@ -43174,19 +43104,19 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject */ } - /* "pywrapfst.pyx":4294 + /* "pywrapfst.pyx":4298 * if tfar.get() == NULL: * raise FstIOError("Read failed: {!r}".format(filenames)) * cdef FarReader result = FarReader.__new__(FarReader) # <<<<<<<<<<<<<< * result._reader.reset(tfar.release()) * return result */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarReader(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarReader), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4294, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarReader(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarReader), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4298, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_FarReader *)__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":4295 + /* "pywrapfst.pyx":4299 * raise FstIOError("Read failed: {!r}".format(filenames)) * cdef FarReader result = FarReader.__new__(FarReader) * result._reader.reset(tfar.release()) # <<<<<<<<<<<<<< @@ -43195,11 +43125,11 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4295, __pyx_L1_error) + __PYX_ERR(0, 4299, __pyx_L1_error) } __pyx_v_result->_reader.reset(__pyx_v_tfar.release()); - /* "pywrapfst.pyx":4296 + /* "pywrapfst.pyx":4300 * cdef FarReader result = FarReader.__new__(FarReader) * result._reader.reset(tfar.release()) * return result # <<<<<<<<<<<<<< @@ -43211,7 +43141,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "pywrapfst.pyx":4269 + /* "pywrapfst.pyx":4273 * * @classmethod * def open(cls, *filenames): # <<<<<<<<<<<<<< @@ -43236,7 +43166,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_4open(CYTHON_UNUSED PyTypeObject return __pyx_r; } -/* "pywrapfst.pyx":4298 +/* "pywrapfst.pyx":4302 * return result * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -43258,13 +43188,12 @@ static std::string __pyx_f_9pywrapfst_9FarReader_arc_type(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4298, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_7arc_type)) { __Pyx_INCREF(__pyx_t_1); @@ -43280,29 +43209,29 @@ static std::string __pyx_f_9pywrapfst_9FarReader_arc_type(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4298, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4304 + /* "pywrapfst.pyx":4308 * Returns a string indicating the arc type. * """ * return self._reader.get().ArcType() # <<<<<<<<<<<<<< @@ -43311,12 +43240,12 @@ static std::string __pyx_f_9pywrapfst_9FarReader_arc_type(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4304, __pyx_L1_error) + __PYX_ERR(0, 4308, __pyx_L1_error) } __pyx_r = __pyx_v_self->_reader.get()->ArcType(); goto __pyx_L0; - /* "pywrapfst.pyx":4298 + /* "pywrapfst.pyx":4302 * return result * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -43357,7 +43286,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_6arc_type(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("arc_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4298, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -43374,7 +43303,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_6arc_type(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":4306 +/* "pywrapfst.pyx":4310 * return self._reader.get().ArcType() * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -43396,13 +43325,12 @@ static bool __pyx_f_9pywrapfst_9FarReader_done(struct __pyx_obj_9pywrapfst_FarRe if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_9done)) { __Pyx_INCREF(__pyx_t_1); @@ -43418,29 +43346,29 @@ static bool __pyx_f_9pywrapfst_9FarReader_done(struct __pyx_obj_9pywrapfst_FarRe } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4306, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4306, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4315 + /* "pywrapfst.pyx":4319 * True if the iterator is exhausted, False otherwise. * """ * return self._reader.get().Done() # <<<<<<<<<<<<<< @@ -43449,12 +43377,12 @@ static bool __pyx_f_9pywrapfst_9FarReader_done(struct __pyx_obj_9pywrapfst_FarRe */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4315, __pyx_L1_error) + __PYX_ERR(0, 4319, __pyx_L1_error) } __pyx_r = __pyx_v_self->_reader.get()->Done(); goto __pyx_L0; - /* "pywrapfst.pyx":4306 + /* "pywrapfst.pyx":4310 * return self._reader.get().ArcType() * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -43495,7 +43423,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_8done(struct __pyx_obj_9pywrapfs PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("done", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -43512,7 +43440,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_8done(struct __pyx_obj_9pywrapfs return __pyx_r; } -/* "pywrapfst.pyx":4317 +/* "pywrapfst.pyx":4321 * return self._reader.get().Done() * * cpdef bool error(self): # <<<<<<<<<<<<<< @@ -43534,13 +43462,12 @@ static bool __pyx_f_9pywrapfst_9FarReader_error(struct __pyx_obj_9pywrapfst_FarR if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4317, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_11error)) { __Pyx_INCREF(__pyx_t_1); @@ -43556,29 +43483,29 @@ static bool __pyx_f_9pywrapfst_9FarReader_error(struct __pyx_obj_9pywrapfst_FarR } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4317, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4317, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4326 + /* "pywrapfst.pyx":4330 * True if the FarReader is in an errorful state, False otherwise. * """ * return self._reader.get().Error() # <<<<<<<<<<<<<< @@ -43587,12 +43514,12 @@ static bool __pyx_f_9pywrapfst_9FarReader_error(struct __pyx_obj_9pywrapfst_FarR */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4326, __pyx_L1_error) + __PYX_ERR(0, 4330, __pyx_L1_error) } __pyx_r = __pyx_v_self->_reader.get()->Error(); goto __pyx_L0; - /* "pywrapfst.pyx":4317 + /* "pywrapfst.pyx":4321 * return self._reader.get().Done() * * cpdef bool error(self): # <<<<<<<<<<<<<< @@ -43633,7 +43560,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_10error(struct __pyx_obj_9pywrap PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("error", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4317, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -43650,7 +43577,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_10error(struct __pyx_obj_9pywrap return __pyx_r; } -/* "pywrapfst.pyx":4328 +/* "pywrapfst.pyx":4332 * return self._reader.get().Error() * * cpdef string far_type(self): # <<<<<<<<<<<<<< @@ -43672,13 +43599,12 @@ static std::string __pyx_f_9pywrapfst_9FarReader_far_type(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4328, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_13far_type)) { __Pyx_INCREF(__pyx_t_1); @@ -43694,29 +43620,29 @@ static std::string __pyx_f_9pywrapfst_9FarReader_far_type(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4328, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4328, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4329 + /* "pywrapfst.pyx":4333 * * cpdef string far_type(self): * return fst.GetFarTypeString(self._reader.get().Type()) # <<<<<<<<<<<<<< @@ -43725,12 +43651,12 @@ static std::string __pyx_f_9pywrapfst_9FarReader_far_type(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4329, __pyx_L1_error) + __PYX_ERR(0, 4333, __pyx_L1_error) } __pyx_r = fst::GetFarTypeString(__pyx_v_self->_reader.get()->Type()); goto __pyx_L0; - /* "pywrapfst.pyx":4328 + /* "pywrapfst.pyx":4332 * return self._reader.get().Error() * * cpdef string far_type(self): # <<<<<<<<<<<<<< @@ -43770,7 +43696,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_12far_type(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("far_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4328, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -43787,7 +43713,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_12far_type(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":4331 +/* "pywrapfst.pyx":4335 * return fst.GetFarTypeString(self._reader.get().Type()) * * cpdef bool find(self, key) except *: # <<<<<<<<<<<<<< @@ -43810,13 +43736,12 @@ static bool __pyx_f_9pywrapfst_9FarReader_find(struct __pyx_obj_9pywrapfst_FarRe if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4331, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_15find)) { __Pyx_INCREF(__pyx_t_1); @@ -43832,29 +43757,29 @@ static bool __pyx_f_9pywrapfst_9FarReader_find(struct __pyx_obj_9pywrapfst_FarRe } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4331, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4331, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4344 + /* "pywrapfst.pyx":4348 * True if the key was found, False otherwise. * """ * return self._reader.get().Find(tostring(key)) # <<<<<<<<<<<<<< @@ -43863,13 +43788,13 @@ static bool __pyx_f_9pywrapfst_9FarReader_find(struct __pyx_obj_9pywrapfst_FarRe */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4344, __pyx_L1_error) + __PYX_ERR(0, 4348, __pyx_L1_error) } - __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4344, __pyx_L1_error) + __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4348, __pyx_L1_error) __pyx_r = __pyx_v_self->_reader.get()->Find(__pyx_t_6); goto __pyx_L0; - /* "pywrapfst.pyx":4331 + /* "pywrapfst.pyx":4335 * return fst.GetFarTypeString(self._reader.get().Type()) * * cpdef bool find(self, key) except *: # <<<<<<<<<<<<<< @@ -43911,8 +43836,8 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_14find(struct __pyx_obj_9pywrapf PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("find", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_9pywrapfst_9FarReader_find(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4331, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4331, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_9FarReader_find(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -43929,7 +43854,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_14find(struct __pyx_obj_9pywrapf return __pyx_r; } -/* "pywrapfst.pyx":4346 +/* "pywrapfst.pyx":4350 * return self._reader.get().Find(tostring(key)) * * cpdef _Fst get_fst(self): # <<<<<<<<<<<<<< @@ -43950,13 +43875,12 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_9FarReader_get_fst(s if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4346, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_17get_fst)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -43973,29 +43897,29 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_9FarReader_get_fst(s } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4346, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 4346, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 4350, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4355 + /* "pywrapfst.pyx":4359 * A copy of the FST at the current position. * """ * return _init_XFst(new fst.FstClass( # <<<<<<<<<<<<<< @@ -44004,7 +43928,7 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_9FarReader_get_fst(s */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - /* "pywrapfst.pyx":4356 + /* "pywrapfst.pyx":4360 * """ * return _init_XFst(new fst.FstClass( * deref(self._reader.get().GetFstClass()))) # <<<<<<<<<<<<<< @@ -44013,23 +43937,23 @@ static struct __pyx_obj_9pywrapfst__Fst *__pyx_f_9pywrapfst_9FarReader_get_fst(s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4356, __pyx_L1_error) + __PYX_ERR(0, 4360, __pyx_L1_error) } - /* "pywrapfst.pyx":4355 + /* "pywrapfst.pyx":4359 * A copy of the FST at the current position. * """ * return _init_XFst(new fst.FstClass( # <<<<<<<<<<<<<< * deref(self._reader.get().GetFstClass()))) * */ - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_reader.get()->GetFstClass())))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4355, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_reader.get()->GetFstClass())))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4346 + /* "pywrapfst.pyx":4350 * return self._reader.get().Find(tostring(key)) * * cpdef _Fst get_fst(self): # <<<<<<<<<<<<<< @@ -44071,7 +43995,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_16get_fst(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_fst", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_9FarReader_get_fst(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4346, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_9FarReader_get_fst(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44088,7 +44012,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_16get_fst(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":4358 +/* "pywrapfst.pyx":4362 * deref(self._reader.get().GetFstClass()))) * * cpdef string get_key(self): # <<<<<<<<<<<<<< @@ -44110,13 +44034,12 @@ static std::string __pyx_f_9pywrapfst_9FarReader_get_key(struct __pyx_obj_9pywra if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4358, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_19get_key)) { __Pyx_INCREF(__pyx_t_1); @@ -44132,29 +44055,29 @@ static std::string __pyx_f_9pywrapfst_9FarReader_get_key(struct __pyx_obj_9pywra } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4358, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4358, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4367 + /* "pywrapfst.pyx":4371 * The string key at the current position. * """ * return self._reader.get().GetKey() # <<<<<<<<<<<<<< @@ -44163,12 +44086,12 @@ static std::string __pyx_f_9pywrapfst_9FarReader_get_key(struct __pyx_obj_9pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4367, __pyx_L1_error) + __PYX_ERR(0, 4371, __pyx_L1_error) } __pyx_r = __pyx_v_self->_reader.get()->GetKey(); goto __pyx_L0; - /* "pywrapfst.pyx":4358 + /* "pywrapfst.pyx":4362 * deref(self._reader.get().GetFstClass()))) * * cpdef string get_key(self): # <<<<<<<<<<<<<< @@ -44209,7 +44132,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_18get_key(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_key", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_get_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4358, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_get_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44226,7 +44149,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_18get_key(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":4369 +/* "pywrapfst.pyx":4373 * return self._reader.get().GetKey() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -44246,13 +44169,12 @@ static void __pyx_f_9pywrapfst_9FarReader_next(struct __pyx_obj_9pywrapfst_FarRe if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4369, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_21next)) { __Pyx_INCREF(__pyx_t_1); @@ -44268,27 +44190,27 @@ static void __pyx_f_9pywrapfst_9FarReader_next(struct __pyx_obj_9pywrapfst_FarRe } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4369, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4375 + /* "pywrapfst.pyx":4379 * Advances the iterator. * """ * self._reader.get().Next() # <<<<<<<<<<<<<< @@ -44297,11 +44219,11 @@ static void __pyx_f_9pywrapfst_9FarReader_next(struct __pyx_obj_9pywrapfst_FarRe */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4375, __pyx_L1_error) + __PYX_ERR(0, 4379, __pyx_L1_error) } __pyx_v_self->_reader.get()->Next(); - /* "pywrapfst.pyx":4369 + /* "pywrapfst.pyx":4373 * return self._reader.get().GetKey() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -44341,7 +44263,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_20next(struct __pyx_obj_9pywrapf PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("next", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4369, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44358,7 +44280,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_20next(struct __pyx_obj_9pywrapf return __pyx_r; } -/* "pywrapfst.pyx":4377 +/* "pywrapfst.pyx":4381 * self._reader.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -44378,13 +44300,12 @@ static void __pyx_f_9pywrapfst_9FarReader_reset(struct __pyx_obj_9pywrapfst_FarR if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4377, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_23reset)) { __Pyx_INCREF(__pyx_t_1); @@ -44400,27 +44321,27 @@ static void __pyx_f_9pywrapfst_9FarReader_reset(struct __pyx_obj_9pywrapfst_FarR } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4377, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4383 + /* "pywrapfst.pyx":4387 * Resets the iterator to the initial position. * """ * self._reader.get().Reset() # <<<<<<<<<<<<<< @@ -44429,11 +44350,11 @@ static void __pyx_f_9pywrapfst_9FarReader_reset(struct __pyx_obj_9pywrapfst_FarR */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4383, __pyx_L1_error) + __PYX_ERR(0, 4387, __pyx_L1_error) } __pyx_v_self->_reader.get()->Reset(); - /* "pywrapfst.pyx":4377 + /* "pywrapfst.pyx":4381 * self._reader.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -44473,7 +44394,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_22reset(struct __pyx_obj_9pywrap PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reset", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4377, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44490,7 +44411,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_22reset(struct __pyx_obj_9pywrap return __pyx_r; } -/* "pywrapfst.pyx":4385 +/* "pywrapfst.pyx":4389 * self._reader.get().Reset() * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -44519,7 +44440,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_24__getitem__(struct __pyx_obj_9 PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "pywrapfst.pyx":4386 + /* "pywrapfst.pyx":4390 * * def __getitem__(self, key): * if self._reader.get().Find(tostring(key)): # <<<<<<<<<<<<<< @@ -44528,13 +44449,13 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_24__getitem__(struct __pyx_obj_9 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 4386, __pyx_L1_error) + __PYX_ERR(0, 4390, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4390, __pyx_L1_error) __pyx_t_2 = (__pyx_v_self->_reader.get()->Find(__pyx_t_1) != 0); if (likely(__pyx_t_2)) { - /* "pywrapfst.pyx":4387 + /* "pywrapfst.pyx":4391 * def __getitem__(self, key): * if self._reader.get().Find(tostring(key)): * return self.get_fst() # <<<<<<<<<<<<<< @@ -44544,15 +44465,15 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_24__getitem__(struct __pyx_obj_9 __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_fst"); - __PYX_ERR(0, 4387, __pyx_L1_error) + __PYX_ERR(0, 4391, __pyx_L1_error) } - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4387, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4386 + /* "pywrapfst.pyx":4390 * * def __getitem__(self, key): * if self._reader.get().Find(tostring(key)): # <<<<<<<<<<<<<< @@ -44561,7 +44482,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_24__getitem__(struct __pyx_obj_9 */ } - /* "pywrapfst.pyx":4389 + /* "pywrapfst.pyx":4393 * return self.get_fst() * else: * raise KeyError(key) # <<<<<<<<<<<<<< @@ -44569,14 +44490,14 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_24__getitem__(struct __pyx_obj_9 * */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4389, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 4389, __pyx_L1_error) + __PYX_ERR(0, 4393, __pyx_L1_error) } - /* "pywrapfst.pyx":4385 + /* "pywrapfst.pyx":4389 * self._reader.get().Reset() * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -44702,7 +44623,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarReader_28__setstate_cython__(CYTHON_UNU return __pyx_r; } -/* "pywrapfst.pyx":4412 +/* "pywrapfst.pyx":4416 * """ * * def __init__(self): # <<<<<<<<<<<<<< @@ -44737,28 +44658,28 @@ static int __pyx_pf_9pywrapfst_9FarWriter___init__(struct __pyx_obj_9pywrapfst_F PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "pywrapfst.pyx":4413 + /* "pywrapfst.pyx":4417 * * def __init__(self): * raise FstDeletedConstructorError( # <<<<<<<<<<<<<< * "Cannot construct {}".format(self.__class__.__name__)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4413, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":4414 + /* "pywrapfst.pyx":4418 * def __init__(self): * raise FstDeletedConstructorError( * "Cannot construct {}".format(self.__class__.__name__)) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4414, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4414, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4414, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -44774,7 +44695,7 @@ static int __pyx_pf_9pywrapfst_9FarWriter___init__(struct __pyx_obj_9pywrapfst_F __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4414, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -44790,14 +44711,14 @@ static int __pyx_pf_9pywrapfst_9FarWriter___init__(struct __pyx_obj_9pywrapfst_F __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4413, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4413, __pyx_L1_error) + __PYX_ERR(0, 4417, __pyx_L1_error) - /* "pywrapfst.pyx":4412 + /* "pywrapfst.pyx":4416 * """ * * def __init__(self): # <<<<<<<<<<<<<< @@ -44819,7 +44740,7 @@ static int __pyx_pf_9pywrapfst_9FarWriter___init__(struct __pyx_obj_9pywrapfst_F return __pyx_r; } -/* "pywrapfst.pyx":4416 +/* "pywrapfst.pyx":4420 * "Cannot construct {}".format(self.__class__.__name__)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -44852,7 +44773,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pywrapfst.pyx":4417 + /* "pywrapfst.pyx":4421 * * def __repr__(self): * return "<{} FarWriter at 0x{:x}>".format(self.far_type(), id(self)) # <<<<<<<<<<<<<< @@ -44860,15 +44781,15 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_FarWriter_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4417, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_FarWriter_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "far_type"); - __PYX_ERR(0, 4417, __pyx_L1_error) + __PYX_ERR(0, 4421, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4417, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4417, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -44885,7 +44806,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4421, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -44895,7 +44816,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4421, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -44903,7 +44824,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4417, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -44914,7 +44835,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -44923,7 +44844,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr __pyx_t_1 = 0; goto __pyx_L0; - /* "pywrapfst.pyx":4416 + /* "pywrapfst.pyx":4420 * "Cannot construct {}".format(self.__class__.__name__)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -44947,7 +44868,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_2__repr__(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":4420 +/* "pywrapfst.pyx":4424 * * @classmethod * def create(cls, filename, arc_type=b"standard", far_type=b"default"): # <<<<<<<<<<<<<< @@ -45002,7 +44923,7 @@ static PyObject *__pyx_pw_9pywrapfst_9FarWriter_5create(PyObject *__pyx_v_cls, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 4420, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 4424, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -45021,7 +44942,7 @@ static PyObject *__pyx_pw_9pywrapfst_9FarWriter_5create(PyObject *__pyx_v_cls, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("create", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4420, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("create", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4424, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.FarWriter.create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -45050,27 +44971,27 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("create", 0); - /* "pywrapfst.pyx":4441 + /* "pywrapfst.pyx":4445 * FstIOError: Read failed. * """ * cdef fst.FarType ft = fst.GetFarType(tostring(far_type)) # <<<<<<<<<<<<<< * cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create( * tostring(filename), tostring(arc_type), ft) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_far_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4441, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_far_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4445, __pyx_L1_error) __pyx_v_ft = fst::script::GetFarType(__pyx_t_1); - /* "pywrapfst.pyx":4443 + /* "pywrapfst.pyx":4447 * cdef fst.FarType ft = fst.GetFarType(tostring(far_type)) * cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create( * tostring(filename), tostring(arc_type), ft) # <<<<<<<<<<<<<< * if tfar == NULL: * raise FstIOError("Open failed: {!r}".format(filename)) */ - __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4443, __pyx_L1_error) - __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4443, __pyx_L1_error) + __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4447, __pyx_L1_error) + __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4447, __pyx_L1_error) - /* "pywrapfst.pyx":4442 + /* "pywrapfst.pyx":4446 * """ * cdef fst.FarType ft = fst.GetFarType(tostring(far_type)) * cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create( # <<<<<<<<<<<<<< @@ -45079,7 +45000,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje */ __pyx_v_tfar = fst::script::FarWriterClass::Create(__pyx_t_1, __pyx_t_2, __pyx_v_ft); - /* "pywrapfst.pyx":4444 + /* "pywrapfst.pyx":4448 * cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create( * tostring(filename), tostring(arc_type), ft) * if tfar == NULL: # <<<<<<<<<<<<<< @@ -45089,16 +45010,16 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje __pyx_t_3 = ((__pyx_v_tfar == NULL) != 0); if (unlikely(__pyx_t_3)) { - /* "pywrapfst.pyx":4445 + /* "pywrapfst.pyx":4449 * tostring(filename), tostring(arc_type), ft) * if tfar == NULL: * raise FstIOError("Open failed: {!r}".format(filename)) # <<<<<<<<<<<<<< * cdef FarWriter result = FarWriter.__new__(FarWriter) * result._writer.reset(tfar) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4445, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Open_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4445, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Open_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -45112,7 +45033,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4445, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -45128,14 +45049,14 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4445, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 4445, __pyx_L1_error) + __PYX_ERR(0, 4449, __pyx_L1_error) - /* "pywrapfst.pyx":4444 + /* "pywrapfst.pyx":4448 * cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create( * tostring(filename), tostring(arc_type), ft) * if tfar == NULL: # <<<<<<<<<<<<<< @@ -45144,19 +45065,19 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje */ } - /* "pywrapfst.pyx":4446 + /* "pywrapfst.pyx":4450 * if tfar == NULL: * raise FstIOError("Open failed: {!r}".format(filename)) * cdef FarWriter result = FarWriter.__new__(FarWriter) # <<<<<<<<<<<<<< * result._writer.reset(tfar) * return result */ - __pyx_t_4 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarWriter(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarWriter), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4446, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarWriter(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarWriter), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4450, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_v_result = ((struct __pyx_obj_9pywrapfst_FarWriter *)__pyx_t_4); __pyx_t_4 = 0; - /* "pywrapfst.pyx":4447 + /* "pywrapfst.pyx":4451 * raise FstIOError("Open failed: {!r}".format(filename)) * cdef FarWriter result = FarWriter.__new__(FarWriter) * result._writer.reset(tfar) # <<<<<<<<<<<<<< @@ -45165,11 +45086,11 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 4447, __pyx_L1_error) + __PYX_ERR(0, 4451, __pyx_L1_error) } __pyx_v_result->_writer.reset(__pyx_v_tfar); - /* "pywrapfst.pyx":4448 + /* "pywrapfst.pyx":4452 * cdef FarWriter result = FarWriter.__new__(FarWriter) * result._writer.reset(tfar) * return result # <<<<<<<<<<<<<< @@ -45181,7 +45102,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "pywrapfst.pyx":4420 + /* "pywrapfst.pyx":4424 * * @classmethod * def create(cls, filename, arc_type=b"standard", far_type=b"default"): # <<<<<<<<<<<<<< @@ -45205,7 +45126,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_4create(CYTHON_UNUSED PyTypeObje return __pyx_r; } -/* "pywrapfst.pyx":4452 +/* "pywrapfst.pyx":4456 * # NB: Invoking this method may be dangerous: calling any other method on the * # instance after this is invoked may result in a null dereference. * cdef void close(self): # <<<<<<<<<<<<<< @@ -45217,7 +45138,7 @@ static void __pyx_f_9pywrapfst_9FarWriter_close(struct __pyx_obj_9pywrapfst_FarW __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close", 0); - /* "pywrapfst.pyx":4453 + /* "pywrapfst.pyx":4457 * # instance after this is invoked may result in a null dereference. * cdef void close(self): * self._writer.reset() # <<<<<<<<<<<<<< @@ -45226,11 +45147,11 @@ static void __pyx_f_9pywrapfst_9FarWriter_close(struct __pyx_obj_9pywrapfst_FarW */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 4453, __pyx_L1_error) + __PYX_ERR(0, 4457, __pyx_L1_error) } __pyx_v_self->_writer.reset(); - /* "pywrapfst.pyx":4452 + /* "pywrapfst.pyx":4456 * # NB: Invoking this method may be dangerous: calling any other method on the * # instance after this is invoked may result in a null dereference. * cdef void close(self): # <<<<<<<<<<<<<< @@ -45246,7 +45167,7 @@ static void __pyx_f_9pywrapfst_9FarWriter_close(struct __pyx_obj_9pywrapfst_FarW __Pyx_RefNannyFinishContext(); } -/* "pywrapfst.pyx":4455 +/* "pywrapfst.pyx":4459 * self._writer.reset() * * cpdef void add(self, key, _Fst ifst) except *: # <<<<<<<<<<<<<< @@ -45270,13 +45191,12 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4455, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_7add)) { __Pyx_INCREF(__pyx_t_1); @@ -45295,7 +45215,7 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_key, ((PyObject *)__pyx_v_ifst)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4455, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4459, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -45303,13 +45223,13 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_key, ((PyObject *)__pyx_v_ifst)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4455, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4459, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4455, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -45320,7 +45240,7 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri __Pyx_INCREF(((PyObject *)__pyx_v_ifst)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ifst)); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_ifst)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4455, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -45329,20 +45249,20 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4474 + /* "pywrapfst.pyx":4478 * # Failure here results from passing an FST with a different arc type than * # used by the FAR was initialized to use. * if not self._writer.get().Add(tostring(key), deref(ifst._fst)): # <<<<<<<<<<<<<< @@ -45351,24 +45271,24 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 4474, __pyx_L1_error) + __PYX_ERR(0, 4478, __pyx_L1_error) } - __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4474, __pyx_L1_error) + __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4478, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4474, __pyx_L1_error) + __PYX_ERR(0, 4478, __pyx_L1_error) } __pyx_t_8 = ((!(__pyx_v_self->_writer.get()->Add(__pyx_t_7, (*__pyx_v_ifst->_fst)) != 0)) != 0); if (unlikely(__pyx_t_8)) { - /* "pywrapfst.pyx":4475 + /* "pywrapfst.pyx":4479 * # used by the FAR was initialized to use. * if not self._writer.get().Add(tostring(key), deref(ifst._fst)): * raise FstOpError("Incompatible or invalid arc type") # <<<<<<<<<<<<<< * # An error here usually indicates a key out of order. * if self._writer.get().Error(): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4475, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -45382,14 +45302,14 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Incompatible_or_invalid_arc_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Incompatible_or_invalid_arc_type); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4475, __pyx_L1_error) + __PYX_ERR(0, 4479, __pyx_L1_error) - /* "pywrapfst.pyx":4474 + /* "pywrapfst.pyx":4478 * # Failure here results from passing an FST with a different arc type than * # used by the FAR was initialized to use. * if not self._writer.get().Add(tostring(key), deref(ifst._fst)): # <<<<<<<<<<<<<< @@ -45398,7 +45318,7 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri */ } - /* "pywrapfst.pyx":4477 + /* "pywrapfst.pyx":4481 * raise FstOpError("Incompatible or invalid arc type") * # An error here usually indicates a key out of order. * if self._writer.get().Error(): # <<<<<<<<<<<<<< @@ -45407,19 +45327,19 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 4477, __pyx_L1_error) + __PYX_ERR(0, 4481, __pyx_L1_error) } __pyx_t_8 = (__pyx_v_self->_writer.get()->Error() != 0); if (unlikely(__pyx_t_8)) { - /* "pywrapfst.pyx":4478 + /* "pywrapfst.pyx":4482 * # An error here usually indicates a key out of order. * if self._writer.get().Error(): * raise FstArgError("Key out of order") # <<<<<<<<<<<<<< * * cpdef string arc_type(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4478, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -45433,14 +45353,14 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Key_out_of_order) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Key_out_of_order); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4478, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4478, __pyx_L1_error) + __PYX_ERR(0, 4482, __pyx_L1_error) - /* "pywrapfst.pyx":4477 + /* "pywrapfst.pyx":4481 * raise FstOpError("Incompatible or invalid arc type") * # An error here usually indicates a key out of order. * if self._writer.get().Error(): # <<<<<<<<<<<<<< @@ -45449,7 +45369,7 @@ static void __pyx_f_9pywrapfst_9FarWriter_add(struct __pyx_obj_9pywrapfst_FarWri */ } - /* "pywrapfst.pyx":4455 + /* "pywrapfst.pyx":4459 * self._writer.reset() * * cpdef void add(self, key, _Fst ifst) except *: # <<<<<<<<<<<<<< @@ -45502,11 +45422,11 @@ static PyObject *__pyx_pw_9pywrapfst_9FarWriter_7add(PyObject *__pyx_v_self, PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 4455, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 4459, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 4455, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 4459, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -45519,13 +45439,13 @@ static PyObject *__pyx_pw_9pywrapfst_9FarWriter_7add(PyObject *__pyx_v_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4455, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4459, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pywrapfst.FarWriter.add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4455, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4459, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_9FarWriter_6add(((struct __pyx_obj_9pywrapfst_FarWriter *)__pyx_v_self), __pyx_v_key, __pyx_v_ifst); /* function exit code */ @@ -45543,8 +45463,8 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_6add(struct __pyx_obj_9pywrapfst PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("add", 0); __Pyx_XDECREF(__pyx_r); - __pyx_f_9pywrapfst_9FarWriter_add(__pyx_v_self, __pyx_v_key, __pyx_v_ifst, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4455, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4455, __pyx_L1_error) + __pyx_f_9pywrapfst_9FarWriter_add(__pyx_v_self, __pyx_v_key, __pyx_v_ifst, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4459, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45561,7 +45481,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_6add(struct __pyx_obj_9pywrapfst return __pyx_r; } -/* "pywrapfst.pyx":4480 +/* "pywrapfst.pyx":4484 * raise FstArgError("Key out of order") * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -45583,13 +45503,12 @@ static std::string __pyx_f_9pywrapfst_9FarWriter_arc_type(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4480, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_9arc_type)) { __Pyx_INCREF(__pyx_t_1); @@ -45605,29 +45524,29 @@ static std::string __pyx_f_9pywrapfst_9FarWriter_arc_type(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4480, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4480, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4486 + /* "pywrapfst.pyx":4490 * Returns a string indicating the arc type. * """ * return self._writer.get().ArcType() # <<<<<<<<<<<<<< @@ -45636,12 +45555,12 @@ static std::string __pyx_f_9pywrapfst_9FarWriter_arc_type(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 4486, __pyx_L1_error) + __PYX_ERR(0, 4490, __pyx_L1_error) } __pyx_r = __pyx_v_self->_writer.get()->ArcType(); goto __pyx_L0; - /* "pywrapfst.pyx":4480 + /* "pywrapfst.pyx":4484 * raise FstArgError("Key out of order") * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -45682,7 +45601,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_8arc_type(struct __pyx_obj_9pywr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("arc_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4480, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45699,7 +45618,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_8arc_type(struct __pyx_obj_9pywr return __pyx_r; } -/* "pywrapfst.pyx":4488 +/* "pywrapfst.pyx":4492 * return self._writer.get().ArcType() * * cpdef bool error(self): # <<<<<<<<<<<<<< @@ -45721,13 +45640,12 @@ static bool __pyx_f_9pywrapfst_9FarWriter_error(struct __pyx_obj_9pywrapfst_FarW if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_11error)) { __Pyx_INCREF(__pyx_t_1); @@ -45743,29 +45661,29 @@ static bool __pyx_f_9pywrapfst_9FarWriter_error(struct __pyx_obj_9pywrapfst_FarW } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4488, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4497 + /* "pywrapfst.pyx":4501 * True if the FarWriter is in an errorful state, False otherwise. * """ * return self._writer.get().Error() # <<<<<<<<<<<<<< @@ -45774,12 +45692,12 @@ static bool __pyx_f_9pywrapfst_9FarWriter_error(struct __pyx_obj_9pywrapfst_FarW */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 4497, __pyx_L1_error) + __PYX_ERR(0, 4501, __pyx_L1_error) } __pyx_r = __pyx_v_self->_writer.get()->Error(); goto __pyx_L0; - /* "pywrapfst.pyx":4488 + /* "pywrapfst.pyx":4492 * return self._writer.get().ArcType() * * cpdef bool error(self): # <<<<<<<<<<<<<< @@ -45820,7 +45738,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_10error(struct __pyx_obj_9pywrap PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("error", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarWriter_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarWriter_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45837,7 +45755,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_10error(struct __pyx_obj_9pywrap return __pyx_r; } -/* "pywrapfst.pyx":4499 +/* "pywrapfst.pyx":4503 * return self._writer.get().Error() * * cpdef string far_type(self): # <<<<<<<<<<<<<< @@ -45859,13 +45777,12 @@ static std::string __pyx_f_9pywrapfst_9FarWriter_far_type(struct __pyx_obj_9pywr if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; - if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); - else { - PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4499, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_13far_type)) { __Pyx_INCREF(__pyx_t_1); @@ -45881,29 +45798,29 @@ static std::string __pyx_f_9pywrapfst_9FarWriter_far_type(struct __pyx_obj_9pywr } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4499, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4499, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP - tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; - obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; - if (unlikely(type_dict_guard != tp_dict_version)) { - tp_dict_version = obj_dict_version = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "pywrapfst.pyx":4505 + /* "pywrapfst.pyx":4509 * Returns a string indicating the FAR type. * """ * return fst.GetFarTypeString(self._writer.get().Type()) # <<<<<<<<<<<<<< @@ -45912,12 +45829,12 @@ static std::string __pyx_f_9pywrapfst_9FarWriter_far_type(struct __pyx_obj_9pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 4505, __pyx_L1_error) + __PYX_ERR(0, 4509, __pyx_L1_error) } __pyx_r = fst::GetFarTypeString(__pyx_v_self->_writer.get()->Type()); goto __pyx_L0; - /* "pywrapfst.pyx":4499 + /* "pywrapfst.pyx":4503 * return self._writer.get().Error() * * cpdef string far_type(self): # <<<<<<<<<<<<<< @@ -45958,7 +45875,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_12far_type(struct __pyx_obj_9pyw PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("far_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4499, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45975,7 +45892,7 @@ static PyObject *__pyx_pf_9pywrapfst_9FarWriter_12far_type(struct __pyx_obj_9pyw return __pyx_r; } -/* "pywrapfst.pyx":4508 +/* "pywrapfst.pyx":4512 * * # Dictionary-like assignment. * def __setitem__(self, key, _Fst fst): # <<<<<<<<<<<<<< @@ -45989,7 +45906,7 @@ static int __pyx_pw_9pywrapfst_9FarWriter_15__setitem__(PyObject *__pyx_v_self, int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_9pywrapfst__Fst, 1, "fst", 0))) __PYX_ERR(0, 4508, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_9pywrapfst__Fst, 1, "fst", 0))) __PYX_ERR(0, 4512, __pyx_L1_error) __pyx_r = __pyx_pf_9pywrapfst_9FarWriter_14__setitem__(((struct __pyx_obj_9pywrapfst_FarWriter *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_fst)); /* function exit code */ @@ -46006,7 +45923,7 @@ static int __pyx_pf_9pywrapfst_9FarWriter_14__setitem__(struct __pyx_obj_9pywrap __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__", 0); - /* "pywrapfst.pyx":4509 + /* "pywrapfst.pyx":4513 * # Dictionary-like assignment. * def __setitem__(self, key, _Fst fst): * self.add(key, fst) # <<<<<<<<<<<<<< @@ -46015,11 +45932,11 @@ static int __pyx_pf_9pywrapfst_9FarWriter_14__setitem__(struct __pyx_obj_9pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(0, 4509, __pyx_L1_error) + __PYX_ERR(0, 4513, __pyx_L1_error) } - ((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, __pyx_v_key, __pyx_v_fst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4509, __pyx_L1_error) + ((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, __pyx_v_key, __pyx_v_fst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4513, __pyx_L1_error) - /* "pywrapfst.pyx":4508 + /* "pywrapfst.pyx":4512 * * # Dictionary-like assignment. * def __setitem__(self, key, _Fst fst): # <<<<<<<<<<<<<< @@ -49079,12 +48996,12 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 122, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 127, __pyx_L1_error) __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 132, __pyx_L1_error) - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 2765, __pyx_L1_error) - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 2785, __pyx_L1_error) - __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 2766, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 2786, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 356, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1169, __pyx_L1_error) - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 4389, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 4393, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -49151,17 +49068,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "pywrapfst.pyx":1401 + /* "pywrapfst.pyx":1402 * @staticmethod * cdef string _local_render_svg(const string &dot): * proc = subprocess.Popen(("dot", "-Tsvg"), # <<<<<<<<<<<<<< * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) */ - __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_u_dot, __pyx_kp_u_Tsvg); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_u_dot, __pyx_kp_u_Tsvg); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_tuple__8); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_tuple__8); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); @@ -49298,115 +49215,115 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - /* "pywrapfst.pyx":444 + /* "pywrapfst.pyx":445 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * plus(lhs, rhs) */ - __pyx_tuple__60 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_tuple__60 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); - __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_plus, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_plus, 445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 445, __pyx_L1_error) - /* "pywrapfst.pyx":476 + /* "pywrapfst.pyx":477 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * times(lhs, rhs) */ - __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_times, 476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_times, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 477, __pyx_L1_error) - /* "pywrapfst.pyx":508 + /* "pywrapfst.pyx":509 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * divide(lhs, rhs) */ - __pyx_tuple__64 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_tuple__64 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__64); __Pyx_GIVEREF(__pyx_tuple__64); - __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_divide, 508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_divide, 509, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 509, __pyx_L1_error) - /* "pywrapfst.pyx":541 + /* "pywrapfst.pyx":542 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< * """ * power(lhs, rhs) */ - __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_result); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_power, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_power, 542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 542, __pyx_L1_error) - /* "pywrapfst.pyx":2765 + /* "pywrapfst.pyx":2766 * * * class Fst(object): # <<<<<<<<<<<<<< * * """ */ - __pyx_tuple__68 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 2765, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); - /* "pywrapfst.pyx":2782 + /* "pywrapfst.pyx":2783 * """ * * def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<< * return _create_Fst(arc_type) * */ - __pyx_tuple__69 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_arc_type); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 2782, __pyx_L1_error) + __pyx_tuple__69 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_arc_type); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 2783, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); - __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_new, 2782, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 2782, __pyx_L1_error) - __pyx_tuple__71 = PyTuple_Pack(1, ((PyObject*)__pyx_n_b_standard)); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 2782, __pyx_L1_error) + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_new, 2783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 2783, __pyx_L1_error) + __pyx_tuple__71 = PyTuple_Pack(1, ((PyObject*)__pyx_n_b_standard)); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 2783, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); - /* "pywrapfst.pyx":2786 + /* "pywrapfst.pyx":2787 * * @staticmethod * def read(filename): # <<<<<<<<<<<<<< * """ * read(filename): */ - __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 2786, __pyx_L1_error) + __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 2787, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); - __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_read, 2786, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 2786, __pyx_L1_error) + __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_read, 2787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 2787, __pyx_L1_error) - /* "pywrapfst.pyx":2804 + /* "pywrapfst.pyx":2805 * * @staticmethod * def read_from_string(state): # <<<<<<<<<<<<<< * """ * read_from_string(string, fst_type=None) */ - __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); - __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_read_from_string, 2804, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_read_from_string, 2805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 2805, __pyx_L1_error) - /* "pywrapfst.pyx":3976 + /* "pywrapfst.pyx":3980 * * * def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * int64 nstate=fst.kNoStateId, */ - __pyx_tuple__76 = PyTuple_Pack(8, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight_type, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 3976, __pyx_L1_error) + __pyx_tuple__76 = PyTuple_Pack(8, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight_type, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 3980, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); - __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_shortestdistance, 3976, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 3976, __pyx_L1_error) + __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_shortestdistance, 3980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 3980, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -49516,14 +49433,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst_Weight.to_string = (std::string (*)(struct __pyx_obj_9pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_6Weight_to_string; __pyx_vtable_9pywrapfst_Weight.type = (std::string (*)(struct __pyx_obj_9pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_6Weight_type; __pyx_vtable_9pywrapfst_Weight.member = (bool (*)(struct __pyx_obj_9pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_6Weight_member; - if (PyType_Ready(&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 333, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 334, __pyx_L1_error) __pyx_type_9pywrapfst_Weight.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_Weight.tp_dictoffset && __pyx_type_9pywrapfst_Weight.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_Weight.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Weight.tp_dict, __pyx_vtabptr_9pywrapfst_Weight) < 0) __PYX_ERR(0, 333, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Weight, (PyObject *)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 333, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 333, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Weight.tp_dict, __pyx_vtabptr_9pywrapfst_Weight) < 0) __PYX_ERR(0, 334, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Weight, (PyObject *)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 334, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 334, __pyx_L1_error) __pyx_ptype_9pywrapfst_Weight = &__pyx_type_9pywrapfst_Weight; __pyx_vtabptr_9pywrapfst__SymbolTable = &__pyx_vtable_9pywrapfst__SymbolTable; __pyx_vtable_9pywrapfst__SymbolTable.available_key = (__pyx_t_10basictypes_int64 (*)(struct __pyx_obj_9pywrapfst__SymbolTable *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_SymbolTable_available_key; @@ -49537,35 +49454,35 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst__SymbolTable.write = (void (*)(struct __pyx_obj_9pywrapfst__SymbolTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_SymbolTable_write; __pyx_vtable_9pywrapfst__SymbolTable.write_text = (void (*)(struct __pyx_obj_9pywrapfst__SymbolTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_SymbolTable_write_text; __pyx_vtable_9pywrapfst__SymbolTable.write_to_string = (PyObject *(*)(struct __pyx_obj_9pywrapfst__SymbolTable *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_SymbolTable_write_to_string; - if (PyType_Ready(&__pyx_type_9pywrapfst__SymbolTable) < 0) __PYX_ERR(0, 663, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst__SymbolTable) < 0) __PYX_ERR(0, 664, __pyx_L1_error) __pyx_type_9pywrapfst__SymbolTable.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__SymbolTable.tp_dictoffset && __pyx_type_9pywrapfst__SymbolTable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst__SymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst__SymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__SymbolTable) < 0) __PYX_ERR(0, 663, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable, (PyObject *)&__pyx_type_9pywrapfst__SymbolTable) < 0) __PYX_ERR(0, 663, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst__SymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__SymbolTable) < 0) __PYX_ERR(0, 664, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable, (PyObject *)&__pyx_type_9pywrapfst__SymbolTable) < 0) __PYX_ERR(0, 664, __pyx_L1_error) __pyx_ptype_9pywrapfst__SymbolTable = &__pyx_type_9pywrapfst__SymbolTable; __pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTable = &__pyx_vtable_9pywrapfst__EncodeMapperSymbolTable; __pyx_vtable_9pywrapfst__EncodeMapperSymbolTable.__pyx_base = *__pyx_vtabptr_9pywrapfst__SymbolTable; __pyx_type_9pywrapfst__EncodeMapperSymbolTable.tp_base = __pyx_ptype_9pywrapfst__SymbolTable; - if (PyType_Ready(&__pyx_type_9pywrapfst__EncodeMapperSymbolTable) < 0) __PYX_ERR(0, 851, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst__EncodeMapperSymbolTable) < 0) __PYX_ERR(0, 852, __pyx_L1_error) __pyx_type_9pywrapfst__EncodeMapperSymbolTable.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__EncodeMapperSymbolTable.tp_dictoffset && __pyx_type_9pywrapfst__EncodeMapperSymbolTable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst__EncodeMapperSymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst__EncodeMapperSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTable) < 0) __PYX_ERR(0, 851, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapperSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__EncodeMapperSymbolTable) < 0) __PYX_ERR(0, 851, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst__EncodeMapperSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTable) < 0) __PYX_ERR(0, 852, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapperSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__EncodeMapperSymbolTable) < 0) __PYX_ERR(0, 852, __pyx_L1_error) __pyx_ptype_9pywrapfst__EncodeMapperSymbolTable = &__pyx_type_9pywrapfst__EncodeMapperSymbolTable; __pyx_vtabptr_9pywrapfst__FstSymbolTable = &__pyx_vtable_9pywrapfst__FstSymbolTable; __pyx_vtable_9pywrapfst__FstSymbolTable.__pyx_base = *__pyx_vtabptr_9pywrapfst__SymbolTable; __pyx_type_9pywrapfst__FstSymbolTable.tp_base = __pyx_ptype_9pywrapfst__SymbolTable; - if (PyType_Ready(&__pyx_type_9pywrapfst__FstSymbolTable) < 0) __PYX_ERR(0, 871, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst__FstSymbolTable) < 0) __PYX_ERR(0, 872, __pyx_L1_error) __pyx_type_9pywrapfst__FstSymbolTable.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__FstSymbolTable.tp_dictoffset && __pyx_type_9pywrapfst__FstSymbolTable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst__FstSymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst__FstSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__FstSymbolTable) < 0) __PYX_ERR(0, 871, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FstSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__FstSymbolTable) < 0) __PYX_ERR(0, 871, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst__FstSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__FstSymbolTable) < 0) __PYX_ERR(0, 872, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FstSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__FstSymbolTable) < 0) __PYX_ERR(0, 872, __pyx_L1_error) __pyx_ptype_9pywrapfst__FstSymbolTable = &__pyx_type_9pywrapfst__FstSymbolTable; __pyx_vtabptr_9pywrapfst__MutableSymbolTable = &__pyx_vtable_9pywrapfst__MutableSymbolTable; __pyx_vtable_9pywrapfst__MutableSymbolTable.__pyx_base = *__pyx_vtabptr_9pywrapfst__SymbolTable; @@ -49573,35 +49490,35 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst__MutableSymbolTable.add_table = (void (*)(struct __pyx_obj_9pywrapfst__MutableSymbolTable *, struct __pyx_obj_9pywrapfst__SymbolTable *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableSymbolTable_add_table; __pyx_vtable_9pywrapfst__MutableSymbolTable.set_name = (void (*)(struct __pyx_obj_9pywrapfst__MutableSymbolTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableSymbolTable_set_name; __pyx_type_9pywrapfst__MutableSymbolTable.tp_base = __pyx_ptype_9pywrapfst__SymbolTable; - if (PyType_Ready(&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 890, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 891, __pyx_L1_error) __pyx_type_9pywrapfst__MutableSymbolTable.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__MutableSymbolTable.tp_dictoffset && __pyx_type_9pywrapfst__MutableSymbolTable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst__MutableSymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 890, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 890, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 891, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 891, __pyx_L1_error) __pyx_ptype_9pywrapfst__MutableSymbolTable = &__pyx_type_9pywrapfst__MutableSymbolTable; __pyx_vtabptr_9pywrapfst__MutableFstSymbolTable = &__pyx_vtable_9pywrapfst__MutableFstSymbolTable; __pyx_vtable_9pywrapfst__MutableFstSymbolTable.__pyx_base = *__pyx_vtabptr_9pywrapfst__MutableSymbolTable; __pyx_type_9pywrapfst__MutableFstSymbolTable.tp_base = __pyx_ptype_9pywrapfst__MutableSymbolTable; - if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFstSymbolTable) < 0) __PYX_ERR(0, 942, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFstSymbolTable) < 0) __PYX_ERR(0, 943, __pyx_L1_error) __pyx_type_9pywrapfst__MutableFstSymbolTable.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__MutableFstSymbolTable.tp_dictoffset && __pyx_type_9pywrapfst__MutableFstSymbolTable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst__MutableFstSymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFstSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFstSymbolTable) < 0) __PYX_ERR(0, 942, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFstSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__MutableFstSymbolTable) < 0) __PYX_ERR(0, 942, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFstSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFstSymbolTable) < 0) __PYX_ERR(0, 943, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFstSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__MutableFstSymbolTable) < 0) __PYX_ERR(0, 943, __pyx_L1_error) __pyx_ptype_9pywrapfst__MutableFstSymbolTable = &__pyx_type_9pywrapfst__MutableFstSymbolTable; __pyx_vtabptr_9pywrapfst_SymbolTable = &__pyx_vtable_9pywrapfst_SymbolTable; __pyx_vtable_9pywrapfst_SymbolTable.__pyx_base = *__pyx_vtabptr_9pywrapfst__MutableSymbolTable; __pyx_type_9pywrapfst_SymbolTable.tp_base = __pyx_ptype_9pywrapfst__MutableSymbolTable; - if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 953, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 954, __pyx_L1_error) __pyx_type_9pywrapfst_SymbolTable.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_SymbolTable.tp_dictoffset && __pyx_type_9pywrapfst_SymbolTable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_SymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 953, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable_2, (PyObject *)&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 953, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 954, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable_2, (PyObject *)&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 954, __pyx_L1_error) __pyx_ptype_9pywrapfst_SymbolTable = &__pyx_type_9pywrapfst_SymbolTable; __pyx_vtabptr_9pywrapfst_SymbolTableIterator = &__pyx_vtable_9pywrapfst_SymbolTableIterator; __pyx_vtable_9pywrapfst_SymbolTableIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst_SymbolTableIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19SymbolTableIterator_done; @@ -49609,14 +49526,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst_SymbolTableIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst_SymbolTableIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19SymbolTableIterator_reset; __pyx_vtable_9pywrapfst_SymbolTableIterator.symbol = (std::string (*)(struct __pyx_obj_9pywrapfst_SymbolTableIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19SymbolTableIterator_symbol; __pyx_vtable_9pywrapfst_SymbolTableIterator.value = (__pyx_t_10basictypes_int64 (*)(struct __pyx_obj_9pywrapfst_SymbolTableIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19SymbolTableIterator_value; - if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1148, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_type_9pywrapfst_SymbolTableIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_SymbolTableIterator.tp_dictoffset && __pyx_type_9pywrapfst_SymbolTableIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_SymbolTableIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTableIterator.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1148, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableIterator, (PyObject *)&__pyx_type_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1148, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1148, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTableIterator.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1149, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableIterator, (PyObject *)&__pyx_type_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1149, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_SymbolTableIterator) < 0) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_ptype_9pywrapfst_SymbolTableIterator = &__pyx_type_9pywrapfst_SymbolTableIterator; __pyx_vtabptr_9pywrapfst_EncodeMapper = &__pyx_vtable_9pywrapfst_EncodeMapper; __pyx_vtable_9pywrapfst_EncodeMapper.arc_type = (std::string (*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12EncodeMapper_arc_type; @@ -49627,14 +49544,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst_EncodeMapper.set_input_symbols = (void (*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, struct __pyx_obj_9pywrapfst__SymbolTable *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12EncodeMapper_set_input_symbols; __pyx_vtable_9pywrapfst_EncodeMapper.set_output_symbols = (void (*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, struct __pyx_obj_9pywrapfst__SymbolTable *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12EncodeMapper_set_output_symbols; __pyx_vtable_9pywrapfst_EncodeMapper.weight_type = (std::string (*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12EncodeMapper_weight_type; - if (PyType_Ready(&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1230, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) __pyx_type_9pywrapfst_EncodeMapper.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_EncodeMapper.tp_dictoffset && __pyx_type_9pywrapfst_EncodeMapper.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_EncodeMapper.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pywrapfst_EncodeMapper, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1230, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pywrapfst_EncodeMapper, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1231, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_9pywrapfst_12EncodeMapper_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_9pywrapfst_12EncodeMapper_6__call__.doc = __pyx_doc_9pywrapfst_12EncodeMapper_6__call__; @@ -49642,9 +49559,9 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_EncodeMapper.tp_dict, __pyx_vtabptr_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1230, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapper, (PyObject *)&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1230, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1230, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_EncodeMapper.tp_dict, __pyx_vtabptr_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapper, (PyObject *)&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) __pyx_ptype_9pywrapfst_EncodeMapper = &__pyx_type_9pywrapfst_EncodeMapper; __pyx_vtabptr_9pywrapfst__Fst = &__pyx_vtable_9pywrapfst__Fst; __pyx_vtable_9pywrapfst__Fst._local_render_svg = (std::string (*)(std::string const &))__pyx_f_9pywrapfst_4_Fst__local_render_svg; @@ -49667,13 +49584,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst__Fst.weight_type = (std::string (*)(struct __pyx_obj_9pywrapfst__Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_4_Fst_weight_type; __pyx_vtable_9pywrapfst__Fst.write = (void (*)(struct __pyx_obj_9pywrapfst__Fst *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_4_Fst_write; __pyx_vtable_9pywrapfst__Fst.write_to_string = (PyObject *(*)(struct __pyx_obj_9pywrapfst__Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_4_Fst_write_to_string; - if (PyType_Ready(&__pyx_type_9pywrapfst__Fst) < 0) __PYX_ERR(0, 1386, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst__Fst) < 0) __PYX_ERR(0, 1387, __pyx_L1_error) __pyx_type_9pywrapfst__Fst.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__Fst.tp_dictoffset && __pyx_type_9pywrapfst__Fst.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst__Fst.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst__Fst.tp_dict, __pyx_vtabptr_9pywrapfst__Fst) < 0) __PYX_ERR(0, 1386, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *)&__pyx_type_9pywrapfst__Fst) < 0) __PYX_ERR(0, 1386, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst__Fst.tp_dict, __pyx_vtabptr_9pywrapfst__Fst) < 0) __PYX_ERR(0, 1387, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *)&__pyx_type_9pywrapfst__Fst) < 0) __PYX_ERR(0, 1387, __pyx_L1_error) __pyx_ptype_9pywrapfst__Fst = &__pyx_type_9pywrapfst__Fst; __pyx_vtabptr_9pywrapfst__MutableFst = &__pyx_vtable_9pywrapfst__MutableFst; __pyx_vtable_9pywrapfst__MutableFst.__pyx_base = *__pyx_vtabptr_9pywrapfst__Fst; @@ -49709,24 +49626,24 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst__MutableFst._topsort = (void (*)(struct __pyx_obj_9pywrapfst__MutableFst *))__pyx_f_9pywrapfst_11_MutableFst__topsort; __pyx_vtable_9pywrapfst__MutableFst._union = (void (*)(struct __pyx_obj_9pywrapfst__MutableFst *, struct __pyx_obj_9pywrapfst__Fst *))__pyx_f_9pywrapfst_11_MutableFst__union; __pyx_type_9pywrapfst__MutableFst.tp_base = __pyx_ptype_9pywrapfst__Fst; - if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1801, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1802, __pyx_L1_error) __pyx_type_9pywrapfst__MutableFst.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__MutableFst.tp_dictoffset && __pyx_type_9pywrapfst__MutableFst.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst__MutableFst.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFst.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1801, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFst, (PyObject *)&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1801, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFst.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1802, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFst, (PyObject *)&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1802, __pyx_L1_error) __pyx_ptype_9pywrapfst__MutableFst = &__pyx_type_9pywrapfst__MutableFst; __pyx_vtabptr_9pywrapfst_Arc = &__pyx_vtable_9pywrapfst_Arc; __pyx_vtable_9pywrapfst_Arc.copy = (struct __pyx_obj_9pywrapfst_Arc *(*)(struct __pyx_obj_9pywrapfst_Arc *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Arc_copy; - if (PyType_Ready(&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2919, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2920, __pyx_L1_error) __pyx_type_9pywrapfst_Arc.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_Arc.tp_dictoffset && __pyx_type_9pywrapfst_Arc.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_Arc.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Arc.tp_dict, __pyx_vtabptr_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2919, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Arc, (PyObject *)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2919, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2919, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Arc.tp_dict, __pyx_vtabptr_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2920, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Arc, (PyObject *)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2920, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2920, __pyx_L1_error) __pyx_ptype_9pywrapfst_Arc = &__pyx_type_9pywrapfst_Arc; __pyx_vtabptr_9pywrapfst_ArcIterator = &__pyx_vtable_9pywrapfst_ArcIterator; __pyx_vtable_9pywrapfst_ArcIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_done; @@ -49737,14 +49654,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst_ArcIterator.seek = (void (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, size_t, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_seek; __pyx_vtable_9pywrapfst_ArcIterator.set_flags = (void (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, __pyx_t_10basictypes_uint32, __pyx_t_10basictypes_uint32, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_set_flags; __pyx_vtable_9pywrapfst_ArcIterator.value = (PyObject *(*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_value; - if (PyType_Ready(&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2986, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2987, __pyx_L1_error) __pyx_type_9pywrapfst_ArcIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_ArcIterator.tp_dictoffset && __pyx_type_9pywrapfst_ArcIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_ArcIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_ArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2986, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ArcIterator, (PyObject *)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2986, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2986, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_ArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2987, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ArcIterator, (PyObject *)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2987, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2987, __pyx_L1_error) __pyx_ptype_9pywrapfst_ArcIterator = &__pyx_type_9pywrapfst_ArcIterator; __pyx_vtabptr_9pywrapfst_MutableArcIterator = &__pyx_vtable_9pywrapfst_MutableArcIterator; __pyx_vtable_9pywrapfst_MutableArcIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_done; @@ -49756,40 +49673,40 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst_MutableArcIterator.set_flags = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, __pyx_t_10basictypes_uint32, __pyx_t_10basictypes_uint32, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_set_flags; __pyx_vtable_9pywrapfst_MutableArcIterator.set_value = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, struct __pyx_obj_9pywrapfst_Arc *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_set_value; __pyx_vtable_9pywrapfst_MutableArcIterator.value = (PyObject *(*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_value; - if (PyType_Ready(&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3097, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3098, __pyx_L1_error) __pyx_type_9pywrapfst_MutableArcIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_MutableArcIterator.tp_dictoffset && __pyx_type_9pywrapfst_MutableArcIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_MutableArcIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_MutableArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3097, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableArcIterator, (PyObject *)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3097, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3097, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_MutableArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3098, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableArcIterator, (PyObject *)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3098, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3098, __pyx_L1_error) __pyx_ptype_9pywrapfst_MutableArcIterator = &__pyx_type_9pywrapfst_MutableArcIterator; __pyx_vtabptr_9pywrapfst_StateIterator = &__pyx_vtable_9pywrapfst_StateIterator; __pyx_vtable_9pywrapfst_StateIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_done; __pyx_vtable_9pywrapfst_StateIterator.next = (void (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_next; __pyx_vtable_9pywrapfst_StateIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_reset; __pyx_vtable_9pywrapfst_StateIterator.value = (__pyx_t_10basictypes_int64 (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_value; - if (PyType_Ready(&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3217, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3218, __pyx_L1_error) __pyx_type_9pywrapfst_StateIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_StateIterator.tp_dictoffset && __pyx_type_9pywrapfst_StateIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_StateIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_StateIterator.tp_dict, __pyx_vtabptr_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3217, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StateIterator, (PyObject *)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3217, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3217, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_StateIterator.tp_dict, __pyx_vtabptr_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3218, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StateIterator, (PyObject *)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3218, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3218, __pyx_L1_error) __pyx_ptype_9pywrapfst_StateIterator = &__pyx_type_9pywrapfst_StateIterator; __pyx_vtabptr_9pywrapfst_Compiler = &__pyx_vtable_9pywrapfst_Compiler; __pyx_vtable_9pywrapfst_Compiler.compile = (struct __pyx_obj_9pywrapfst__Fst *(*)(struct __pyx_obj_9pywrapfst_Compiler *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_8Compiler_compile; __pyx_vtable_9pywrapfst_Compiler.write = (void (*)(struct __pyx_obj_9pywrapfst_Compiler *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_8Compiler_write; - if (PyType_Ready(&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4115, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4119, __pyx_L1_error) __pyx_type_9pywrapfst_Compiler.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_Compiler.tp_dictoffset && __pyx_type_9pywrapfst_Compiler.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_Compiler.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Compiler.tp_dict, __pyx_vtabptr_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4115, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Compiler, (PyObject *)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4115, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4115, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Compiler.tp_dict, __pyx_vtabptr_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4119, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Compiler, (PyObject *)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4119, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4119, __pyx_L1_error) __pyx_ptype_9pywrapfst_Compiler = &__pyx_type_9pywrapfst_Compiler; __pyx_vtabptr_9pywrapfst_FarReader = &__pyx_vtable_9pywrapfst_FarReader; __pyx_vtable_9pywrapfst_FarReader.arc_type = (std::string (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_arc_type; @@ -49801,14 +49718,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst_FarReader.get_key = (std::string (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_get_key; __pyx_vtable_9pywrapfst_FarReader.next = (void (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_next; __pyx_vtable_9pywrapfst_FarReader.reset = (void (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_reset; - if (PyType_Ready(&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4245, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4249, __pyx_L1_error) __pyx_type_9pywrapfst_FarReader.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_FarReader.tp_dictoffset && __pyx_type_9pywrapfst_FarReader.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_FarReader.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarReader.tp_dict, __pyx_vtabptr_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4245, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarReader, (PyObject *)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4245, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4245, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarReader.tp_dict, __pyx_vtabptr_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4249, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarReader, (PyObject *)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4249, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4249, __pyx_L1_error) __pyx_ptype_9pywrapfst_FarReader = &__pyx_type_9pywrapfst_FarReader; __pyx_vtabptr_9pywrapfst_FarWriter = &__pyx_vtable_9pywrapfst_FarWriter; __pyx_vtable_9pywrapfst_FarWriter.arc_type = (std::string (*)(struct __pyx_obj_9pywrapfst_FarWriter *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_arc_type; @@ -49816,16 +49733,16 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_9pywrapfst_FarWriter.add = (void (*)(struct __pyx_obj_9pywrapfst_FarWriter *, PyObject *, struct __pyx_obj_9pywrapfst__Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_add; __pyx_vtable_9pywrapfst_FarWriter.error = (bool (*)(struct __pyx_obj_9pywrapfst_FarWriter *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_error; __pyx_vtable_9pywrapfst_FarWriter.far_type = (std::string (*)(struct __pyx_obj_9pywrapfst_FarWriter *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_far_type; - if (PyType_Ready(&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4392, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4396, __pyx_L1_error) __pyx_type_9pywrapfst_FarWriter.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_FarWriter.tp_dictoffset && __pyx_type_9pywrapfst_FarWriter.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst_FarWriter.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarWriter.tp_dict, __pyx_vtabptr_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4392, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarWriter, (PyObject *)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4392, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4392, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarWriter.tp_dict, __pyx_vtabptr_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4396, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarWriter, (PyObject *)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4396, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4396, __pyx_L1_error) __pyx_ptype_9pywrapfst_FarWriter = &__pyx_type_9pywrapfst_FarWriter; - if (PyType_Ready(&__pyx_type_9pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3117, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_9pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3118, __pyx_L1_error) __pyx_type_9pywrapfst___pyx_scope_struct____iter__.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst___pyx_scope_struct____iter__.tp_dictoffset && __pyx_type_9pywrapfst___pyx_scope_struct____iter__.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_9pywrapfst___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; @@ -50298,127 +50215,127 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":391 + /* "pywrapfst.pyx":392 * * @classmethod * def Zero(cls, weight_type): # <<<<<<<<<<<<<< * """ * Weight.Zero(weight_type) */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_Zero); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_Zero); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pywrapfst.pyx":390 + /* "pywrapfst.pyx":391 * # C++ part out-of-class and then call it from within. * * @classmethod # <<<<<<<<<<<<<< * def Zero(cls, weight_type): * """ */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_Zero, __pyx_t_2) < 0) __PYX_ERR(0, 391, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_Zero, __pyx_t_2) < 0) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_Weight); - /* "pywrapfst.pyx":400 + /* "pywrapfst.pyx":401 * * @classmethod * def One(cls, weight_type): # <<<<<<<<<<<<<< * """ * Weight.One(weight_type) */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_One); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_One); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":399 + /* "pywrapfst.pyx":400 * return _Zero(weight_type) * * @classmethod # <<<<<<<<<<<<<< * def One(cls, weight_type): * """ */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_One, __pyx_t_1) < 0) __PYX_ERR(0, 400, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_One, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_Weight); - /* "pywrapfst.pyx":409 + /* "pywrapfst.pyx":410 * * @classmethod * def NoWeight(cls, weight_type): # <<<<<<<<<<<<<< * """ * Weight.NoWeight(weight_type) */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_NoWeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_NoWeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pywrapfst.pyx":408 + /* "pywrapfst.pyx":409 * return _One(weight_type) * * @classmethod # <<<<<<<<<<<<<< * def NoWeight(cls, weight_type): * """ */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_NoWeight, __pyx_t_2) < 0) __PYX_ERR(0, 409, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_NoWeight, __pyx_t_2) < 0) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_Weight); - /* "pywrapfst.pyx":444 + /* "pywrapfst.pyx":445 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * plus(lhs, rhs) */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_1plus, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_1plus, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_2) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_2) < 0) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":476 + /* "pywrapfst.pyx":477 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * times(lhs, rhs) */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_3times, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_3times, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_2) < 0) __PYX_ERR(0, 476, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_2) < 0) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":508 + /* "pywrapfst.pyx":509 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * divide(lhs, rhs) */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_5divide, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_5divide, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_2) < 0) __PYX_ERR(0, 508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_2) < 0) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":541 + /* "pywrapfst.pyx":542 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< * """ * power(lhs, rhs) */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_7power, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_7power, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_2) < 0) __PYX_ERR(0, 541, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_2) < 0) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pywrapfst.pyx":901 + /* "pywrapfst.pyx":902 * """ * * cpdef int64 add_symbol(self, symbol, int64 key=fst.kNoSymbol): # <<<<<<<<<<<<<< @@ -50428,79 +50345,79 @@ if (!__Pyx_RefNanny) { __pyx_k__3 = fst::kNoSymbol; __pyx_k__3 = fst::kNoSymbol; - /* "pywrapfst.pyx":978 + /* "pywrapfst.pyx":979 * * @classmethod * def read(cls, filename): # <<<<<<<<<<<<<< * """ * SymbolTable.read(filename) */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":977 + /* "pywrapfst.pyx":978 * self._smart_table.reset(self._table) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, filename): * """ */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read, __pyx_t_1) < 0) __PYX_ERR(0, 978, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read, __pyx_t_1) < 0) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_SymbolTable); - /* "pywrapfst.pyx":1001 + /* "pywrapfst.pyx":1002 * * @classmethod * def read_text(cls, filename, bool allow_negative_labels=False): # <<<<<<<<<<<<<< * """ * SymbolTable.read_text(filename) */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pywrapfst.pyx":1000 + /* "pywrapfst.pyx":1001 * return _init_SymbolTable(syms.release()) * * @classmethod # <<<<<<<<<<<<<< * def read_text(cls, filename, bool allow_negative_labels=False): * """ */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_text, __pyx_t_2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_text, __pyx_t_2) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_SymbolTable); - /* "pywrapfst.pyx":1028 + /* "pywrapfst.pyx":1029 * * @classmethod * def read_fst(cls, filename, bool input_table): # <<<<<<<<<<<<<< * """ * SymbolTable.read_fst(filename, input_table) */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_fst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_fst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":1027 + /* "pywrapfst.pyx":1028 * return _init_SymbolTable(syms.release()) * * @classmethod # <<<<<<<<<<<<<< * def read_fst(cls, filename, bool input_table): * """ */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_fst, __pyx_t_1) < 0) __PYX_ERR(0, 1028, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_fst, __pyx_t_1) < 0) __PYX_ERR(0, 1029, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_SymbolTable); - /* "pywrapfst.pyx":2089 + /* "pywrapfst.pyx":2090 * return self * * cdef void _minimize(self, float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -50509,7 +50426,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__11 = fst::kShortestDelta; - /* "pywrapfst.pyx":2095 + /* "pywrapfst.pyx":2096 * self._check_mutating_imethod() * * def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<< @@ -50518,7 +50435,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__12 = fst::kShortestDelta; - /* "pywrapfst.pyx":2195 + /* "pywrapfst.pyx":2196 * return self * * cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -50528,7 +50445,7 @@ if (!__Pyx_RefNanny) { __pyx_k__13 = fst::kDelta; __pyx_k__14 = fst::kNoStateId; - /* "pywrapfst.pyx":2204 + /* "pywrapfst.pyx":2205 * * def prune(self, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -50537,7 +50454,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__15 = fst::kDelta; - /* "pywrapfst.pyx":2205 + /* "pywrapfst.pyx":2206 * def prune(self, * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -50546,7 +50463,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__16 = fst::kNoStateId; - /* "pywrapfst.pyx":2232 + /* "pywrapfst.pyx":2233 * * cdef void _push(self, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -50555,7 +50472,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__17 = fst::kDelta; - /* "pywrapfst.pyx":2240 + /* "pywrapfst.pyx":2241 * * def push(self, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -50564,7 +50481,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__18 = fst::kDelta; - /* "pywrapfst.pyx":2477 + /* "pywrapfst.pyx":2478 * bool connect=True, * weight=None, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -50573,7 +50490,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__19 = fst::kNoStateId; - /* "pywrapfst.pyx":2478 + /* "pywrapfst.pyx":2479 * weight=None, * int64 nstate=fst.kNoStateId, * float delta=fst.kShortestDelta) except *: # <<<<<<<<<<<<<< @@ -50582,7 +50499,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__20 = fst::kShortestDelta; - /* "pywrapfst.pyx":2491 + /* "pywrapfst.pyx":2492 * bool connect=True, * weight=None, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -50591,7 +50508,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__21 = fst::kNoStateId; - /* "pywrapfst.pyx":2492 + /* "pywrapfst.pyx":2493 * weight=None, * int64 nstate=fst.kNoStateId, * float delta=fst.kShortestDelta): # <<<<<<<<<<<<<< @@ -50600,944 +50517,944 @@ if (!__Pyx_RefNanny) { */ __pyx_k__22 = fst::kShortestDelta; - /* "pywrapfst.pyx":2765 + /* "pywrapfst.pyx":2766 * * * class Fst(object): # <<<<<<<<<<<<<< * * """ */ - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__68); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2765, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__68); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__68, __pyx_n_s_Fst_2, __pyx_n_s_Fst_2, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, __pyx_kp_s_Fst_arc_type_standard_Construct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2765, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__68, __pyx_n_s_Fst_2, __pyx_n_s_Fst_2, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, __pyx_kp_s_Fst_arc_type_standard_Construct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":2782 + /* "pywrapfst.pyx":2783 * """ * * def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<< * return _create_Fst(arc_type) * */ - __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst___new, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2782, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst___new, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__71); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_new, __pyx_t_3) < 0) __PYX_ERR(0, 2782, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_new, __pyx_t_3) < 0) __PYX_ERR(0, 2783, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pywrapfst.pyx":2786 + /* "pywrapfst.pyx":2787 * * @staticmethod * def read(filename): # <<<<<<<<<<<<<< * """ * read(filename): */ - __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_3read, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2786, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_3read, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "pywrapfst.pyx":2785 + /* "pywrapfst.pyx":2786 * return _create_Fst(arc_type) * * @staticmethod # <<<<<<<<<<<<<< * def read(filename): * """ */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2785, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 2786, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 2787, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pywrapfst.pyx":2804 + /* "pywrapfst.pyx":2805 * * @staticmethod * def read_from_string(state): # <<<<<<<<<<<<<< * """ * read_from_string(string, fst_type=None) */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_5read_from_string, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_5read_from_string, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "pywrapfst.pyx":2803 + /* "pywrapfst.pyx":2804 * return _read(filename) * * @staticmethod # <<<<<<<<<<<<<< * def read_from_string(state): * """ */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2803, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 2804, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pywrapfst.pyx":2765 + /* "pywrapfst.pyx":2766 * * * class Fst(object): # <<<<<<<<<<<<<< * * """ */ - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Fst_2, __pyx_tuple__68, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2765, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Fst_2, __pyx_tuple__68, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Fst_2, __pyx_t_3) < 0) __PYX_ERR(0, 2765, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Fst_2, __pyx_t_3) < 0) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2828 + /* "pywrapfst.pyx":2829 * * * NO_LABEL = fst.kNoLabel # <<<<<<<<<<<<<< * NO_STATE_ID = fst.kNoStateId * NO_SYMBOL = fst.kNoSymbol */ - __pyx_t_1 = __Pyx_PyInt_From_int(fst::kNoLabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2828, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(fst::kNoLabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_1) < 0) __PYX_ERR(0, 2828, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_1) < 0) __PYX_ERR(0, 2829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2829 + /* "pywrapfst.pyx":2830 * * NO_LABEL = fst.kNoLabel * NO_STATE_ID = fst.kNoStateId # <<<<<<<<<<<<<< * NO_SYMBOL = fst.kNoSymbol * */ - __pyx_t_1 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2829, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_1) < 0) __PYX_ERR(0, 2829, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_1) < 0) __PYX_ERR(0, 2830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2830 + /* "pywrapfst.pyx":2831 * NO_LABEL = fst.kNoLabel * NO_STATE_ID = fst.kNoStateId * NO_SYMBOL = fst.kNoSymbol # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2830, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_1) < 0) __PYX_ERR(0, 2830, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_1) < 0) __PYX_ERR(0, 2831, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2836 + /* "pywrapfst.pyx":2837 * * * EXPANDED = fst.kExpanded # <<<<<<<<<<<<<< * MUTABLE = fst.kMutable * ERROR = fst.kError */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2836, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPANDED, __pyx_t_1) < 0) __PYX_ERR(0, 2836, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPANDED, __pyx_t_1) < 0) __PYX_ERR(0, 2837, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2837 + /* "pywrapfst.pyx":2838 * * EXPANDED = fst.kExpanded * MUTABLE = fst.kMutable # <<<<<<<<<<<<<< * ERROR = fst.kError * ACCEPTOR = fst.kAcceptor */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2837, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MUTABLE, __pyx_t_1) < 0) __PYX_ERR(0, 2837, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MUTABLE, __pyx_t_1) < 0) __PYX_ERR(0, 2838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2838 + /* "pywrapfst.pyx":2839 * EXPANDED = fst.kExpanded * MUTABLE = fst.kMutable * ERROR = fst.kError # <<<<<<<<<<<<<< * ACCEPTOR = fst.kAcceptor * NOT_ACCEPTOR = fst.kNotAcceptor */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2838, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_1) < 0) __PYX_ERR(0, 2838, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_1) < 0) __PYX_ERR(0, 2839, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2839 + /* "pywrapfst.pyx":2840 * MUTABLE = fst.kMutable * ERROR = fst.kError * ACCEPTOR = fst.kAcceptor # <<<<<<<<<<<<<< * NOT_ACCEPTOR = fst.kNotAcceptor * I_DETERMINISTIC = fst.kIDeterministic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2839, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCEPTOR, __pyx_t_1) < 0) __PYX_ERR(0, 2839, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCEPTOR, __pyx_t_1) < 0) __PYX_ERR(0, 2840, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2840 + /* "pywrapfst.pyx":2841 * ERROR = fst.kError * ACCEPTOR = fst.kAcceptor * NOT_ACCEPTOR = fst.kNotAcceptor # <<<<<<<<<<<<<< * I_DETERMINISTIC = fst.kIDeterministic * NON_I_DETERMINISTIC = fst.kNonIDeterministic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2840, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_1) < 0) __PYX_ERR(0, 2840, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_1) < 0) __PYX_ERR(0, 2841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2841 + /* "pywrapfst.pyx":2842 * ACCEPTOR = fst.kAcceptor * NOT_ACCEPTOR = fst.kNotAcceptor * I_DETERMINISTIC = fst.kIDeterministic # <<<<<<<<<<<<<< * NON_I_DETERMINISTIC = fst.kNonIDeterministic * O_DETERMINISTIC = fst.kODeterministic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2841, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2842 + /* "pywrapfst.pyx":2843 * NOT_ACCEPTOR = fst.kNotAcceptor * I_DETERMINISTIC = fst.kIDeterministic * NON_I_DETERMINISTIC = fst.kNonIDeterministic # <<<<<<<<<<<<<< * O_DETERMINISTIC = fst.kODeterministic * NON_O_DETERMINISTIC = fst.kNonODeterministic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2842, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2842, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2843 + /* "pywrapfst.pyx":2844 * I_DETERMINISTIC = fst.kIDeterministic * NON_I_DETERMINISTIC = fst.kNonIDeterministic * O_DETERMINISTIC = fst.kODeterministic # <<<<<<<<<<<<<< * NON_O_DETERMINISTIC = fst.kNonODeterministic * EPSILONS = fst.kEpsilons */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2843, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2843, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2844 + /* "pywrapfst.pyx":2845 * NON_I_DETERMINISTIC = fst.kNonIDeterministic * O_DETERMINISTIC = fst.kODeterministic * NON_O_DETERMINISTIC = fst.kNonODeterministic # <<<<<<<<<<<<<< * EPSILONS = fst.kEpsilons * NO_EPSILONS = fst.kNoEpsilons */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2844, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2844, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_1) < 0) __PYX_ERR(0, 2845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2845 + /* "pywrapfst.pyx":2846 * O_DETERMINISTIC = fst.kODeterministic * NON_O_DETERMINISTIC = fst.kNonODeterministic * EPSILONS = fst.kEpsilons # <<<<<<<<<<<<<< * NO_EPSILONS = fst.kNoEpsilons * I_EPSILONS = fst.kIEpsilons */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2845, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2845, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2846, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2846 + /* "pywrapfst.pyx":2847 * NON_O_DETERMINISTIC = fst.kNonODeterministic * EPSILONS = fst.kEpsilons * NO_EPSILONS = fst.kNoEpsilons # <<<<<<<<<<<<<< * I_EPSILONS = fst.kIEpsilons * NO_I_EPSILONS = fst.kNoIEpsilons */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2846, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2846, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2847 + /* "pywrapfst.pyx":2848 * EPSILONS = fst.kEpsilons * NO_EPSILONS = fst.kNoEpsilons * I_EPSILONS = fst.kIEpsilons # <<<<<<<<<<<<<< * NO_I_EPSILONS = fst.kNoIEpsilons * O_EPSILONS = fst.kOEpsilons */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2847, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2847, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2848 + /* "pywrapfst.pyx":2849 * NO_EPSILONS = fst.kNoEpsilons * I_EPSILONS = fst.kIEpsilons * NO_I_EPSILONS = fst.kNoIEpsilons # <<<<<<<<<<<<<< * O_EPSILONS = fst.kOEpsilons * NO_O_EPSILONS = fst.kNoOEpsilons */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2848, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_I_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2848, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_I_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2849 + /* "pywrapfst.pyx":2850 * I_EPSILONS = fst.kIEpsilons * NO_I_EPSILONS = fst.kNoIEpsilons * O_EPSILONS = fst.kOEpsilons # <<<<<<<<<<<<<< * NO_O_EPSILONS = fst.kNoOEpsilons * I_LABEL_SORTED = fst.kILabelSorted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2849, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2849, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2850, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2850 + /* "pywrapfst.pyx":2851 * NO_I_EPSILONS = fst.kNoIEpsilons * O_EPSILONS = fst.kOEpsilons * NO_O_EPSILONS = fst.kNoOEpsilons # <<<<<<<<<<<<<< * I_LABEL_SORTED = fst.kILabelSorted * NOT_I_LABEL_SORTED = fst.kNotILabelSorted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2850, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_O_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2850, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_O_EPSILONS, __pyx_t_1) < 0) __PYX_ERR(0, 2851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2851 + /* "pywrapfst.pyx":2852 * O_EPSILONS = fst.kOEpsilons * NO_O_EPSILONS = fst.kNoOEpsilons * I_LABEL_SORTED = fst.kILabelSorted # <<<<<<<<<<<<<< * NOT_I_LABEL_SORTED = fst.kNotILabelSorted * O_LABEL_SORTED = fst.kOLabelSorted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2851, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2852, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2852 + /* "pywrapfst.pyx":2853 * NO_O_EPSILONS = fst.kNoOEpsilons * I_LABEL_SORTED = fst.kILabelSorted * NOT_I_LABEL_SORTED = fst.kNotILabelSorted # <<<<<<<<<<<<<< * O_LABEL_SORTED = fst.kOLabelSorted * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2852, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2852, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2853 + /* "pywrapfst.pyx":2854 * I_LABEL_SORTED = fst.kILabelSorted * NOT_I_LABEL_SORTED = fst.kNotILabelSorted * O_LABEL_SORTED = fst.kOLabelSorted # <<<<<<<<<<<<<< * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted * WEIGHTED = fst.kWeighted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2853, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2853, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2854 + /* "pywrapfst.pyx":2855 * NOT_I_LABEL_SORTED = fst.kNotILabelSorted * O_LABEL_SORTED = fst.kOLabelSorted * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted # <<<<<<<<<<<<<< * WEIGHTED = fst.kWeighted * UNWEIGHTED = fst.kUnweighted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2854, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2854, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2855 + /* "pywrapfst.pyx":2856 * O_LABEL_SORTED = fst.kOLabelSorted * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted * WEIGHTED = fst.kWeighted # <<<<<<<<<<<<<< * UNWEIGHTED = fst.kUnweighted * CYCLIC = fst.kCyclic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2855, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED, __pyx_t_1) < 0) __PYX_ERR(0, 2855, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED, __pyx_t_1) < 0) __PYX_ERR(0, 2856, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2856 + /* "pywrapfst.pyx":2857 * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted * WEIGHTED = fst.kWeighted * UNWEIGHTED = fst.kUnweighted # <<<<<<<<<<<<<< * CYCLIC = fst.kCyclic * ACYCLIC = fst.kAcyclic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED, __pyx_t_1) < 0) __PYX_ERR(0, 2856, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED, __pyx_t_1) < 0) __PYX_ERR(0, 2857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2857 + /* "pywrapfst.pyx":2858 * WEIGHTED = fst.kWeighted * UNWEIGHTED = fst.kUnweighted * CYCLIC = fst.kCyclic # <<<<<<<<<<<<<< * ACYCLIC = fst.kAcyclic * INITIAL_CYCLIC = fst.kInitialCyclic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2857, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2858 + /* "pywrapfst.pyx":2859 * UNWEIGHTED = fst.kUnweighted * CYCLIC = fst.kCyclic * ACYCLIC = fst.kAcyclic # <<<<<<<<<<<<<< * INITIAL_CYCLIC = fst.kInitialCyclic * INITIAL_ACYCLIC = fst.kInitialAcyclic */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2858, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2858, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2859, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2859 + /* "pywrapfst.pyx":2860 * CYCLIC = fst.kCyclic * ACYCLIC = fst.kAcyclic * INITIAL_CYCLIC = fst.kInitialCyclic # <<<<<<<<<<<<<< * INITIAL_ACYCLIC = fst.kInitialAcyclic * TOP_SORTED = fst.kTopSorted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2859, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2860, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2860 + /* "pywrapfst.pyx":2861 * ACYCLIC = fst.kAcyclic * INITIAL_CYCLIC = fst.kInitialCyclic * INITIAL_ACYCLIC = fst.kInitialAcyclic # <<<<<<<<<<<<<< * TOP_SORTED = fst.kTopSorted * NOT_TOP_SORTED = fst.kNotTopSorted */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2860, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2860, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_1) < 0) __PYX_ERR(0, 2861, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2861 + /* "pywrapfst.pyx":2862 * INITIAL_CYCLIC = fst.kInitialCyclic * INITIAL_ACYCLIC = fst.kInitialAcyclic * TOP_SORTED = fst.kTopSorted # <<<<<<<<<<<<<< * NOT_TOP_SORTED = fst.kNotTopSorted * ACCESSIBLE = fst.kAccessible */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2861, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOP_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2861, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOP_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2862, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2862 + /* "pywrapfst.pyx":2863 * INITIAL_ACYCLIC = fst.kInitialAcyclic * TOP_SORTED = fst.kTopSorted * NOT_TOP_SORTED = fst.kNotTopSorted # <<<<<<<<<<<<<< * ACCESSIBLE = fst.kAccessible * NOT_ACCESSIBLE = fst.kNotAccessible */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2862, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2862, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_1) < 0) __PYX_ERR(0, 2863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2863 + /* "pywrapfst.pyx":2864 * TOP_SORTED = fst.kTopSorted * NOT_TOP_SORTED = fst.kNotTopSorted * ACCESSIBLE = fst.kAccessible # <<<<<<<<<<<<<< * NOT_ACCESSIBLE = fst.kNotAccessible * COACCESSIBLE = fst.kCoAccessible */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2863, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2863, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2864, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2864 + /* "pywrapfst.pyx":2865 * NOT_TOP_SORTED = fst.kNotTopSorted * ACCESSIBLE = fst.kAccessible * NOT_ACCESSIBLE = fst.kNotAccessible # <<<<<<<<<<<<<< * COACCESSIBLE = fst.kCoAccessible * NOT_COACCESSIBLE = fst.kNotCoAccessible */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2864, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2865, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2865 + /* "pywrapfst.pyx":2866 * ACCESSIBLE = fst.kAccessible * NOT_ACCESSIBLE = fst.kNotAccessible * COACCESSIBLE = fst.kCoAccessible # <<<<<<<<<<<<<< * NOT_COACCESSIBLE = fst.kNotCoAccessible * STRING = fst.kString */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2865, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_COACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2865, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_COACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2866 + /* "pywrapfst.pyx":2867 * NOT_ACCESSIBLE = fst.kNotAccessible * COACCESSIBLE = fst.kCoAccessible * NOT_COACCESSIBLE = fst.kNotCoAccessible # <<<<<<<<<<<<<< * STRING = fst.kString * NOT_STRING = fst.kNotString */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2866, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2866, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_1) < 0) __PYX_ERR(0, 2867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2867 + /* "pywrapfst.pyx":2868 * COACCESSIBLE = fst.kCoAccessible * NOT_COACCESSIBLE = fst.kNotCoAccessible * STRING = fst.kString # <<<<<<<<<<<<<< * NOT_STRING = fst.kNotString * WEIGHTED_CYCLES = fst.kWeightedCycles */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2867, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING, __pyx_t_1) < 0) __PYX_ERR(0, 2867, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING, __pyx_t_1) < 0) __PYX_ERR(0, 2868, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2868 + /* "pywrapfst.pyx":2869 * NOT_COACCESSIBLE = fst.kNotCoAccessible * STRING = fst.kString * NOT_STRING = fst.kNotString # <<<<<<<<<<<<<< * WEIGHTED_CYCLES = fst.kWeightedCycles * UNWEIGHTED_CYCLES = fst.kUnweightedCycles */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2868, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_STRING, __pyx_t_1) < 0) __PYX_ERR(0, 2868, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_STRING, __pyx_t_1) < 0) __PYX_ERR(0, 2869, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2869 + /* "pywrapfst.pyx":2870 * STRING = fst.kString * NOT_STRING = fst.kNotString * WEIGHTED_CYCLES = fst.kWeightedCycles # <<<<<<<<<<<<<< * UNWEIGHTED_CYCLES = fst.kUnweightedCycles * NULL_PROPERTIES = fst.kNullProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2869, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_1) < 0) __PYX_ERR(0, 2869, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_1) < 0) __PYX_ERR(0, 2870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2870 + /* "pywrapfst.pyx":2871 * NOT_STRING = fst.kNotString * WEIGHTED_CYCLES = fst.kWeightedCycles * UNWEIGHTED_CYCLES = fst.kUnweightedCycles # <<<<<<<<<<<<<< * NULL_PROPERTIES = fst.kNullProperties * COPY_PROPERTIES = fst.kCopyProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2870, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_1) < 0) __PYX_ERR(0, 2870, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_1) < 0) __PYX_ERR(0, 2871, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2871 + /* "pywrapfst.pyx":2872 * WEIGHTED_CYCLES = fst.kWeightedCycles * UNWEIGHTED_CYCLES = fst.kUnweightedCycles * NULL_PROPERTIES = fst.kNullProperties # <<<<<<<<<<<<<< * COPY_PROPERTIES = fst.kCopyProperties * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NULL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2871, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NULL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2872, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2872 + /* "pywrapfst.pyx":2873 * UNWEIGHTED_CYCLES = fst.kUnweightedCycles * NULL_PROPERTIES = fst.kNullProperties * COPY_PROPERTIES = fst.kCopyProperties # <<<<<<<<<<<<<< * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2872, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2872, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2873 + /* "pywrapfst.pyx":2874 * NULL_PROPERTIES = fst.kNullProperties * COPY_PROPERTIES = fst.kCopyProperties * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties # <<<<<<<<<<<<<< * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties * SET_START_PROPERTIES = fst.kSetStartProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2873, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2873, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2874 + /* "pywrapfst.pyx":2875 * COPY_PROPERTIES = fst.kCopyProperties * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties # <<<<<<<<<<<<<< * SET_START_PROPERTIES = fst.kSetStartProperties * SET_FINAL_PROPERTIES = fst.kSetFinalProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2874, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2875 + /* "pywrapfst.pyx":2876 * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties * SET_START_PROPERTIES = fst.kSetStartProperties # <<<<<<<<<<<<<< * SET_FINAL_PROPERTIES = fst.kSetFinalProperties * ADD_STATE_PROPERTIES = fst.kAddStateProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2875, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2875, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2876 + /* "pywrapfst.pyx":2877 * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties * SET_START_PROPERTIES = fst.kSetStartProperties * SET_FINAL_PROPERTIES = fst.kSetFinalProperties # <<<<<<<<<<<<<< * ADD_STATE_PROPERTIES = fst.kAddStateProperties * ADD_ARC_PROPERTIES = fst.kAddArcProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2876, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2876, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2877, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2877 + /* "pywrapfst.pyx":2878 * SET_START_PROPERTIES = fst.kSetStartProperties * SET_FINAL_PROPERTIES = fst.kSetFinalProperties * ADD_STATE_PROPERTIES = fst.kAddStateProperties # <<<<<<<<<<<<<< * ADD_ARC_PROPERTIES = fst.kAddArcProperties * SET_ARC_PROPERTIES = fst.kSetArcProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2877, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2877, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2878, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2878 + /* "pywrapfst.pyx":2879 * SET_FINAL_PROPERTIES = fst.kSetFinalProperties * ADD_STATE_PROPERTIES = fst.kAddStateProperties * ADD_ARC_PROPERTIES = fst.kAddArcProperties # <<<<<<<<<<<<<< * SET_ARC_PROPERTIES = fst.kSetArcProperties * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2878, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2878, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2879, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2879 + /* "pywrapfst.pyx":2880 * ADD_STATE_PROPERTIES = fst.kAddStateProperties * ADD_ARC_PROPERTIES = fst.kAddArcProperties * SET_ARC_PROPERTIES = fst.kSetArcProperties # <<<<<<<<<<<<<< * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2879, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2879, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2880, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2880 + /* "pywrapfst.pyx":2881 * ADD_ARC_PROPERTIES = fst.kAddArcProperties * SET_ARC_PROPERTIES = fst.kSetArcProperties * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties # <<<<<<<<<<<<<< * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties * STATE_SORT_PROPERTIES = fst.kStateSortProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2880, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2881 + /* "pywrapfst.pyx":2882 * SET_ARC_PROPERTIES = fst.kSetArcProperties * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties # <<<<<<<<<<<<<< * STATE_SORT_PROPERTIES = fst.kStateSortProperties * ARC_SORT_PROPERTIES = fst.kArcSortProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2881, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2881, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2882, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2882 + /* "pywrapfst.pyx":2883 * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties * STATE_SORT_PROPERTIES = fst.kStateSortProperties # <<<<<<<<<<<<<< * ARC_SORT_PROPERTIES = fst.kArcSortProperties * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2882, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2882, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2883 + /* "pywrapfst.pyx":2884 * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties * STATE_SORT_PROPERTIES = fst.kStateSortProperties * ARC_SORT_PROPERTIES = fst.kArcSortProperties # <<<<<<<<<<<<<< * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2883, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2884 + /* "pywrapfst.pyx":2885 * STATE_SORT_PROPERTIES = fst.kStateSortProperties * ARC_SORT_PROPERTIES = fst.kArcSortProperties * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties # <<<<<<<<<<<<<< * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2884, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2885 + /* "pywrapfst.pyx":2886 * ARC_SORT_PROPERTIES = fst.kArcSortProperties * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties # <<<<<<<<<<<<<< * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2885, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2885, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2886 + /* "pywrapfst.pyx":2887 * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties # <<<<<<<<<<<<<< * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2886, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2886, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2887 + /* "pywrapfst.pyx":2888 * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties # <<<<<<<<<<<<<< * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties * BINARY_PROPERTIES = fst.kBinaryProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2887, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2887, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2888 + /* "pywrapfst.pyx":2889 * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties # <<<<<<<<<<<<<< * BINARY_PROPERTIES = fst.kBinaryProperties * TRINARY_PROPERTIES = fst.kTrinaryProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2888, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2888, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2889 + /* "pywrapfst.pyx":2890 * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties * BINARY_PROPERTIES = fst.kBinaryProperties # <<<<<<<<<<<<<< * TRINARY_PROPERTIES = fst.kTrinaryProperties * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2889, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2889, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2890 + /* "pywrapfst.pyx":2891 * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties * BINARY_PROPERTIES = fst.kBinaryProperties * TRINARY_PROPERTIES = fst.kTrinaryProperties # <<<<<<<<<<<<<< * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2890, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2891 + /* "pywrapfst.pyx":2892 * BINARY_PROPERTIES = fst.kBinaryProperties * TRINARY_PROPERTIES = fst.kTrinaryProperties * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties # <<<<<<<<<<<<<< * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties * FST_PROPERTIES = fst.kFstProperties */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2891, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2892 + /* "pywrapfst.pyx":2893 * TRINARY_PROPERTIES = fst.kTrinaryProperties * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties # <<<<<<<<<<<<<< * FST_PROPERTIES = fst.kFstProperties * */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2892, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2892, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2893 + /* "pywrapfst.pyx":2894 * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties * FST_PROPERTIES = fst.kFstProperties # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FST_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2893, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FST_PROPERTIES, __pyx_t_1) < 0) __PYX_ERR(0, 2894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2899 + /* "pywrapfst.pyx":2900 * * * ARC_I_LABEL_VALUE = fst.kArcILabelValue # <<<<<<<<<<<<<< * ARC_O_LABEL_VALUE = fst.kArcOLabelValue * ARC_WEIGHT_VALUE = fst.kArcWeightValue */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcILabelValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2899, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcILabelValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2899, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2900 + /* "pywrapfst.pyx":2901 * * ARC_I_LABEL_VALUE = fst.kArcILabelValue * ARC_O_LABEL_VALUE = fst.kArcOLabelValue # <<<<<<<<<<<<<< * ARC_WEIGHT_VALUE = fst.kArcWeightValue * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcOLabelValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2900, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcOLabelValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2900, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2901 + /* "pywrapfst.pyx":2902 * ARC_I_LABEL_VALUE = fst.kArcILabelValue * ARC_O_LABEL_VALUE = fst.kArcOLabelValue * ARC_WEIGHT_VALUE = fst.kArcWeightValue # <<<<<<<<<<<<<< * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue * ARC_NO_CACHE = fst.kArcNoCache */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcWeightValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2901, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcWeightValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2901, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2902 + /* "pywrapfst.pyx":2903 * ARC_O_LABEL_VALUE = fst.kArcOLabelValue * ARC_WEIGHT_VALUE = fst.kArcWeightValue * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue # <<<<<<<<<<<<<< * ARC_NO_CACHE = fst.kArcNoCache * ARC_VALUE_FLAGS = fst.kArcValueFlags */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcNextStateValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2902, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcNextStateValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2902, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_1) < 0) __PYX_ERR(0, 2903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2903 + /* "pywrapfst.pyx":2904 * ARC_WEIGHT_VALUE = fst.kArcWeightValue * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue * ARC_NO_CACHE = fst.kArcNoCache # <<<<<<<<<<<<<< * ARC_VALUE_FLAGS = fst.kArcValueFlags * ARC_FLAGS = fst.kArcFlags */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcNoCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2903, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcNoCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_1) < 0) __PYX_ERR(0, 2903, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_1) < 0) __PYX_ERR(0, 2904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2904 + /* "pywrapfst.pyx":2905 * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue * ARC_NO_CACHE = fst.kArcNoCache * ARC_VALUE_FLAGS = fst.kArcValueFlags # <<<<<<<<<<<<<< * ARC_FLAGS = fst.kArcFlags * */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcValueFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2904, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcValueFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_1) < 0) __PYX_ERR(0, 2904, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_1) < 0) __PYX_ERR(0, 2905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2905 + /* "pywrapfst.pyx":2906 * ARC_NO_CACHE = fst.kArcNoCache * ARC_VALUE_FLAGS = fst.kArcValueFlags * ARC_FLAGS = fst.kArcFlags # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2905, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kArcFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_1) < 0) __PYX_ERR(0, 2905, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_1) < 0) __PYX_ERR(0, 2906, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2911 + /* "pywrapfst.pyx":2912 * * * ENCODE_LABELS = fst.kEncodeLabels # <<<<<<<<<<<<<< * ENCODE_WEIGHTS = fst.kEncodeWeights * ENCODE_FLAGS = fst.kEncodeFlags */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kEncodeLabels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kEncodeLabels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_1) < 0) __PYX_ERR(0, 2911, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_1) < 0) __PYX_ERR(0, 2912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2912 + /* "pywrapfst.pyx":2913 * * ENCODE_LABELS = fst.kEncodeLabels * ENCODE_WEIGHTS = fst.kEncodeWeights # <<<<<<<<<<<<<< * ENCODE_FLAGS = fst.kEncodeFlags * */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kEncodeWeights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2912, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kEncodeWeights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_1) < 0) __PYX_ERR(0, 2912, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_1) < 0) __PYX_ERR(0, 2913, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":2913 + /* "pywrapfst.pyx":2914 * ENCODE_LABELS = fst.kEncodeLabels * ENCODE_WEIGHTS = fst.kEncodeWeights * ENCODE_FLAGS = fst.kEncodeFlags # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kEncodeFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2913, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(fst::kEncodeFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_1) < 0) __PYX_ERR(0, 2913, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_1) < 0) __PYX_ERR(0, 2914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":3285 + /* "pywrapfst.pyx":3286 * * cdef _Fst _map(_Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51546,7 +51463,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__31 = fst::kDelta; - /* "pywrapfst.pyx":3299 + /* "pywrapfst.pyx":3300 * * cpdef _Fst arcmap(_Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51555,7 +51472,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__32 = fst::kDelta; - /* "pywrapfst.pyx":3298 + /* "pywrapfst.pyx":3299 * * * cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<< @@ -51564,7 +51481,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__32 = fst::kDelta; - /* "pywrapfst.pyx":3411 + /* "pywrapfst.pyx":3413 * * cpdef _MutableFst determinize(_Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -51573,7 +51490,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__33 = fst::kShortestDelta; - /* "pywrapfst.pyx":3413 + /* "pywrapfst.pyx":3415 * float delta=fst.kShortestDelta, * det_type=b"functional", * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51582,7 +51499,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__34 = fst::kNoStateId; - /* "pywrapfst.pyx":3411 + /* "pywrapfst.pyx":3413 * * cpdef _MutableFst determinize(_Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -51591,7 +51508,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__33 = fst::kShortestDelta; - /* "pywrapfst.pyx":3413 + /* "pywrapfst.pyx":3415 * float delta=fst.kShortestDelta, * det_type=b"functional", * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51600,7 +51517,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__34 = fst::kNoStateId; - /* "pywrapfst.pyx":3504 + /* "pywrapfst.pyx":3507 * * cpdef _MutableFst disambiguate(_Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51609,7 +51526,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__35 = fst::kDelta; - /* "pywrapfst.pyx":3505 + /* "pywrapfst.pyx":3508 * cpdef _MutableFst disambiguate(_Fst ifst, * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51618,7 +51535,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__36 = fst::kNoStateId; - /* "pywrapfst.pyx":3504 + /* "pywrapfst.pyx":3507 * * cpdef _MutableFst disambiguate(_Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51627,7 +51544,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__35 = fst::kDelta; - /* "pywrapfst.pyx":3505 + /* "pywrapfst.pyx":3508 * cpdef _MutableFst disambiguate(_Fst ifst, * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51636,7 +51553,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__36 = fst::kNoStateId; - /* "pywrapfst.pyx":3575 + /* "pywrapfst.pyx":3578 * * * cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -51646,7 +51563,7 @@ if (!__Pyx_RefNanny) { __pyx_k__37 = fst::kDelta; __pyx_k__37 = fst::kDelta; - /* "pywrapfst.pyx":3598 + /* "pywrapfst.pyx":3601 * * * cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<< @@ -51656,7 +51573,7 @@ if (!__Pyx_RefNanny) { __pyx_k__38 = fst::kDelta; __pyx_k__38 = fst::kDelta; - /* "pywrapfst.pyx":3654 + /* "pywrapfst.pyx":3658 * * * cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -51666,7 +51583,7 @@ if (!__Pyx_RefNanny) { __pyx_k__39 = fst::kDelta; __pyx_k__39 = fst::kDelta; - /* "pywrapfst.pyx":3681 + /* "pywrapfst.pyx":3685 * * cpdef _MutableFst prune(_Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51675,7 +51592,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__40 = fst::kDelta; - /* "pywrapfst.pyx":3682 + /* "pywrapfst.pyx":3686 * cpdef _MutableFst prune(_Fst ifst, * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51684,7 +51601,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__41 = fst::kNoStateId; - /* "pywrapfst.pyx":3681 + /* "pywrapfst.pyx":3685 * * cpdef _MutableFst prune(_Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51693,7 +51610,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__40 = fst::kDelta; - /* "pywrapfst.pyx":3682 + /* "pywrapfst.pyx":3686 * cpdef _MutableFst prune(_Fst ifst, * float delta=fst.kDelta, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51702,7 +51619,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__41 = fst::kNoStateId; - /* "pywrapfst.pyx":3714 + /* "pywrapfst.pyx":3718 * * cpdef _MutableFst push(_Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51711,7 +51628,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__42 = fst::kDelta; - /* "pywrapfst.pyx":3713 + /* "pywrapfst.pyx":3717 * * * cpdef _MutableFst push(_Fst ifst, # <<<<<<<<<<<<<< @@ -51720,7 +51637,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__42 = fst::kDelta; - /* "pywrapfst.pyx":3770 + /* "pywrapfst.pyx":3774 * _Fst ifst2, * int32 npath=1, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51729,7 +51646,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__43 = fst::kDelta; - /* "pywrapfst.pyx":3773 + /* "pywrapfst.pyx":3777 * time_t seed=0, * select=b"uniform", * int32 max_length=INT32_MAX) except *: # <<<<<<<<<<<<<< @@ -51738,7 +51655,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__44 = INT32_MAX; - /* "pywrapfst.pyx":3770 + /* "pywrapfst.pyx":3774 * _Fst ifst2, * int32 npath=1, * float delta=fst.kDelta, # <<<<<<<<<<<<<< @@ -51747,7 +51664,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__43 = fst::kDelta; - /* "pywrapfst.pyx":3773 + /* "pywrapfst.pyx":3777 * time_t seed=0, * select=b"uniform", * int32 max_length=INT32_MAX) except *: # <<<<<<<<<<<<<< @@ -51756,7 +51673,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__44 = INT32_MAX; - /* "pywrapfst.pyx":3817 + /* "pywrapfst.pyx":3821 * time_t seed=0, * select=b"uniform", * int32 max_length=INT32_MAX, # <<<<<<<<<<<<<< @@ -51765,7 +51682,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__45 = INT32_MAX; - /* "pywrapfst.pyx":3813 + /* "pywrapfst.pyx":3817 * * * cpdef _MutableFst randgen(_Fst ifst, # <<<<<<<<<<<<<< @@ -51774,7 +51691,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__45 = INT32_MAX; - /* "pywrapfst.pyx":3955 + /* "pywrapfst.pyx":3959 * * cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -51783,7 +51700,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__46 = fst::kShortestDelta; - /* "pywrapfst.pyx":3956 + /* "pywrapfst.pyx":3960 * cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst, * float delta=fst.kShortestDelta, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51792,7 +51709,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__47 = fst::kNoStateId; - /* "pywrapfst.pyx":3977 + /* "pywrapfst.pyx":3981 * * def shortestdistance(_Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -51801,7 +51718,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__48 = fst::kShortestDelta; - /* "pywrapfst.pyx":3978 + /* "pywrapfst.pyx":3982 * def shortestdistance(_Fst ifst, * float delta=fst.kShortestDelta, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51810,19 +51727,19 @@ if (!__Pyx_RefNanny) { */ __pyx_k__49 = fst::kNoStateId; - /* "pywrapfst.pyx":3976 + /* "pywrapfst.pyx":3980 * * * def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * int64 nstate=fst.kNoStateId, */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_53shortestdistance, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3976, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_53shortestdistance, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_1) < 0) __PYX_ERR(0, 3976, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_1) < 0) __PYX_ERR(0, 3980, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pywrapfst.pyx":4014 + /* "pywrapfst.pyx":4018 * * cpdef _MutableFst shortestpath(_Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -51831,7 +51748,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__50 = fst::kShortestDelta; - /* "pywrapfst.pyx":4016 + /* "pywrapfst.pyx":4020 * float delta=fst.kShortestDelta, * int32 nshortest=1, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51840,7 +51757,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__51 = fst::kNoStateId; - /* "pywrapfst.pyx":4014 + /* "pywrapfst.pyx":4018 * * cpdef _MutableFst shortestpath(_Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< @@ -51849,7 +51766,7 @@ if (!__Pyx_RefNanny) { */ __pyx_k__50 = fst::kShortestDelta; - /* "pywrapfst.pyx":4016 + /* "pywrapfst.pyx":4020 * float delta=fst.kShortestDelta, * int32 nshortest=1, * int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<< @@ -51858,75 +51775,75 @@ if (!__Pyx_RefNanny) { */ __pyx_k__51 = fst::kNoStateId; - /* "pywrapfst.pyx":4167 + /* "pywrapfst.pyx":4171 * * def __cinit__(self, * string fst_type=b"vector", # <<<<<<<<<<<<<< * string arc_type=b"standard", * SymbolTable isymbols=None, */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_vector); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4167, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_vector); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4171, __pyx_L1_error) __pyx_k__52 = __pyx_t_5; - /* "pywrapfst.pyx":4168 + /* "pywrapfst.pyx":4172 * def __cinit__(self, * string fst_type=b"vector", * string arc_type=b"standard", # <<<<<<<<<<<<<< * SymbolTable isymbols=None, * SymbolTable osymbols=None, */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_standard); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_standard); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4172, __pyx_L1_error) __pyx_k__53 = __pyx_t_5; - /* "pywrapfst.pyx":4269 + /* "pywrapfst.pyx":4273 * * @classmethod * def open(cls, *filenames): # <<<<<<<<<<<<<< * """ * FarReader.open(*filenames) */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4269, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pywrapfst.pyx":4268 + /* "pywrapfst.pyx":4272 * return "<{} FarReader at 0x{:x}>".format(self.far_type(), id(self)) * * @classmethod # <<<<<<<<<<<<<< * def open(cls, *filenames): * """ */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4268, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarReader->tp_dict, __pyx_n_s_open, __pyx_t_2) < 0) __PYX_ERR(0, 4269, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarReader->tp_dict, __pyx_n_s_open, __pyx_t_2) < 0) __PYX_ERR(0, 4273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_FarReader); - /* "pywrapfst.pyx":4420 + /* "pywrapfst.pyx":4424 * * @classmethod * def create(cls, filename, arc_type=b"standard", far_type=b"default"): # <<<<<<<<<<<<<< * """ * FarWriter. */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4420, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pywrapfst.pyx":4419 + /* "pywrapfst.pyx":4423 * return "<{} FarWriter at 0x{:x}>".format(self.far_type(), id(self)) * * @classmethod # <<<<<<<<<<<<<< * def create(cls, filename, arc_type=b"standard", far_type=b"default"): * """ */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4419, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarWriter->tp_dict, __pyx_n_s_create, __pyx_t_1) < 0) __PYX_ERR(0, 4420, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarWriter->tp_dict, __pyx_n_s_create, __pyx_t_1) < 0) __PYX_ERR(0, 4424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_9pywrapfst_FarWriter); - /* "pywrapfst.pyx":4512 + /* "pywrapfst.pyx":4516 * * # Masks fst_error_fatal in-module. * fst.FLAGS_fst_error_fatal = False # <<<<<<<<<<<<<< @@ -52276,6 +52193,32 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec } #endif +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) diff --git a/src/extensions/python/pywrapfst.pyx b/src/extensions/python/pywrapfst.pyx index 71fd34b..3d76714 100644 --- a/src/extensions/python/pywrapfst.pyx +++ b/src/extensions/python/pywrapfst.pyx @@ -208,7 +208,8 @@ cdef fst.ComposeFilter _get_compose_filter( Args: compose_filter: A string matching a known composition filter; one of: - "alt_sequence", "auto", "match", "null", "sequence", "trivial". + "alt_sequence", "auto", "match", "no_match", "null", "sequence", + "trivial". Returns: A ComposeFilter enum value. @@ -3381,7 +3382,8 @@ cpdef _MutableFst compose(_Fst ifst1, ifst1: The first input FST. ifst2: The second input FST. compose_filter: A string matching a known composition filter; one of: - "alt_sequence", "auto", "match", "null", "sequence", "trivial". + "alt_sequence", "auto", "match", "no_match", "null", "sequence", + "trivial". connect: Should output be trimmed? Returns: @@ -3502,7 +3504,8 @@ cpdef _MutableFst difference(_Fst ifst1, ifst1: The first input FST. ifst2: The second input FST. compose_filter: A string matching a known composition filter; one of: - "alt_sequence", "auto", "match", "null", "sequence", "trivial". + "alt_sequence", "auto", "match", "no_match", "null", "sequence", + "trivial". connect: Should the output FST be trimmed? Returns: @@ -3653,7 +3656,8 @@ cpdef _MutableFst intersect(_Fst ifst1, ifst1: The first input FST. ifst2: The second input FST. compose_filter: A string matching a known composition filter; one of: - "alt_sequence", "auto", "match", "null", "sequence", "trivial". + "alt_sequence", "auto", "match", "no_match", "null", "sequence", + "trivial". connect: Should output be trimmed? Returns: diff --git a/src/extensions/special/Makefile.am b/src/extensions/special/Makefile.am index 41b68ff..c5c135f 100644 --- a/src/extensions/special/Makefile.am +++ b/src/extensions/special/Makefile.am @@ -16,7 +16,7 @@ libfst_LTLIBRARIES = phi-fst.la rho-fst.la sigma-fst.la lib_LTLIBRARIES = libfstspecial.la libfstspecial_la_SOURCES = phi-fst.cc rho-fst.cc sigma-fst.cc -libfstspecial_la_LDFLAGS = -version-info 15:0:0 -lm $(DL_LIBS) +libfstspecial_la_LDFLAGS = -version-info 16:0:0 -lm $(DL_LIBS) libfstspecial_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) phi_fst_la_SOURCES = phi-fst.cc diff --git a/src/extensions/special/Makefile.in b/src/extensions/special/Makefile.in index 934e9cb..dc98482 100644 --- a/src/extensions/special/Makefile.in +++ b/src/extensions/special/Makefile.in @@ -389,7 +389,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../include -I$(srcdir)/../../bin $(ICU_CPPFLAGS) libfst_LTLIBRARIES = phi-fst.la rho-fst.la sigma-fst.la lib_LTLIBRARIES = libfstspecial.la libfstspecial_la_SOURCES = phi-fst.cc rho-fst.cc sigma-fst.cc -libfstspecial_la_LDFLAGS = -version-info 15:0:0 -lm $(DL_LIBS) +libfstspecial_la_LDFLAGS = -version-info 16:0:0 -lm $(DL_LIBS) libfstspecial_la_LIBADD = ../../lib/libfst.la -lm $(DL_LIBS) phi_fst_la_SOURCES = phi-fst.cc phi_fst_la_LDFLAGS = -module diff --git a/src/include/fst/accumulator.h b/src/include/fst/accumulator.h index eb0f349..5ae1924 100644 --- a/src/include/fst/accumulator.h +++ b/src/include/fst/accumulator.h @@ -99,8 +99,8 @@ class LogAccumulator { } } - WeightConvert to_log_weight_; - WeightConvert to_weight_; + const WeightConvert to_log_weight_{}; + const WeightConvert to_weight_{}; LogAccumulator &operator=(const LogAccumulator &) = delete; }; @@ -370,8 +370,8 @@ class FastLogAccumulator { } } - const WeightConvert to_log_weight_; - const WeightConvert to_weight_; + const WeightConvert to_log_weight_{}; + const WeightConvert to_weight_{}; const ssize_t arc_limit_; // Minimum number of arcs to pre-compute state. const ssize_t arc_period_; // Saves cumulative weights per arc_period_. std::shared_ptr data_; @@ -625,8 +625,8 @@ class CacheLogAccumulator { } - WeightConvert to_log_weight_; - WeightConvert to_weight_; + const WeightConvert to_log_weight_{}; + const WeightConvert to_weight_{}; ssize_t arc_limit_; // Minimum # of arcs to cache a state. std::vector *weights_; // Accumulated weights for cur. state. std::unique_ptr> fst_; // Input FST. diff --git a/src/include/fst/arc-map.h b/src/include/fst/arc-map.h index 5b72978..24db491 100644 --- a/src/include/fst/arc-map.h +++ b/src/include/fst/arc-map.h @@ -94,7 +94,6 @@ template void ArcMap(MutableFst *fst, C *mapper) { using FromArc = A; using ToArc = A; - using StateId = typename FromArc::StateId; using Weight = typename FromArc::Weight; if (mapper->InputSymbolsAction() == MAP_CLEAR_SYMBOLS) { fst->SetInputSymbols(nullptr); @@ -181,7 +180,6 @@ template void ArcMap(const Fst &ifst, MutableFst *ofst, C *mapper) { using FromArc = A; using StateId = typename FromArc::StateId; - using Weight = typename FromArc::Weight; ofst->DeleteStates(); if (mapper->InputSymbolsAction() == MAP_COPY_SYMBOLS) { ofst->SetInputSymbols(ifst.InputSymbols()); diff --git a/src/include/fst/cache.h b/src/include/fst/cache.h index 5ec46d5..13b7cf8 100644 --- a/src/include/fst/cache.h +++ b/src/include/fst/cache.h @@ -310,18 +310,22 @@ class VectorCacheStore { return *this; } + bool InBounds(StateId s) const { + return s < static_cast(state_vec_.size()); + } + // Returns nullptr if state is not stored. const State *GetState(StateId s) const { - return s < state_vec_.size() ? state_vec_[s] : nullptr; + return InBounds(s) ? state_vec_[s] : nullptr; } // Creates state if state is not stored. State *GetMutableState(StateId s) { State *state = nullptr; - if (s >= state_vec_.size()) { - state_vec_.resize(s + 1, nullptr); - } else { + if (InBounds(s)) { state = state_vec_[s]; + } else { + state_vec_.resize(s + 1, nullptr); } if (!state) { state = new (&state_alloc_) State(arc_alloc_); @@ -346,8 +350,8 @@ class VectorCacheStore { // Deletes all cached states. void Clear() { - for (StateId s = 0; s < state_vec_.size(); ++s) { - State::Destroy(state_vec_[s], &state_alloc_); + for (State *s : state_vec_) { + State::Destroy(s, &state_alloc_); } state_vec_.clear(); state_list_.clear(); @@ -379,7 +383,7 @@ class VectorCacheStore { void CopyStates(const VectorCacheStore &store) { Clear(); state_vec_.reserve(store.state_vec_.size()); - for (StateId s = 0; s < store.state_vec_.size(); ++s) { + for (size_t s = 0; s < store.state_vec_.size(); ++s) { State *state = nullptr; const auto *store_state = store.state_vec_[s]; if (store_state) { @@ -1068,7 +1072,8 @@ class CacheBaseImpl : public FstImpl { if (s < min_unexpanded_state_id_) return; if (s == min_unexpanded_state_id_) ++min_unexpanded_state_id_; if (cache_gc_ || cache_limit_ == 0) { - if (expanded_states_.size() <= s) expanded_states_.resize(s + 1, false); + if (expanded_states_.size() <= static_cast(s)) + expanded_states_.resize(s + 1, false); expanded_states_[s] = true; } } diff --git a/src/include/fst/closure.h b/src/include/fst/closure.h index 0e3df04..13beea9 100644 --- a/src/include/fst/closure.h +++ b/src/include/fst/closure.h @@ -30,8 +30,6 @@ namespace fst { // where V is the number of states. template void Closure(MutableFst *fst, ClosureType closure_type) { - using Label = typename Arc::Label; - using StateId = typename Arc::StateId; using Weight = typename Arc::Weight; const auto props = fst->Properties(kFstProperties, false); const auto start = fst->Start(); diff --git a/src/include/fst/compact-fst.h b/src/include/fst/compact-fst.h index 85e9336..402c87b 100644 --- a/src/include/fst/compact-fst.h +++ b/src/include/fst/compact-fst.h @@ -61,7 +61,7 @@ struct CompactFstOptions : public CacheOptions { // StateId GetStateId() const; // Weight Final() const; // size_t NumArcs() const; -// Arc GetArc(size_t i) const; +// Arc GetArc(size_t i, uint32 f) const; // }; // // // Modifies 'state' accessor to provide access to state id 's'. @@ -282,7 +282,7 @@ DefaultCompactStore::DefaultCompactStore( for (ArcIterator> aiter(fst, s); !aiter.Done(); aiter.Next()) { compacts_[pos++] = compactor.Compact(s, aiter.Value()); } - if ((compactor.Size() != -1) && ((pos - fpos) != compactor.Size())) { + if ((compactor.Size() != -1) && (pos != fpos + compactor.Size())) { FSTERROR() << "DefaultCompactStore: Compactor incompatible with FST"; error_ = true; return; diff --git a/src/include/fst/compose-filter.h b/src/include/fst/compose-filter.h index 72b79bc..7251e27 100644 --- a/src/include/fst/compose-filter.h +++ b/src/include/fst/compose-filter.h @@ -443,6 +443,69 @@ class MatchComposeFilter { bool noeps2_; // No epsilons leaving s2? }; +// This filter disallows matching epsilons on FST1 with epsilons on FST2, +// but allows all other matches, potentially resulting in redundant +// epsilon paths. The use of this filter gives correct results iff one of the +// following conditions hold: +// +// (1) The semiring is idempotent, +// (2) the first FST is output-epsilon free, or +// (3) the second FST is input-epsilon free. +// +// For (1), redundant epsilon paths may be created but won't hurt correctness. +// For (2) and (3), no redundant paths are created. +template +class NoMatchComposeFilter { + public: + using Matcher1 = M1; + using Matcher2 = M2; + using FST1 = typename M1::FST; + using FST2 = typename M2::FST; + using FilterState = TrivialFilterState; + + using Arc = typename FST1::Arc; + using Label = typename Arc::Label; + using StateId = typename Arc::StateId; + using Weight = typename Arc::Weight; + + NoMatchComposeFilter(const FST1 &fst1, const FST2 &fst2, + Matcher1 *matcher1 = nullptr, + Matcher2 *matcher2 = nullptr) + : matcher1_(matcher1 ? matcher1 : new Matcher1(fst1, MATCH_OUTPUT)), + matcher2_(matcher2 ? matcher2 : new Matcher2(fst2, MATCH_INPUT)), + fst1_(matcher1_->GetFst()), + fst2_(matcher2_->GetFst()) {} + + NoMatchComposeFilter(const NoMatchComposeFilter &filter, + bool safe = false) + : matcher1_(filter.matcher1_->Copy(safe)), + matcher2_(filter.matcher2_->Copy(safe)), + fst1_(matcher1_->GetFst()), + fst2_(matcher2_->GetFst()) {} + + FilterState Start() const { return FilterState(true); } + + void SetState(StateId, StateId, const FilterState &) {} + + FilterState FilterArc(Arc *arc1, Arc *arc2) const { + return FilterState(arc1->olabel != 0 || arc2->ilabel != 0); + } + + void FilterFinal(Weight *, Weight *) const {} + + Matcher1 *GetMatcher1() { return matcher1_.get(); } + + Matcher2 *GetMatcher2() { return matcher2_.get(); } + + uint64 Properties(uint64 props) const { return props; } + + private: + std::unique_ptr matcher1_; + std::unique_ptr matcher2_; + const FST1 &fst1_; + const FST2 &fst2_; +}; + // This filter works with the MultiEpsMatcher to determine if multi-epsilons are // preserved in the composition output (rather than rewritten as 0) and // ensures correct properties. diff --git a/src/include/fst/compose.h b/src/include/fst/compose.h index d0d1ec9..1066d09 100644 --- a/src/include/fst/compose.h +++ b/src/include/fst/compose.h @@ -932,7 +932,8 @@ enum ComposeFilter { TRIVIAL_FILTER, SEQUENCE_FILTER, ALT_SEQUENCE_FILTER, - MATCH_FILTER + MATCH_FILTER, + NO_MATCH_FILTER }; struct ComposeOptions { @@ -1013,6 +1014,12 @@ void Compose(const Fst &ifst1, const Fst &ifst2, *ofst = ComposeFst(ifst1, ifst2, copts); break; } + case NO_MATCH_FILTER: { + ComposeFstOptions> copts; + copts.gc_limit = 0; + *ofst = ComposeFst(ifst1, ifst2, copts); + break; + } case TRIVIAL_FILTER: { ComposeFstOptions> copts; copts.gc_limit = 0; diff --git a/src/include/fst/concat.h b/src/include/fst/concat.h index 8bf6e3e..74d22c2 100644 --- a/src/include/fst/concat.h +++ b/src/include/fst/concat.h @@ -30,7 +30,6 @@ namespace fst { // FST. template void Concat(MutableFst *fst1, const Fst &fst2) { - using Label = typename Arc::Label; using StateId = typename Arc::StateId; using Weight = typename Arc::Weight; // Checks that the symbol table are compatible. @@ -90,8 +89,6 @@ void Concat(MutableFst *fst1, const Fst &fst2) { // FST. template void Concat(const Fst &fst1, MutableFst *fst2) { - using Label = typename Arc::Label; - using StateId = typename Arc::StateId; using Weight = typename Arc::Weight; // Checks that the symbol table are compatible. if (!CompatSymbols(fst1.InputSymbols(), fst2->InputSymbols()) || diff --git a/src/include/fst/connect.h b/src/include/fst/connect.h index 9a10fba..4c98929 100644 --- a/src/include/fst/connect.h +++ b/src/include/fst/connect.h @@ -148,7 +148,7 @@ class SccVisitor { void FinishVisit() { // Numbers SCCs in topological order when acyclic. if (scc_) { - for (StateId s = 0; s < scc_->size(); ++s) { + for (size_t s = 0; s < scc_->size(); ++s) { (*scc_)[s] = nscc_ - 1 - (*scc_)[s]; } } @@ -203,13 +203,13 @@ inline void SccVisitor::InitVisit(const Fst &fst) { template inline bool SccVisitor::InitState(StateId s, StateId root) { scc_stack_->push_back(s); - while (dfnumber_->size() <= s) { - if (scc_) scc_->push_back(-1); - if (access_) access_->push_back(false); - coaccess_->push_back(false); - dfnumber_->push_back(-1); - lowlink_->push_back(-1); - onstack_->push_back(false); + if (static_cast(dfnumber_->size()) <= s) { + if (scc_) scc_->resize(s + 1, -1); + if (access_) access_->resize(s + 1, false); + coaccess_->resize(s + 1, false); + dfnumber_->resize(s + 1, -1); + lowlink_->resize(s + 1, -1); + onstack_->resize(s + 1, false); } (*dfnumber_)[s] = nstates_; (*lowlink_)[s] = nstates_; @@ -273,6 +273,7 @@ void Connect(MutableFst *fst) { SccVisitor scc_visitor(nullptr, &access, &coaccess, &props); DfsVisit(*fst, &scc_visitor); std::vector dstates; + dstates.reserve(access.size()); for (StateId s = 0; s < access.size(); ++s) { if (!access[s] || !coaccess[s]) dstates.push_back(s); } diff --git a/src/include/fst/const-fst.h b/src/include/fst/const-fst.h index b646730..09c81c7 100644 --- a/src/include/fst/const-fst.h +++ b/src/include/fst/const-fst.h @@ -332,7 +332,7 @@ bool ConstFst::WriteFst(const FST &fst, std::ostream &strm, : internal::ConstFstImpl::kFileVersion; size_t num_arcs = 0; // To silence -Wsometimes-uninitialized warnings. size_t num_states = 0; // Ditto. - size_t start_offset = 0; + std::streamoff start_offset = 0; bool update_header = true; if (const auto *impl = GetImplIfConstFst(fst)) { num_arcs = impl->narcs_; diff --git a/src/include/fst/dfs-visit.h b/src/include/fst/dfs-visit.h index d138ab6..a7b18a6 100644 --- a/src/include/fst/dfs-visit.h +++ b/src/include/fst/dfs-visit.h @@ -93,8 +93,6 @@ struct DfsState { template void DfsVisit(const FST &fst, Visitor *visitor, ArcFilter filter, bool access_only = false) { - using Arc = typename FST::Arc; - using StateId = typename Arc::StateId; visitor->InitVisit(fst); const auto start = fst.Start(); if (start == kNoStateId) { @@ -126,7 +124,7 @@ void DfsVisit(const FST &fst, Visitor *visitor, ArcFilter filter, while (!state_stack.empty()) { auto *dfs_state = state_stack.top(); const auto s = dfs_state->state_id; - if (s >= state_color.size()) { + if (s >= static_cast(state_color.size())) { nstates = s + 1; state_color.resize(nstates, kDfsWhite); } diff --git a/src/include/fst/difference.h b/src/include/fst/difference.h index bfe1321..f073b0e 100644 --- a/src/include/fst/difference.h +++ b/src/include/fst/difference.h @@ -152,22 +152,50 @@ void Difference(const Fst &ifst1, const Fst &ifst2, MutableFst *ofst, const DifferenceOptions &opts = DifferenceOptions()) { using M = Matcher>; - if (opts.filter_type == AUTO_FILTER) { - CacheOptions nopts; - nopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = DifferenceFst(ifst1, ifst2, nopts); - } else if (opts.filter_type == SEQUENCE_FILTER) { - DifferenceFstOptions dopts; - dopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = DifferenceFst(ifst1, ifst2, dopts); - } else if (opts.filter_type == ALT_SEQUENCE_FILTER) { - DifferenceFstOptions> dopts; - dopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = DifferenceFst(ifst1, ifst2, dopts); - } else if (opts.filter_type == MATCH_FILTER) { - DifferenceFstOptions> dopts; - dopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = DifferenceFst(ifst1, ifst2, dopts); + // In each case, we cache only the last state for fastest copy. + switch (opts.filter_type) { + case AUTO_FILTER: { + CacheOptions nopts; + nopts.gc_limit = 0; + *ofst = DifferenceFst(ifst1, ifst2, nopts); + break; + } + case SEQUENCE_FILTER: { + DifferenceFstOptions dopts; + dopts.gc_limit = 0; + *ofst = DifferenceFst(ifst1, ifst2, dopts); + break; + } + case ALT_SEQUENCE_FILTER: { + DifferenceFstOptions> dopts; + dopts.gc_limit = 0; + *ofst = DifferenceFst(ifst1, ifst2, dopts); + break; + } + case MATCH_FILTER: { + DifferenceFstOptions> dopts; + dopts.gc_limit = 0; + *ofst = DifferenceFst(ifst1, ifst2, dopts); + break; + } + case NO_MATCH_FILTER: { + DifferenceFstOptions> dopts; + dopts.gc_limit = 0; + *ofst = DifferenceFst(ifst1, ifst2, dopts); + break; + } + case NULL_FILTER: { + DifferenceFstOptions> dopts; + dopts.gc_limit = 0; + *ofst = DifferenceFst(ifst1, ifst2, dopts); + break; + } + case TRIVIAL_FILTER: { + DifferenceFstOptions> dopts; + dopts.gc_limit = 0; + *ofst = DifferenceFst(ifst1, ifst2, dopts); + break; + } } if (opts.connect) Connect(ofst); } diff --git a/src/include/fst/extensions/far/far.h b/src/include/fst/extensions/far/far.h index 1a778f4..c24c7da 100644 --- a/src/include/fst/extensions/far/far.h +++ b/src/include/fst/extensions/far/far.h @@ -372,6 +372,12 @@ class FstFarReader : public FarReader { } else { streams_[i] = new std::ifstream( keys_[i], std::ios_base::in | std::ios_base::binary); + if (streams_[i]->fail()) { + FSTERROR() << "FstFarReader::FstFarReader: Error reading file: " + << filenames[i]; + error_ = true; + return; + } } } if (pos_ >= keys_.size()) return; diff --git a/src/include/fst/extensions/far/stlist.h b/src/include/fst/extensions/far/stlist.h index fcb80d0..b155e17 100644 --- a/src/include/fst/extensions/far/stlist.h +++ b/src/include/fst/extensions/far/stlist.h @@ -113,6 +113,12 @@ class STListReader { } else { streams_[i] = new std::ifstream( filenames[i], std::ios_base::in | std::ios_base::binary); + if (streams_[i]->fail()) { + FSTERROR() << "STListReader::STListReader: Error reading file: " + << filenames[i]; + error_ = true; + return; + } } int32 magic_number = 0; ReadType(*streams_[i], &magic_number); diff --git a/src/include/fst/extensions/far/sttable.h b/src/include/fst/extensions/far/sttable.h index 41f3475..2a01bb1 100644 --- a/src/include/fst/extensions/far/sttable.h +++ b/src/include/fst/extensions/far/sttable.h @@ -103,6 +103,12 @@ class STTableReader { for (size_t i = 0; i < filenames.size(); ++i) { streams_[i] = new std::ifstream( filenames[i], std::ios_base::in | std::ios_base::binary); + if (streams_[i]->fail()) { + FSTERROR() << "STTableReader::STTableReader: Error reading file: " + << filenames[i]; + error_ = true; + return; + } int32 magic_number = 0; ReadType(*streams_[i], &magic_number); int32 file_version = 0; diff --git a/src/include/fst/extensions/ngram/nthbit.h b/src/include/fst/extensions/ngram/nthbit.h index 8d28ae6..1e6ec63 100644 --- a/src/include/fst/extensions/ngram/nthbit.h +++ b/src/include/fst/extensions/ngram/nthbit.h @@ -7,8 +7,22 @@ #include #include -extern uint32 nth_bit_bit_offset[]; +#ifdef __BMI2__ +// PDEP requires BMI2. +// Returns the position (0-63) of the r-th 1 bit in v. +// 1 <= r <= CountOnes(v) <= 64. Therefore, v must not be 0. +inline uint32 nth_bit(uint64 v, uint32 r) { + // PDEP example from https://stackoverflow.com/a/27453505 + return __builtin_ctzll(_pdep_u64(uint64{1} << (r - 1), v)); +} + +#else // !defined(__BMI2__) + +extern const uint32 nth_bit_bit_offset[]; + +// Returns the position (0-63) of the r-th 1 bit in v. +// 1 <= r <= CountOnes(v) <= 64. Therefore, v must not be 0. inline uint32 nth_bit(uint64 v, uint32 r) { uint32 shift = 0; uint32 c = __builtin_popcount(v & 0xffffffff); @@ -30,4 +44,6 @@ inline uint32 nth_bit(uint64 v, uint32 r) { ((nth_bit_bit_offset[(v >> shift) & 0xff] >> ((r - 1) << 2)) & 0xf); } +#endif // !defined(__BMI2__) + #endif // FST_EXTENSIONS_NGRAM_NTHBIT_H_ diff --git a/src/include/fst/float-weight.h b/src/include/fst/float-weight.h index 7f95b09..8fade68 100644 --- a/src/include/fst/float-weight.h +++ b/src/include/fst/float-weight.h @@ -229,7 +229,7 @@ class TropicalWeightTpl : public FloatWeightTpl { if (!Member() || Value() == Limits::PosInfinity()) { return *this; } else { - return TropicalWeightTpl(floor(Value() / delta + 0.5F) * delta); + return TropicalWeightTpl(std::floor(Value() / delta + 0.5F) * delta); } } @@ -431,7 +431,7 @@ class LogWeightTpl : public FloatWeightTpl { if (!Member() || Value() == Limits::PosInfinity()) { return *this; } else { - return LogWeightTpl(floor(Value() / delta + 0.5F) * delta); + return LogWeightTpl(std::floor(Value() / delta + 0.5F) * delta); } } @@ -652,7 +652,7 @@ class MinMaxWeightTpl : public FloatWeightTpl { Value() == Limits::NegInfinity() || Value() == Limits::PosInfinity()) { return *this; } else { - return MinMaxWeightTpl(floor(Value() / delta + 0.5F) * delta); + return MinMaxWeightTpl(std::floor(Value() / delta + 0.5F) * delta); } } diff --git a/src/include/fst/fst-decl.h b/src/include/fst/fst-decl.h index 0e18e15..9319dfc 100644 --- a/src/include/fst/fst-decl.h +++ b/src/include/fst/fst-decl.h @@ -246,6 +246,9 @@ class AltSequenceComposeFilter; template class MatchComposeFilter; +template +class NoMatchComposeFilter; + } // namespace fst #endif // FST_FST_DECL_H_ diff --git a/src/include/fst/fstlib.h b/src/include/fst/fstlib.h index a99cff4..e8b1c3a 100644 --- a/src/include/fst/fstlib.h +++ b/src/include/fst/fstlib.h @@ -62,8 +62,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -121,8 +121,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/include/fst/intersect.h b/src/include/fst/intersect.h index b07ff45..fa66206 100644 --- a/src/include/fst/intersect.h +++ b/src/include/fst/intersect.h @@ -128,22 +128,50 @@ void Intersect(const Fst &ifst1, const Fst &ifst2, MutableFst *ofst, const IntersectOptions &opts = IntersectOptions()) { using M = Matcher>; - if (opts.filter_type == AUTO_FILTER) { - CacheOptions nopts; - nopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = IntersectFst(ifst1, ifst2, nopts); - } else if (opts.filter_type == SEQUENCE_FILTER) { - IntersectFstOptions iopts; - iopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = IntersectFst(ifst1, ifst2, iopts); - } else if (opts.filter_type == ALT_SEQUENCE_FILTER) { - IntersectFstOptions> iopts; - iopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = IntersectFst(ifst1, ifst2, iopts); - } else if (opts.filter_type == MATCH_FILTER) { - IntersectFstOptions> iopts; - iopts.gc_limit = 0; // Cache only the last state for fastest copy. - *ofst = IntersectFst(ifst1, ifst2, iopts); + // In each case, we cache only the last state for fastest copy. + switch (opts.filter_type) { + case AUTO_FILTER: { + CacheOptions nopts; + nopts.gc_limit = 0; + *ofst = IntersectFst(ifst1, ifst2, nopts); + break; + } + case SEQUENCE_FILTER: { + IntersectFstOptions iopts; + iopts.gc_limit = 0; + *ofst = IntersectFst(ifst1, ifst2, iopts); + break; + } + case ALT_SEQUENCE_FILTER: { + IntersectFstOptions> iopts; + iopts.gc_limit = 0; + *ofst = IntersectFst(ifst1, ifst2, iopts); + break; + } + case MATCH_FILTER: { + IntersectFstOptions> iopts; + iopts.gc_limit = 0; + *ofst = IntersectFst(ifst1, ifst2, iopts); + break; + } + case NO_MATCH_FILTER: { + IntersectFstOptions> iopts; + iopts.gc_limit = 0; + *ofst = IntersectFst(ifst1, ifst2, iopts); + break; + } + case NULL_FILTER: { + IntersectFstOptions> iopts; + iopts.gc_limit = 0; + *ofst = IntersectFst(ifst1, ifst2, iopts); + break; + } + case TRIVIAL_FILTER: { + IntersectFstOptions> iopts; + iopts.gc_limit = 0; + *ofst = IntersectFst(ifst1, ifst2, iopts); + break; + } } if (opts.connect) Connect(ofst); } diff --git a/src/include/fst/properties.h b/src/include/fst/properties.h index f97c921..157247a 100644 --- a/src/include/fst/properties.h +++ b/src/include/fst/properties.h @@ -343,7 +343,7 @@ uint64 RandGenProperties(uint64 inprops, bool weighted); uint64 RelabelProperties(uint64 inprops); -uint64 ReplaceProperties(const std::vector &inprops, ssize_t root, +uint64 ReplaceProperties(const std::vector &inprops, size_t root, bool epsilon_on_call, bool epsilon_on_return, bool out_epsilon_on_call, bool out_epsilon_on_return, bool replace_transducer, bool no_empty_fst, diff --git a/src/include/fst/queue.h b/src/include/fst/queue.h index 7e9130f..f57d176 100644 --- a/src/include/fst/queue.h +++ b/src/include/fst/queue.h @@ -18,6 +18,7 @@ #include #include #include +#include namespace fst { @@ -264,7 +265,7 @@ class StateWeightCompare { // Shortest-first queue discipline, templated on the StateId and Weight, is // specialized to use the weight's natural order for the comparison function. template -class NaturalShortestFirstQueue final +class NaturalShortestFirstQueue : public ShortestFirstQueue< S, internal::StateWeightCompare>> { public: @@ -282,6 +283,85 @@ class NaturalShortestFirstQueue final const NaturalLess less_{}; }; +// In a shortest path computation on a lattice-like FST, we may keep many old +// nonviable paths as a part of the search. Since the search process always +// expands the lowest cost path next, that lowest cost path may be a very old +// nonviable path instead of one we expect to lead to a shortest path. +// +// For instance, suppose that the current best path in an alignment has +// traversed 500 arcs with a cost of 10. We may also have a bad path in +// the queue that has traversed only 40 arcs but also has a cost of 10. +// This path is very unlikely to lead to a reasonable alignment, so this queue +// can prune it from the search space. +// +// This queue relies on the caller using a shortest-first exploration order +// like this: +// while (true) { +// StateId head = queue.Head(); +// queue.Dequeue(); +// for (const auto& arc : GetArcs(fst, head)) { +// queue.Enqueue(arc.nextstate); +// } +// } +// We use this assumption to guess that there is an arc between Head and the +// Enqueued state; this is how the number of path steps is measured. +template +class PruneNaturalShortestFirstQueue + : public NaturalShortestFirstQueue { + public: + using StateId = S; + using Base = NaturalShortestFirstQueue; + + explicit PruneNaturalShortestFirstQueue(const std::vector &distance, + int threshold) + : Base(distance), + threshold_(threshold), + head_steps_(0), + max_head_steps_(0) {} + + ~PruneNaturalShortestFirstQueue() override = default; + + StateId Head() const override { + const auto head = Base::Head(); + // Stores the number of steps from the start of the graph to this state + // along the shortest-weight path. + if (head < steps_.size()) { + max_head_steps_ = std::max(steps_[head], max_head_steps_); + head_steps_ = steps_[head]; + } + return head; + } + + void Enqueue(StateId s) override { + // We assume that there is an arc between the Head() state and this + // Enqueued state. + const ssize_t state_steps = head_steps_ + 1; + if (s >= steps_.size()) { + steps_.resize(s + 1, state_steps); + } + // This is the number of arcs in the minimum cost path from Start to s. + steps_[s] = state_steps; + if (state_steps > (max_head_steps_ - threshold_) || threshold_ < 0) { + Base::Enqueue(s); + } + } + + private: + // A dense map from StateId to the number of arcs in the minimum weight + // path from Start to this state. + std::vector steps_; + // We only keep paths that are within this number of arcs (not weight!) + // of the longest path. + const ssize_t threshold_; + + // The following are mutable because Head() is const. + // The number of arcs traversed in the minimum cost path from the start + // state to the current Head() state. + mutable ssize_t head_steps_; + // The maximum number of arcs traversed by any low-cost path so far. + mutable ssize_t max_head_steps_; +}; + // Topological-order queue discipline, templated on the StateId. States are // ordered in the queue topologically. The FST must be acyclic. template @@ -677,15 +757,21 @@ struct TrivialAStarEstimate { template class NaturalAStarEstimate { public: - NaturalAStarEstimate(const std::vector &beta) : - beta_(beta) {} + NaturalAStarEstimate(const std::vector &beta) : beta_(beta) {} - const Weight &operator()(StateId s) const { return beta_[s]; } + const Weight &operator()(StateId s) const { + return (s < beta_.size()) ? beta_[s] : kZero; + } private: + static constexpr Weight kZero = Weight::Zero(); + const std::vector &beta_; }; +template +constexpr Weight NaturalAStarEstimate::kZero; + // Given a vector that maps from states to weights representing the shortest // distance from the initial state, a comparison function object between // weights, and an estimate of the shortest distance to the final states, this diff --git a/src/include/fst/randgen.h b/src/include/fst/randgen.h index ee15319..5bcd9fd 100644 --- a/src/include/fst/randgen.h +++ b/src/include/fst/randgen.h @@ -77,9 +77,9 @@ class LogProbArcSelector { using Weight = typename Arc::Weight; // Constructs a selector with a non-deterministic seed. - LogProbArcSelector() : rand_(std::random_device()()) {} + LogProbArcSelector() : seed_(std::random_device()()), rand_(seed_) {} // Constructs a selector with a given seed. - explicit LogProbArcSelector(uint64 seed) : rand_(seed) {} + explicit LogProbArcSelector(uint64 seed) : seed_(seed), rand_(seed) {} size_t operator()(const Fst &fst, StateId s) const { // Finds total weight leaving state. @@ -101,9 +101,19 @@ class LogProbArcSelector { return n; } + uint64 Seed() const { return seed_; } + + protected: + Log64Weight ToLogWeight(const Weight &weight) const { + return to_log_weight_(weight); + } + + std::mt19937_64 &MutableRand() const { return rand_; } + private: + const uint64 seed_; mutable std::mt19937_64 rand_; - WeightConvert to_log_weight_; + const WeightConvert to_log_weight_{}; }; // Useful alias when using StdArc. @@ -117,34 +127,33 @@ class FastLogProbArcSelector : public LogProbArcSelector { using StateId = typename Arc::StateId; using Weight = typename Arc::Weight; + using LogProbArcSelector::MutableRand; + using LogProbArcSelector::ToLogWeight; using LogProbArcSelector::operator(); // Constructs a selector with a non-deterministic seed. - FastLogProbArcSelector() : seed_(std::random_device()()), rand_(seed_) {} + FastLogProbArcSelector() : LogProbArcSelector() {} // Constructs a selector with a given seed. - explicit FastLogProbArcSelector(uint64 seed) : seed_(seed), rand_(seed_) {} + explicit FastLogProbArcSelector(uint64 seed) : LogProbArcSelector( + seed) {} size_t operator()(const Fst &fst, StateId s, CacheLogAccumulator *accumulator) const { accumulator->SetState(s); ArcIterator> aiter(fst, s); // Finds total weight leaving state. - const double sum = to_log_weight_(accumulator->Sum(fst.Final(s), &aiter, 0, - fst.NumArcs(s))) - .Value(); - const double r = -log(std::uniform_real_distribution<>(0, 1)(rand_)); + const double sum = + ToLogWeight(accumulator->Sum(fst.Final(s), &aiter, 0, fst.NumArcs(s))) + .Value(); + const double r = -log(std::uniform_real_distribution<>(0, 1)( + MutableRand())); Weight w = from_log_weight_(r + sum); aiter.Reset(); return accumulator->LowerBound(w, &aiter); } - uint64 Seed() const { return seed_; } - private: - const uint64 seed_; - mutable std::mt19937_64 rand_; - WeightConvert to_log_weight_; - WeightConvert from_log_weight_; + const WeightConvert from_log_weight_{}; }; // Random path state info maintained by RandGenFst and passed to samplers. @@ -360,7 +369,7 @@ class ArcSampler> { std::unique_ptr accumulator_; RNG rng_; // Random number generator. std::vector p_; // Multinomial parameters. - WeightConvert to_log_weight_; + const WeightConvert to_log_weight_{}; }; // Options for random path generation with RandGenFst. The template argument is @@ -543,7 +552,7 @@ class RandGenFstImpl : public CacheImpl { const bool weighted_; bool remove_total_weight_; StateId superfinal_; - WeightConvert to_weight_; + const WeightConvert to_weight_{}; }; } // namespace internal @@ -720,8 +729,6 @@ class RandGenVisitor { template void RandGen(const Fst &ifst, MutableFst *ofst, const RandGenOptions &opts) { - using State = typename ToArc::StateId; - using Weight = typename ToArc::Weight; using Sampler = ArcSampler; auto *sampler = new Sampler(ifst, opts.selector, opts.max_length); RandGenFstOptions fopts(CacheOptions(true, 0), sampler, opts.npath, diff --git a/src/include/fst/rmepsilon.h b/src/include/fst/rmepsilon.h index 2f29bdb..5135bf2 100644 --- a/src/include/fst/rmepsilon.h +++ b/src/include/fst/rmepsilon.h @@ -192,7 +192,6 @@ template void RmEpsilon(MutableFst *fst, std::vector *distance, const RmEpsilonOptions &opts) { - using Label = typename Arc::Label; using StateId = typename Arc::StateId; using Weight = typename Arc::Weight; if (fst->Start() == kNoStateId) return; diff --git a/src/include/fst/shortest-distance.h b/src/include/fst/shortest-distance.h index 0f4cb40..b1c5b26 100644 --- a/src/include/fst/shortest-distance.h +++ b/src/include/fst/shortest-distance.h @@ -285,7 +285,6 @@ void ShortestDistance(const Fst &fst, std::vector *distance, bool reverse = false, float delta = kShortestDelta) { using StateId = typename Arc::StateId; - using Weight = typename Arc::Weight; if (!reverse) { AnyArcFilter arc_filter; AutoQueue state_queue(fst, distance, arc_filter); diff --git a/src/include/fst/string.h b/src/include/fst/string.h index 233e87b..07ebfdd 100644 --- a/src/include/fst/string.h +++ b/src/include/fst/string.h @@ -37,17 +37,17 @@ bool ConvertSymbolToLabel(const char *str, const SymbolTable *syms, n = syms->Find(str); if ((n == -1) && (unknown_label != kNoLabel)) n = unknown_label; if (n == -1 || (!allow_negative && n < 0)) { - VLOG(1) << "ConvertSymbolToLabel: Symbol \"" << str - << "\" is not mapped to any integer label, symbol table = " - << syms->Name(); + LOG(ERROR) << "ConvertSymbolToLabel: Symbol \"" << str + << "\" is not mapped to any integer label, symbol table = " + << syms->Name(); return false; } } else { char *p; n = strtoll(str, &p, 10); if (p < str + strlen(str) || (!allow_negative && n < 0)) { - VLOG(1) << "ConvertSymbolToLabel: Bad label integer " - << "= \"" << str << "\""; + LOG(ERROR) << "ConvertSymbolToLabel: Bad label integer " + << "= \"" << str << "\""; return false; } } @@ -84,8 +84,91 @@ bool ConvertStringToLabels(const string &str, StringTokenType token_type, return true; } +// The sep string is used as a separator between symbols, unless it is nullptr, +// in which case the last character of FLAGS_fst_field_separator is used. +template +bool LabelsToSymbolString(const std::vector