From 78cba7740960a176d1a17ab8cf9ff0b14701cb7c Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Wed, 18 May 2016 22:32:04 +0200 Subject: [PATCH 1/2] implement different loading styles (mmap options) --- keyvi/src/cpp/dictionary/dictionary.h | 22 +- keyvi/src/cpp/dictionary/fsa/automata.h | 28 +- .../fsa/internal/json_value_store.h | 20 +- .../fsa/internal/memory_map_flags.h | 162 + .../fsa/internal/string_value_store.h | 20 +- .../fsa/internal/value_store_factory.h | 9 +- .../fsa/internal/json_value_store_test.cpp | 2 +- .../fsa/internal/memory_map_flags_test.cpp | 150 + pykeyvi/src/pxds/dictionary.pxd | 11 +- pykeyvi/src/pykeyvi.cpp | 5083 +++++++++-------- pykeyvi/src/pykeyvi.pyx | 18 +- 11 files changed, 3094 insertions(+), 2431 deletions(-) create mode 100644 keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h create mode 100644 keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp diff --git a/keyvi/src/cpp/dictionary/dictionary.h b/keyvi/src/cpp/dictionary/dictionary.h index fe53cfe5..74e6e8db 100644 --- a/keyvi/src/cpp/dictionary/dictionary.h +++ b/keyvi/src/cpp/dictionary/dictionary.h @@ -40,11 +40,31 @@ namespace dictionary { class Dictionary final { public: - Dictionary(const char* filename, bool load_lazy = false) + + /** + * DEPRECATED: Initialize a dictionary in lazy or non-lazy mode. + * + * Use Dictionary(filename, loading_strategy) instead. + * + * @param filename the filename + * @param load_lazy whether to load lazy. + */ + Dictionary(const char* filename, bool load_lazy) : fsa_(new fsa::Automata(filename, load_lazy)) { TRACE("Dictionary from file %s", filename); } + /** + * Initialize a dictionary from a file. + * + * @param filename filename to load keyvi file from. + * @param loading_strategy optional: Loading strategy to use. + */ + Dictionary(const char* filename, loading_strategy_types loading_strategy = loading_strategy_types::lazy) + : fsa_(new fsa::Automata(filename, loading_strategy)) { + TRACE("Dictionary from file %s", filename); + } + Dictionary(fsa::automata_t f) : fsa_(f) { } diff --git a/keyvi/src/cpp/dictionary/fsa/automata.h b/keyvi/src/cpp/dictionary/fsa/automata.h index ce53cf30..0628d50a 100644 --- a/keyvi/src/cpp/dictionary/fsa/automata.h +++ b/keyvi/src/cpp/dictionary/fsa/automata.h @@ -33,6 +33,7 @@ #include "dictionary/fsa/internal/constants.h" #include "dictionary/fsa/internal/value_store_factory.h" #include "dictionary/fsa/internal/serialization_utils.h" +#include "dictionary/fsa/internal/memory_map_flags.h" #include "dictionary/fsa/traversal/traversal_base.h" #include "dictionary/fsa/traversal/weighted_traversal.h" #include "dictionary/util/vint.h" @@ -47,12 +48,14 @@ namespace keyvi { namespace dictionary { namespace fsa { - class Automata final { public: - Automata(const char * filename, bool load_lazy=false) { + Automata(const char * filename, bool load_lazy): + Automata(filename, load_lazy ? default_loading_strategy : loading_strategy_types::populate) {} + + Automata(const char * filename, loading_strategy_types loading_strategy = loading_strategy_types::lazy) { std::ifstream in_stream(filename, std::ios::binary); if (!in_stream.good()) { @@ -92,17 +95,7 @@ final { throw std::invalid_argument("file is corrupt(truncated)"); } - boost::interprocess::map_options_t map_options = boost::interprocess::default_map_options; - -#ifdef MAP_HUGETLB - map_options |= MAP_HUGETLB; -#endif - - if (!load_lazy) { -#ifdef MAP_POPULATE - map_options |= MAP_POPULATE; -#endif - } + boost::interprocess::map_options_t map_options = internal::MemoryMapFlags::FSAGetMemoryMapOptions(loading_strategy); TRACE("labels start offset: %d", offset); labels_region_ = new boost::interprocess::mapped_region( @@ -113,10 +106,12 @@ final { *file_mapping_, boost::interprocess::read_only, offset + array_size, bucket_size * array_size, 0, map_options); - // prevent pre-fetching pages by the OS which does not make sense for the FST structure - labels_region_->advise(boost::interprocess::mapped_region::advice_types::advice_random); - transitions_region_->advise(boost::interprocess::mapped_region::advice_types::advice_random); + auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); + if (advise != -1) { + labels_region_->advise(advise); + transitions_region_->advise(advise); + } TRACE("full file size %zu", offset + array_size + bucket_size * array_size); labels_ = (unsigned char*) labels_region_->get_address(); @@ -535,6 +530,7 @@ final { TRACE("Compact Transition after resolve %d", resolved_ptr); return resolved_ptr; } + }; // shared pointer diff --git a/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h b/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h index b07878d6..ec8945c3 100644 --- a/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h +++ b/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h @@ -38,6 +38,7 @@ #include "rapidjson/stringbuffer.h" #include "dictionary/fsa/internal/ivalue_store.h" +#include "dictionary/fsa/internal/memory_map_flags.h" #include "dictionary/fsa/internal/serialization_utils.h" #include "dictionary/fsa/internal/lru_generation_cache.h" #include "dictionary/fsa/internal/memory_map_manager.h" @@ -272,7 +273,7 @@ class JsonValueStoreReader final: public IValueStoreReader { JsonValueStoreReader(std::istream& stream, boost::interprocess::file_mapping* file_mapping, - bool load_lazy = false) + loading_strategy_types loading_strategy = loading_strategy_types::lazy) : IValueStoreReader(stream, file_mapping) { TRACE("JsonValueStoreReader construct"); @@ -292,22 +293,15 @@ class JsonValueStoreReader final: public IValueStoreReader { boost::interprocess::map_options_t map_options = boost::interprocess::default_map_options; -#ifdef MAP_HUGETLB - map_options |= MAP_HUGETLB; -#endif - - if (!load_lazy) { -#ifdef MAP_POPULATE - map_options |= MAP_POPULATE; -#endif - } - strings_region_ = new boost::interprocess::mapped_region( *file_mapping, boost::interprocess::read_only, offset, strings_size, 0, map_options); - // prevent pre-fetching pages by the OS which does not make sense as values usually fit into few pages - strings_region_->advise(boost::interprocess::mapped_region::advice_types::advice_random); + auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); + + if (advise != -1) { + strings_region_->advise(advise); + } strings_ = (const char*) strings_region_->get_address(); } diff --git a/keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h b/keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h new file mode 100644 index 00000000..4cbc35b3 --- /dev/null +++ b/keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h @@ -0,0 +1,162 @@ +/* * keyvi - A key value store. + * + * Copyright 2015 Hendrik Muhs + * + * 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. + */ + +/* + * memory_map_flags.h + * + * Created on: May 17, 2016 + * Author: hendrik + */ + +#ifndef KEYVI_MEMORY_MAP_FLAGS_H_ +#define KEYVI_MEMORY_MAP_FLAGS_H_ + +#include +#include + +namespace keyvi { +namespace dictionary { + +typedef enum { lazy, // load data as needed with some read-ahead + populate, // immediately load everything in memory (blocks until everything is fully read) + populate_key_part, // populate only the key part, load value part lazy + populate_lazy, // load data lazy but ask the OS to read ahead if possible (does not block) + lazy_no_readahead, // disable any read-ahead (for cases when index > x * main memory) + lazy_no_readahead_value_part, // disable read-ahead only for the value part + populate_key_part_no_readahead_value_part // populate the key part, but disable read ahead value part + } loading_strategy_types; + +static const loading_strategy_types default_loading_strategy = loading_strategy_types(-1); + +namespace fsa { +namespace internal { + +class MemoryMapFlags final{ +public: + /** + * Translates the loading strategy into the according options for mmap. To be used for loading the FSA part. + * + * @param strategy load strategy + * @return flags to be used for mmap (via boost). + */ + static int FSAGetMemoryMapOptions(const loading_strategy_types strategy) { + if (strategy == default_loading_strategy) { + return boost::interprocess::default_map_options; + } + + int flags = 0; + + flags |= MAP_SHARED; + +#ifdef MAP_NOSYNC + flags |= MAP_NOSYNC +#endif + + switch (strategy){ + case populate: + case populate_key_part: + case populate_key_part_no_readahead_value_part: + flags |= MAP_POPULATE; + break; + default: + break; + } + + return flags; + } + + /** + * Translates the loading strategy into the according options for mmap. To be used for loading the Values part. + * + * @param strategy load strategy + * @return flags to be used for mmap (via boost). + */ + static int ValuesGetMemoryMapOptions(const loading_strategy_types strategy) { + int flags = 0; + + if (strategy == default_loading_strategy) { + return boost::interprocess::default_map_options; + } + + flags |= MAP_SHARED; + +#ifdef MAP_NOSYNC + flags |= MAP_NOSYNC +#endif + + switch (strategy){ + case populate: + flags |= MAP_POPULATE; + break; + default: + break; + } + + return flags; + } + + /** + * Translates the loading strategy into the according options for madvise. To be used for loading the FSA part. + * + * @param strategy load strategy + * @return advise to be used for madvise (via boost). + */ + static boost::interprocess::mapped_region::advice_types FSAGetMemoryMapAdvices(const loading_strategy_types strategy) { + switch (strategy){ + case lazy_no_readahead: + return boost::interprocess::mapped_region::advice_types::advice_random; + case lazy_no_readahead_value_part: + case populate_key_part_no_readahead_value_part: + break; + case populate_lazy: + return boost::interprocess::mapped_region::advice_types::advice_willneed; + default: + break; + } + + return (boost::interprocess::mapped_region::advice_types) -1; + } + + /** + * Translates the loading strategy into the according options for madvise. To be used for loading the Values part. + * + * @param strategy load strategy + * @return advise to be used for madvise (via boost). + */ + static boost::interprocess::mapped_region::advice_types ValuesGetMemoryMapAdvices(const loading_strategy_types strategy) { + switch (strategy){ + case lazy_no_readahead: + case lazy_no_readahead_value_part: + case populate_key_part_no_readahead_value_part: + return boost::interprocess::mapped_region::advice_types::advice_random; + case populate_lazy: + return boost::interprocess::mapped_region::advice_types::advice_willneed; + default: + break; + } + + return (boost::interprocess::mapped_region::advice_types) -1; + } +}; + +} /* namespace internal */ +} /* namespace fsa */ +} /* namespace dictionary */ +} /* namespace keyvi */ + + +#endif /* KEYVI_MEMORY_MAP_FLAGS_H_ */ diff --git a/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h b/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h index 5ca731a4..7d4fba54 100644 --- a/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h +++ b/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h @@ -29,6 +29,7 @@ #include #include "dictionary/fsa/internal/ivalue_store.h" +#include "dictionary/fsa/internal/memory_map_flags.h" #include "dictionary/fsa/internal/serialization_utils.h" #include "dictionary/fsa/internal/minimization_hash.h" @@ -247,7 +248,7 @@ class StringValueStore final : public IValueStoreWriter { using IValueStoreReader::IValueStoreReader; StringValueStoreReader(std::istream& stream, - boost::interprocess::file_mapping* file_mapping, bool load_lazy = false) + boost::interprocess::file_mapping* file_mapping, loading_strategy_types loading_strategy = loading_strategy_types::lazy) : IValueStoreReader(stream, file_mapping) { boost::property_tree::ptree properties = @@ -266,22 +267,15 @@ class StringValueStore final : public IValueStoreWriter { boost::interprocess::map_options_t map_options = boost::interprocess::default_map_options; -#ifdef MAP_HUGETLB - map_options |= MAP_HUGETLB; -#endif - - if (!load_lazy) { -#ifdef MAP_POPULATE - map_options |= MAP_POPULATE; -#endif - } - strings_region_ = new boost::interprocess::mapped_region( *file_mapping, boost::interprocess::read_only, offset, strings_size, 0, map_options); - // prevent pre-fetching pages by the OS which does not make sense as values usually fit into few pages - strings_region_->advise(boost::interprocess::mapped_region::advice_types::advice_random); + auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); + + if (advise != -1) { + strings_region_->advise(advise); + } strings_ = (const char*) strings_region_->get_address(); } diff --git a/keyvi/src/cpp/dictionary/fsa/internal/value_store_factory.h b/keyvi/src/cpp/dictionary/fsa/internal/value_store_factory.h index 40be09cc..4efd4d4f 100644 --- a/keyvi/src/cpp/dictionary/fsa/internal/value_store_factory.h +++ b/keyvi/src/cpp/dictionary/fsa/internal/value_store_factory.h @@ -25,6 +25,7 @@ #ifndef VALUE_STORE_FACTORY_H_ #define VALUE_STORE_FACTORY_H_ +#include "dictionary/fsa/internal/memory_map_flags.h" #include "dictionary/fsa/internal/null_value_store.h" #include "dictionary/fsa/internal/int_value_store.h" #include "dictionary/fsa/internal/string_value_store.h" @@ -39,18 +40,18 @@ namespace internal { class ValueStoreFactory final { public: static IValueStoreReader* MakeReader(value_store_t type, std::istream& stream, - boost::interprocess::file_mapping* file_mapping, bool load_lazy = false){ + boost::interprocess::file_mapping* file_mapping, loading_strategy_types loading_strategy = loading_strategy_types::lazy){ switch (type){ case NULL_VALUE_STORE: return new NullValueStoreReader(stream, file_mapping); case INT_VALUE_STORE: return new IntValueStoreReader(stream, file_mapping); case STRING_VALUE_STORE: - return new StringValueStoreReader(stream, file_mapping, load_lazy); + return new StringValueStoreReader(stream, file_mapping, loading_strategy); case JSON_VALUE_STORE_DEPRECATED: - return new JsonValueStoreDeprecatedReader(stream, file_mapping, load_lazy); + return new JsonValueStoreDeprecatedReader(stream, file_mapping, false); case JSON_VALUE_STORE: - return new JsonValueStoreReader(stream, file_mapping, load_lazy); + return new JsonValueStoreReader(stream, file_mapping, loading_strategy); default: throw std::invalid_argument("Unknown Value Storage type"); } diff --git a/keyvi/tests/cpp/dictionary/fsa/internal/json_value_store_test.cpp b/keyvi/tests/cpp/dictionary/fsa/internal/json_value_store_test.cpp index a53ce337..fbc7aca4 100644 --- a/keyvi/tests/cpp/dictionary/fsa/internal/json_value_store_test.cpp +++ b/keyvi/tests/cpp/dictionary/fsa/internal/json_value_store_test.cpp @@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE( persistence ) auto file_mapping = new boost::interprocess::file_mapping( filename.c_str(), boost::interprocess::read_only); - JsonValueStoreReader reader(in_stream, file_mapping, false); + JsonValueStoreReader reader(in_stream, file_mapping, loading_strategy_types::lazy); BOOST_CHECK_EQUAL(value, reader.GetValueAsString(v)); BOOST_CHECK_EQUAL("{\"mytestvalue2\":23}", reader.GetValueAsString(w)); diff --git a/keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp b/keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp new file mode 100644 index 00000000..99d57418 --- /dev/null +++ b/keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp @@ -0,0 +1,150 @@ +// +// keyvi - A key value store. +// +// Copyright 2015 Hendrik Muhs +// +// 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. +// + +/* + * memory_map_flags_test.cpp + * + * Created on: May 17, 2016 + * Author: hendrik + */ + +#include +#include +#include "dictionary/fsa/internal/memory_map_flags.h" + +namespace keyvi { +namespace dictionary { +namespace fsa { +namespace internal { + +// The name of the suite must be a different name to your class +BOOST_AUTO_TEST_SUITE( MemoryMapFlagsTests ) + +BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestLazy ) { + loading_strategy_types strategy = loading_strategy_types::lazy; + int key_flags = MemoryMapFlags::FSAGetMemoryMapOptions(strategy); + int value_flags = MemoryMapFlags::ValuesGetMemoryMapOptions(strategy); + auto key_advise_flags = MemoryMapFlags::FSAGetMemoryMapAdvices(strategy); + auto value_advise_flags = MemoryMapFlags::ValuesGetMemoryMapAdvices(strategy); + + // no map populate + BOOST_CHECK((key_flags & MAP_POPULATE) == 0); + BOOST_CHECK((value_flags & MAP_POPULATE) == 0); + + BOOST_CHECK(key_advise_flags == -1); + BOOST_CHECK(value_advise_flags == -1); +} + +BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate ) { + loading_strategy_types strategy = loading_strategy_types::populate; + int key_flags = MemoryMapFlags::FSAGetMemoryMapOptions(strategy); + int value_flags = MemoryMapFlags::ValuesGetMemoryMapOptions(strategy); + auto key_advise_flags = MemoryMapFlags::FSAGetMemoryMapAdvices(strategy); + auto value_advise_flags = MemoryMapFlags::ValuesGetMemoryMapAdvices(strategy); + + // map populate + BOOST_CHECK((key_flags & MAP_POPULATE)); + BOOST_CHECK((value_flags & MAP_POPULATE)); + + BOOST_CHECK(key_advise_flags == -1); + BOOST_CHECK(value_advise_flags == -1); +} + +BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate_key_part ) { + loading_strategy_types strategy = loading_strategy_types::populate_key_part; + int key_flags = MemoryMapFlags::FSAGetMemoryMapOptions(strategy); + int value_flags = MemoryMapFlags::ValuesGetMemoryMapOptions(strategy); + auto key_advise_flags = MemoryMapFlags::FSAGetMemoryMapAdvices(strategy); + auto value_advise_flags = MemoryMapFlags::ValuesGetMemoryMapAdvices(strategy); + + // no map populate + BOOST_CHECK((key_flags & MAP_POPULATE)); + BOOST_CHECK((value_flags & MAP_POPULATE) == 0); + + BOOST_CHECK(key_advise_flags == -1); + BOOST_CHECK(value_advise_flags == -1); +} + +BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate_lazy ) { + loading_strategy_types strategy = loading_strategy_types::populate_lazy; + int key_flags = MemoryMapFlags::FSAGetMemoryMapOptions(strategy); + int value_flags = MemoryMapFlags::ValuesGetMemoryMapOptions(strategy); + auto key_advise_flags = MemoryMapFlags::FSAGetMemoryMapAdvices(strategy); + auto value_advise_flags = MemoryMapFlags::ValuesGetMemoryMapAdvices(strategy); + + // no map populate + BOOST_CHECK((key_flags & MAP_POPULATE) == 0); + BOOST_CHECK((value_flags & MAP_POPULATE) == 0); + + BOOST_CHECK(key_advise_flags == boost::interprocess::mapped_region::advice_types::advice_willneed); + BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_willneed); +} + +BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestlazy_no_readahead ) { + loading_strategy_types strategy = loading_strategy_types::lazy_no_readahead; + int key_flags = MemoryMapFlags::FSAGetMemoryMapOptions(strategy); + int value_flags = MemoryMapFlags::ValuesGetMemoryMapOptions(strategy); + auto key_advise_flags = MemoryMapFlags::FSAGetMemoryMapAdvices(strategy); + auto value_advise_flags = MemoryMapFlags::ValuesGetMemoryMapAdvices(strategy); + + // no map populate + BOOST_CHECK((key_flags & MAP_POPULATE) == 0); + BOOST_CHECK((value_flags & MAP_POPULATE) == 0); + + BOOST_CHECK(key_advise_flags == boost::interprocess::mapped_region::advice_types::advice_random); + BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_random); +} + +BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestlazy_no_readahead_value_part ) { + loading_strategy_types strategy = loading_strategy_types::lazy_no_readahead_value_part; + int key_flags = MemoryMapFlags::FSAGetMemoryMapOptions(strategy); + int value_flags = MemoryMapFlags::ValuesGetMemoryMapOptions(strategy); + auto key_advise_flags = MemoryMapFlags::FSAGetMemoryMapAdvices(strategy); + auto value_advise_flags = MemoryMapFlags::ValuesGetMemoryMapAdvices(strategy); + + // no map populate + BOOST_CHECK((key_flags & MAP_POPULATE) == 0); + BOOST_CHECK((value_flags & MAP_POPULATE) == 0); + + BOOST_CHECK(key_advise_flags == -1); + BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_random); +} + +BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestpopulate_key_part_no_readahead_value_part ) { + loading_strategy_types strategy = loading_strategy_types::populate_key_part_no_readahead_value_part; + int key_flags = MemoryMapFlags::FSAGetMemoryMapOptions(strategy); + int value_flags = MemoryMapFlags::ValuesGetMemoryMapOptions(strategy); + auto key_advise_flags = MemoryMapFlags::FSAGetMemoryMapAdvices(strategy); + auto value_advise_flags = MemoryMapFlags::ValuesGetMemoryMapAdvices(strategy); + + // no map populate + BOOST_CHECK((key_flags & MAP_POPULATE)); + BOOST_CHECK((value_flags & MAP_POPULATE) == 0); + + BOOST_CHECK(key_advise_flags == -1); + BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_random); +} + +BOOST_AUTO_TEST_SUITE_END() + +} /* namespace internal */ +} /* namespace fsa */ +} /* namespace dictionary */ +} /* namespace keyvi */ + + diff --git a/pykeyvi/src/pxds/dictionary.pxd b/pykeyvi/src/pxds/dictionary.pxd index c3b4ac7d..e1231334 100644 --- a/pykeyvi/src/pxds/dictionary.pxd +++ b/pykeyvi/src/pxds/dictionary.pxd @@ -6,9 +6,18 @@ from match cimport Match from match_iterator cimport MatchIteratorPair as _MatchIteratorPair cdef extern from "dictionary/dictionary.h" namespace "keyvi::dictionary": + ctypedef enum loading_strategy_types: + lazy, # load data as needed with some read-ahead + populate, # immediately load everything in memory (blocks until everything is fully read) + populate_key_part, # populate only the key part, load value part lazy + populate_lazy, # load data lazy but ask the OS to read ahead if possible (does not block) + lazy_no_readahead, # disable any read-ahead (for cases when index > x * main memory) + lazy_no_readahead_value_part, # disable read-ahead only for the value part + populate_key_part_no_readahead_value_part # populate the key part, but disable read ahead value part + cdef cppclass Dictionary: Dictionary (const_char* filename) except + - Dictionary (const_char* filename, bool load_lazy) except + + Dictionary (const_char* filename, loading_strategy_types) except + bool Contains (const_char*) # wrap-ignore Match operator[](const_char*) # wrap-ignore _MatchIteratorPair Get (const_char*) diff --git a/pykeyvi/src/pykeyvi.cpp b/pykeyvi/src/pykeyvi.cpp index 89010a48..95901897 100644 --- a/pykeyvi/src/pykeyvi.cpp +++ b/pykeyvi/src/pykeyvi.cpp @@ -258,12 +258,12 @@ static CYTHON_INLINE float __PYX_NAN() { #include "boost/smart_ptr/shared_ptr.hpp" #include "autowrap_tools.hpp" #include "stdint.h" -#include "dictionary/util/jump_consistent_hash.h" -#include "dictionary/dictionary_types.h" #include "stdio.h" #include "dictionary/match.h" #include "dictionary/match_iterator.h" #include "dictionary/dictionary.h" +#include "dictionary/util/jump_consistent_hash.h" +#include "dictionary/dictionary_types.h" #include "dictionary/completion/forward_backward_completion.h" #include "transform/fsa_transform.h" #include "dictionary/completion/multiword_completion.h" @@ -490,6 +490,7 @@ struct __pyx_obj_7pykeyvi_Dictionary; struct __pyx_obj_7pykeyvi_FsaTransform; struct __pyx_obj_7pykeyvi_PrefixCompletion; struct __pyx_obj_7pykeyvi_ForwardBackwardCompletion; +struct __pyx_obj_7pykeyvi_loading_strategy_types; struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler; struct __pyx_obj_7pykeyvi_MultiWordCompletion; struct __pyx_obj_7pykeyvi_PredictiveCompression; @@ -543,7 +544,7 @@ typedef void (*__pyx_t_19dictionary_compiler_callback_t)(size_t, size_t, void *) */ typedef void (*__pyx_t_17dictionary_merger_callback_t)(size_t, size_t, void *); -/* "pykeyvi.pyx":42 +/* "pykeyvi.pyx":43 * return py_result * * cdef class JsonDictionaryMerger: # <<<<<<<<<<<<<< @@ -556,7 +557,7 @@ struct __pyx_obj_7pykeyvi_JsonDictionaryMerger { }; -/* "pykeyvi.pyx":63 +/* "pykeyvi.pyx":64 * self.inst.get().Add((in_0)) * * cdef class StringDictionaryCompiler: # <<<<<<<<<<<<<< @@ -569,7 +570,7 @@ struct __pyx_obj_7pykeyvi_StringDictionaryCompiler { }; -/* "pykeyvi.pyx":141 +/* "pykeyvi.pyx":142 * self.inst.get().SetManifestFromString(m) * * cdef class JsonDictionaryCompiler: # <<<<<<<<<<<<<< @@ -582,7 +583,7 @@ struct __pyx_obj_7pykeyvi_JsonDictionaryCompiler { }; -/* "pykeyvi.pyx":219 +/* "pykeyvi.pyx":220 * self.inst.get().SetManifestFromString(m) * * cdef class Dictionary: # <<<<<<<<<<<<<< @@ -595,7 +596,7 @@ struct __pyx_obj_7pykeyvi_Dictionary { }; -/* "pykeyvi.pyx":392 +/* "pykeyvi.pyx":393 * )} * * cdef class FsaTransform: # <<<<<<<<<<<<<< @@ -608,7 +609,7 @@ struct __pyx_obj_7pykeyvi_FsaTransform { }; -/* "pykeyvi.pyx":412 +/* "pykeyvi.pyx":413 * self.inst = shared_ptr[_FsaTransform](new _FsaTransform(input_in_0)) * * cdef class PrefixCompletion: # <<<<<<<<<<<<<< @@ -621,7 +622,7 @@ struct __pyx_obj_7pykeyvi_PrefixCompletion { }; -/* "pykeyvi.pyx":445 +/* "pykeyvi.pyx":446 * return py_result * * cdef class ForwardBackwardCompletion: # <<<<<<<<<<<<<< @@ -634,9 +635,21 @@ struct __pyx_obj_7pykeyvi_ForwardBackwardCompletion { }; -/* "pykeyvi.pyx":488 +/* "pykeyvi.pyx":489 * self.inst = shared_ptr[_ForwardBackwardCompletion](new _ForwardBackwardCompletion(input_in_0, input_in_1)) * + * cdef class loading_strategy_types: # <<<<<<<<<<<<<< + * lazy = 0 + * populate = 1 + */ +struct __pyx_obj_7pykeyvi_loading_strategy_types { + PyObject_HEAD +}; + + +/* "pykeyvi.pyx":498 + * populate_key_part_no_readahead_value_part = 6 + * * cdef class CompletionDictionaryCompiler: # <<<<<<<<<<<<<< * * cdef shared_ptr[_CompletionDictionaryCompiler] inst @@ -647,7 +660,7 @@ struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler { }; -/* "pykeyvi.pyx":571 +/* "pykeyvi.pyx":581 * (py_callback)(a, b) * * cdef class MultiWordCompletion: # <<<<<<<<<<<<<< @@ -660,7 +673,7 @@ struct __pyx_obj_7pykeyvi_MultiWordCompletion { }; -/* "pykeyvi.pyx":612 +/* "pykeyvi.pyx":622 * raise Exception('can not handle type of %s' % (args,)) * * cdef class PredictiveCompression: # <<<<<<<<<<<<<< @@ -673,7 +686,7 @@ struct __pyx_obj_7pykeyvi_PredictiveCompression { }; -/* "pykeyvi.pyx":639 +/* "pykeyvi.pyx":649 * return py_result * * cdef class KeyOnlyDictionaryGenerator: # <<<<<<<<<<<<<< @@ -686,7 +699,7 @@ struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryGenerator { }; -/* "pykeyvi.pyx":663 +/* "pykeyvi.pyx":673 * self.inst.get().WriteToFile(input_in_0) * * cdef class KeyOnlyDictionaryCompiler: # <<<<<<<<<<<<<< @@ -699,7 +712,7 @@ struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler { }; -/* "pykeyvi.pyx":732 +/* "pykeyvi.pyx":742 * self.inst.get().SetManifestFromString(m) * * cdef class Match: # <<<<<<<<<<<<<< @@ -712,7 +725,7 @@ struct __pyx_obj_7pykeyvi_Match { }; -/* "pykeyvi.pyx":928 +/* "pykeyvi.pyx":938 * from match_iterator cimport MatchIterator as _MatchIterator * * cdef class MatchIterator: # <<<<<<<<<<<<<< @@ -726,7 +739,7 @@ struct __pyx_obj_7pykeyvi_MatchIterator { }; -/* "pykeyvi.pyx":79 +/* "pykeyvi.pyx":80 * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -739,7 +752,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct___init_2 { }; -/* "pykeyvi.pyx":81 +/* "pykeyvi.pyx":82 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -759,7 +772,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_2_genexpr { }; -/* "pykeyvi.pyx":89 +/* "pykeyvi.pyx":90 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -772,7 +785,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_3___init__ { }; -/* "pykeyvi.pyx":94 +/* "pykeyvi.pyx":95 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -792,7 +805,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_5_genexpr { }; -/* "pykeyvi.pyx":164 +/* "pykeyvi.pyx":165 * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -805,7 +818,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_6__init_2 { }; -/* "pykeyvi.pyx":166 +/* "pykeyvi.pyx":167 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -825,7 +838,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_8_genexpr { }; -/* "pykeyvi.pyx":174 +/* "pykeyvi.pyx":175 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -838,7 +851,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_9___init__ { }; -/* "pykeyvi.pyx":179 +/* "pykeyvi.pyx":180 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -858,7 +871,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_11_genexpr { }; -/* "pykeyvi.pyx":344 +/* "pykeyvi.pyx":345 * return py_result * * def _key_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -876,7 +889,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_12__key_iterator_wrapper { }; -/* "pykeyvi.pyx":348 +/* "pykeyvi.pyx":349 * yield m.GetMatchedString() * * def _value_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -894,7 +907,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_13__value_iterator_wrapper { }; -/* "pykeyvi.pyx":352 +/* "pykeyvi.pyx":353 * yield m.GetRawValueAsString() * * def _item_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -912,7 +925,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper { }; -/* "pykeyvi.pyx":518 +/* "pykeyvi.pyx":528 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -925,7 +938,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_15__init_2 { }; -/* "pykeyvi.pyx":520 +/* "pykeyvi.pyx":530 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -945,7 +958,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_17_genexpr { }; -/* "pykeyvi.pyx":528 +/* "pykeyvi.pyx":538 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -958,7 +971,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_18___init__ { }; -/* "pykeyvi.pyx":533 +/* "pykeyvi.pyx":543 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -978,7 +991,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_20_genexpr { }; -/* "pykeyvi.pyx":679 +/* "pykeyvi.pyx":689 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -991,7 +1004,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_21__init_2 { }; -/* "pykeyvi.pyx":681 +/* "pykeyvi.pyx":691 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -1011,7 +1024,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_23_genexpr { }; -/* "pykeyvi.pyx":689 +/* "pykeyvi.pyx":699 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -1024,7 +1037,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_24___init__ { }; -/* "pykeyvi.pyx":694 +/* "pykeyvi.pyx":704 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -1201,6 +1214,13 @@ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); +#else +#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ + PyObject_RichCompare(op1, op2, Py_EQ) + #endif + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ @@ -1357,6 +1377,8 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, #include +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value); @@ -1404,8 +1426,6 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); @@ -1488,10 +1508,6 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'libc.stdint' */ -/* Module declarations from 'cluster' */ - -/* Module declarations from 'dictionary_compiler' */ - /* Module declarations from 'libc.stdio' */ /* Module declarations from '__builtin__' */ @@ -1511,6 +1527,10 @@ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'dictionary' */ +/* Module declarations from 'cluster' */ + +/* Module declarations from 'dictionary_compiler' */ + /* Module declarations from 'forward_backward_completion' */ /* Module declarations from 'normalization' */ @@ -1533,6 +1553,7 @@ static PyTypeObject *__pyx_ptype_7pykeyvi_Dictionary = 0; static PyTypeObject *__pyx_ptype_7pykeyvi_FsaTransform = 0; static PyTypeObject *__pyx_ptype_7pykeyvi_PrefixCompletion = 0; static PyTypeObject *__pyx_ptype_7pykeyvi_ForwardBackwardCompletion = 0; +static PyTypeObject *__pyx_ptype_7pykeyvi_loading_strategy_types = 0; static PyTypeObject *__pyx_ptype_7pykeyvi_CompletionDictionaryCompiler = 0; static PyTypeObject *__pyx_ptype_7pykeyvi_MultiWordCompletion = 0; static PyTypeObject *__pyx_ptype_7pykeyvi_PredictiveCompression = 0; @@ -1596,6 +1617,7 @@ static char __pyx_k_in_0[] = "in_0"; static char __pyx_k_in_1[] = "in_1"; static char __pyx_k_json[] = "json"; static char __pyx_k_keys[] = "keys"; +static char __pyx_k_lazy[] = "lazy"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_send[] = "send"; static char __pyx_k_test[] = "__test__"; @@ -1629,10 +1651,10 @@ static char __pyx_k_KeyError[] = "KeyError"; static char __pyx_k_SetScore[] = "SetScore"; static char __pyx_k_SetStart[] = "SetStart"; static char __pyx_k_filename[] = "filename"; +static char __pyx_k_populate[] = "populate"; static char __pyx_k_Exception[] = "Exception"; static char __pyx_k_GetNear_0[] = "_GetNear_0"; static char __pyx_k_GetNear_1[] = "_GetNear_1"; -static char __pyx_k_load_lazy[] = "load_lazy"; static char __pyx_k_py_result[] = "py_result"; static char __pyx_k_traceback[] = "traceback"; static char __pyx_k_decompress[] = "decompress"; @@ -1642,6 +1664,7 @@ static char __pyx_k_memory_limit[] = "memory_limit"; static char __pyx_k_staticmethod[] = "staticmethod"; static char __pyx_k_unserialized[] = "unserialized"; static char __pyx_k_StopIteration[] = "StopIteration"; +static char __pyx_k_populate_lazy[] = "populate_lazy"; static char __pyx_k_GetCompletions_0[] = "_GetCompletions_0"; static char __pyx_k_GetCompletions_1[] = "_GetCompletions_1"; static char __pyx_k_GetMatchedString[] = "GetMatchedString"; @@ -1649,7 +1672,9 @@ static char __pyx_k_SetMatchedString[] = "SetMatchedString"; static char __pyx_k_arg_m_wrong_type[] = "arg m wrong type"; static char __pyx_k_number_of_fields[] = "number_of_fields"; static char __pyx_k_serialized_match[] = "serialized_match"; +static char __pyx_k_lazy_no_readahead[] = "lazy_no_readahead"; static char __pyx_k_max_edit_distance[] = "max_edit_distance"; +static char __pyx_k_populate_key_part[] = "populate_key_part"; static char __pyx_k_arg_end_wrong_type[] = "arg end wrong type"; static char __pyx_k_value_store_params[] = "value_store_params"; static char __pyx_k_GetRawValueAsString[] = "GetRawValueAsString"; @@ -1667,10 +1692,10 @@ static char __pyx_k_Unsupported_Value_Type[] = "Unsupported Value Type"; static char __pyx_k_value_iterator_wrapper[] = "_value_iterator_wrapper"; static char __pyx_k_arg_filename_wrong_type[] = "arg filename wrong type"; static char __pyx_k_JumpConsistentHashString[] = "JumpConsistentHashString"; -static char __pyx_k_arg_load_lazy_wrong_type[] = "arg load_lazy wrong type"; static char __pyx_k_can_not_handle_type_of_s[] = "can not handle type of %s"; static char __pyx_k_GetStatistics_locals_lambda[] = "GetStatistics.."; static char __pyx_k_arg_memory_limit_wrong_type[] = "arg memory_limit wrong type"; +static char __pyx_k_lazy_no_readahead_value_part[] = "lazy_no_readahead_value_part"; static char __pyx_k_arg_matched_string_wrong_type[] = "arg matched_string wrong type"; static char __pyx_k_arg_minimum_prefix_length_wrong[] = "arg minimum_prefix_length wrong type"; static char __pyx_k_home_hendrik_dev_git_cliqz_keyv[] = "/home/hendrik/dev/git-cliqz/keyvi/pykeyvi/src/pykeyvi.pyx"; @@ -1679,6 +1704,7 @@ static char __pyx_k_Dictionary__key_iterator_wrapper[] = "Dictionary._key_iterat static char __pyx_k_Dictionary__value_iterator_wrapp[] = "Dictionary._value_iterator_wrapper"; static char __pyx_k_arg_max_edit_distance_wrong_type[] = "arg max_edit_distance wrong type"; static char __pyx_k_arg_value_store_params_wrong_typ[] = "arg value_store_params wrong type"; +static char __pyx_k_populate_key_part_no_readahead_v[] = "populate_key_part_no_readahead_value_part"; static PyObject *__pyx_n_s_Compile; static PyObject *__pyx_n_s_Dictionary__item_iterator_wrappe; static PyObject *__pyx_n_s_Dictionary__key_iterator_wrapper; @@ -1710,7 +1736,6 @@ static PyObject *__pyx_kp_s_arg_filename_wrong_type; static PyObject *__pyx_kp_s_arg_greedy_wrong_type; static PyObject *__pyx_kp_s_arg_in_0_wrong_type; static PyObject *__pyx_kp_s_arg_in_1_wrong_type; -static PyObject *__pyx_kp_s_arg_load_lazy_wrong_type; static PyObject *__pyx_kp_s_arg_m_wrong_type; static PyObject *__pyx_kp_s_arg_matched_string_wrong_type; static PyObject *__pyx_kp_s_arg_max_edit_distance_wrong_type; @@ -1746,7 +1771,9 @@ static PyObject *__pyx_n_s_json; static PyObject *__pyx_n_s_key; static PyObject *__pyx_n_s_key_iterator_wrapper; static PyObject *__pyx_n_s_keys; -static PyObject *__pyx_n_s_load_lazy; +static PyObject *__pyx_n_s_lazy; +static PyObject *__pyx_n_s_lazy_no_readahead; +static PyObject *__pyx_n_s_lazy_no_readahead_value_part; static PyObject *__pyx_n_s_loads; static PyObject *__pyx_n_s_m; static PyObject *__pyx_n_s_main; @@ -1755,6 +1782,10 @@ static PyObject *__pyx_n_s_memory_limit; static PyObject *__pyx_n_s_minimum_prefix_length; static PyObject *__pyx_n_s_msgpack; static PyObject *__pyx_n_s_number_of_fields; +static PyObject *__pyx_n_s_populate; +static PyObject *__pyx_n_s_populate_key_part; +static PyObject *__pyx_n_s_populate_key_part_no_readahead_v; +static PyObject *__pyx_n_s_populate_lazy; static PyObject *__pyx_n_s_py_result; static PyObject *__pyx_n_s_pykeyvi; static PyObject *__pyx_n_s_r; @@ -1819,7 +1850,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_in_0, PyObject *__pyx_v_minimum_prefix_length, PyObject *__pyx_v_greedy); /* proto */ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_12_init_0(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */ -static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_load_lazy); /* proto */ +static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_filename, int __pyx_v_in_1); /* proto */ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */ @@ -1924,6 +1955,7 @@ static PyObject *__pyx_tp_new_7pykeyvi_Dictionary(PyTypeObject *t, PyObject *a, static PyObject *__pyx_tp_new_7pykeyvi_FsaTransform(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_7pykeyvi_PrefixCompletion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_7pykeyvi_ForwardBackwardCompletion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_7pykeyvi_loading_strategy_types(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_7pykeyvi_CompletionDictionaryCompiler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_7pykeyvi_MultiWordCompletion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_7pykeyvi_PredictiveCompression(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -1963,6 +1995,11 @@ static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, &__pyx_n_s_key static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0}; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_3; +static PyObject *__pyx_int_4; +static PyObject *__pyx_int_5; +static PyObject *__pyx_int_6; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; @@ -1980,7 +2017,7 @@ static PyObject *__pyx_tuple__20; static PyObject *__pyx_codeobj__19; static PyObject *__pyx_codeobj__21; -/* "pykeyvi.pyx":33 +/* "pykeyvi.pyx":34 * char * _cast_const_away(char *) * * def JumpConsistentHashString(bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -2020,11 +2057,11 @@ static PyObject *__pyx_pw_7pykeyvi_1JumpConsistentHashString(PyObject *__pyx_sel case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("JumpConsistentHashString", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("JumpConsistentHashString", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "JumpConsistentHashString") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "JumpConsistentHashString") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2037,13 +2074,13 @@ static PyObject *__pyx_pw_7pykeyvi_1JumpConsistentHashString(PyObject *__pyx_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("JumpConsistentHashString", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("JumpConsistentHashString", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.JumpConsistentHashString", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_JumpConsistentHashString(__pyx_self, __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -2072,7 +2109,7 @@ static PyObject *__pyx_pf_7pykeyvi_JumpConsistentHashString(CYTHON_UNUSED PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("JumpConsistentHashString", 0); - /* "pykeyvi.pyx":34 + /* "pykeyvi.pyx":35 * * def JumpConsistentHashString(bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -2084,12 +2121,12 @@ static PyObject *__pyx_pf_7pykeyvi_JumpConsistentHashString(CYTHON_UNUSED PyObje __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":35 + /* "pykeyvi.pyx":36 * def JumpConsistentHashString(bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -2111,32 +2148,32 @@ static PyObject *__pyx_pf_7pykeyvi_JumpConsistentHashString(CYTHON_UNUSED PyObje __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":36 + /* "pykeyvi.pyx":37 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * cdef uint32_t _r = _JumpConsistentHashString_cluster(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":38 + /* "pykeyvi.pyx":39 * cdef const_char * input_in_0 = in_0 * * cdef uint32_t _r = _JumpConsistentHashString_cluster(input_in_0, (in_1)) # <<<<<<<<<<<<<< * py_result = _r * return py_result */ - __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = keyvi::dictionary::util::JumpConsistentHashString(__pyx_v_input_in_0, ((uint32_t)__pyx_t_5)); - /* "pykeyvi.pyx":39 + /* "pykeyvi.pyx":40 * * cdef uint32_t _r = _JumpConsistentHashString_cluster(input_in_0, (in_1)) * py_result = _r # <<<<<<<<<<<<<< @@ -2145,7 +2182,7 @@ static PyObject *__pyx_pf_7pykeyvi_JumpConsistentHashString(CYTHON_UNUSED PyObje */ __pyx_v_py_result = ((uint32_t)__pyx_v__r); - /* "pykeyvi.pyx":40 + /* "pykeyvi.pyx":41 * cdef uint32_t _r = _JumpConsistentHashString_cluster(input_in_0, (in_1)) * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -2153,13 +2190,13 @@ static PyObject *__pyx_pf_7pykeyvi_JumpConsistentHashString(CYTHON_UNUSED PyObje * cdef class JsonDictionaryMerger: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_uint32_t(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":33 + /* "pykeyvi.pyx":34 * char * _cast_const_away(char *) * * def JumpConsistentHashString(bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -2178,7 +2215,7 @@ static PyObject *__pyx_pf_7pykeyvi_JumpConsistentHashString(CYTHON_UNUSED PyObje return __pyx_r; } -/* "pykeyvi.pyx":46 +/* "pykeyvi.pyx":47 * cdef shared_ptr[_JsonDictionaryMerger] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -2201,7 +2238,7 @@ static void __pyx_pf_7pykeyvi_20JsonDictionaryMerger___dealloc__(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":47 + /* "pykeyvi.pyx":48 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -2210,7 +2247,7 @@ static void __pyx_pf_7pykeyvi_20JsonDictionaryMerger___dealloc__(struct __pyx_ob */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":46 + /* "pykeyvi.pyx":47 * cdef shared_ptr[_JsonDictionaryMerger] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -2222,7 +2259,7 @@ static void __pyx_pf_7pykeyvi_20JsonDictionaryMerger___dealloc__(struct __pyx_ob __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":50 +/* "pykeyvi.pyx":51 * * * def __init__(self): # <<<<<<<<<<<<<< @@ -2255,7 +2292,7 @@ static int __pyx_pf_7pykeyvi_20JsonDictionaryMerger_2__init__(struct __pyx_obj_7 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":51 + /* "pykeyvi.pyx":52 * * def __init__(self): * self.inst = shared_ptr[_JsonDictionaryMerger](new _JsonDictionaryMerger()) # <<<<<<<<<<<<<< @@ -2266,11 +2303,11 @@ static int __pyx_pf_7pykeyvi_20JsonDictionaryMerger_2__init__(struct __pyx_obj_7 __pyx_t_1 = new keyvi::dictionary::JsonDictionaryMerger(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":50 + /* "pykeyvi.pyx":51 * * * def __init__(self): # <<<<<<<<<<<<<< @@ -2289,7 +2326,7 @@ static int __pyx_pf_7pykeyvi_20JsonDictionaryMerger_2__init__(struct __pyx_obj_7 return __pyx_r; } -/* "pykeyvi.pyx":53 +/* "pykeyvi.pyx":54 * self.inst = shared_ptr[_JsonDictionaryMerger](new _JsonDictionaryMerger()) * * def Merge(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -2306,7 +2343,7 @@ static PyObject *__pyx_pw_7pykeyvi_20JsonDictionaryMerger_5Merge(PyObject *__pyx PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Merge (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_20JsonDictionaryMerger_4Merge(((struct __pyx_obj_7pykeyvi_JsonDictionaryMerger *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -2328,7 +2365,7 @@ static PyObject *__pyx_pf_7pykeyvi_20JsonDictionaryMerger_4Merge(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Merge", 0); - /* "pykeyvi.pyx":54 + /* "pykeyvi.pyx":55 * * def Merge(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -2340,22 +2377,22 @@ static PyObject *__pyx_pf_7pykeyvi_20JsonDictionaryMerger_4Merge(struct __pyx_ob __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":56 + /* "pykeyvi.pyx":57 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * self.inst.get().Merge((in_0)) # <<<<<<<<<<<<<< * * def Add(self, bytes in_0 ): */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->Merge(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":53 + /* "pykeyvi.pyx":54 * self.inst = shared_ptr[_JsonDictionaryMerger](new _JsonDictionaryMerger()) * * def Merge(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -2375,7 +2412,7 @@ static PyObject *__pyx_pf_7pykeyvi_20JsonDictionaryMerger_4Merge(struct __pyx_ob return __pyx_r; } -/* "pykeyvi.pyx":58 +/* "pykeyvi.pyx":59 * self.inst.get().Merge((in_0)) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -2392,7 +2429,7 @@ static PyObject *__pyx_pw_7pykeyvi_20JsonDictionaryMerger_7Add(PyObject *__pyx_v PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_20JsonDictionaryMerger_6Add(((struct __pyx_obj_7pykeyvi_JsonDictionaryMerger *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -2414,7 +2451,7 @@ static PyObject *__pyx_pf_7pykeyvi_20JsonDictionaryMerger_6Add(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":59 + /* "pykeyvi.pyx":60 * * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -2426,27 +2463,27 @@ static PyObject *__pyx_pf_7pykeyvi_20JsonDictionaryMerger_6Add(struct __pyx_obj_ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":61 + /* "pykeyvi.pyx":62 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * self.inst.get().Add((in_0)) # <<<<<<<<<<<<<< * * cdef class StringDictionaryCompiler: */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->Add(((std::string)__pyx_t_2)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":58 + /* "pykeyvi.pyx":59 * self.inst.get().Merge((in_0)) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -2466,7 +2503,7 @@ static PyObject *__pyx_pf_7pykeyvi_20JsonDictionaryMerger_6Add(struct __pyx_obj_ return __pyx_r; } -/* "pykeyvi.pyx":67 +/* "pykeyvi.pyx":68 * cdef shared_ptr[_StringDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -2489,7 +2526,7 @@ static void __pyx_pf_7pykeyvi_24StringDictionaryCompiler___dealloc__(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":68 + /* "pykeyvi.pyx":69 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -2498,7 +2535,7 @@ static void __pyx_pf_7pykeyvi_24StringDictionaryCompiler___dealloc__(struct __py */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":67 + /* "pykeyvi.pyx":68 * cdef shared_ptr[_StringDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -2510,7 +2547,7 @@ static void __pyx_pf_7pykeyvi_24StringDictionaryCompiler___dealloc__(struct __py __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":71 +/* "pykeyvi.pyx":72 * * * def _init_0(self): # <<<<<<<<<<<<<< @@ -2540,7 +2577,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_2_init_0(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":72 + /* "pykeyvi.pyx":73 * * def _init_0(self): * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler()) # <<<<<<<<<<<<<< @@ -2551,11 +2588,11 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_2_init_0(struct __ __pyx_t_1 = new keyvi::dictionary::StringDictionaryCompiler(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":71 + /* "pykeyvi.pyx":72 * * * def _init_0(self): # <<<<<<<<<<<<<< @@ -2575,7 +2612,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_2_init_0(struct __ return __pyx_r; } -/* "pykeyvi.pyx":74 +/* "pykeyvi.pyx":75 * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -2609,7 +2646,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_4_init_1(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":75 + /* "pykeyvi.pyx":76 * * def _init_1(self, memory_limit ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -2631,28 +2668,28 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_4_init_1(struct __ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":77 + /* "pykeyvi.pyx":78 * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit))) # <<<<<<<<<<<<<< * * def _init_2(self, memory_limit , dict value_store_params ): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_5 = new keyvi::dictionary::StringDictionaryCompiler(((size_t)__pyx_t_4)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_5); - /* "pykeyvi.pyx":74 + /* "pykeyvi.pyx":75 * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -2672,7 +2709,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_4_init_1(struct __ return __pyx_r; } -/* "pykeyvi.pyx":79 +/* "pykeyvi.pyx":80 * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -2711,11 +2748,11 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_7_init_2(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_store_params)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2728,13 +2765,13 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_7_init_2(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.StringDictionaryCompiler._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(((struct __pyx_obj_7pykeyvi_StringDictionaryCompiler *)__pyx_v_self), __pyx_v_memory_limit, __pyx_v_value_store_params); /* function exit code */ @@ -2747,7 +2784,7 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_7_init_2(PyObject } static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_2generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":81 +/* "pykeyvi.pyx":82 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -2773,7 +2810,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_7_init_2_genexpr(P __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_2generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_2generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -2811,21 +2848,21 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_2generato return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -2833,17 +2870,17 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_2generato if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -2853,7 +2890,7 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_2generato PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -2915,7 +2952,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_7_init_2_3genexpr( __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_5generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_5generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -2953,21 +2990,21 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_5generato return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -2975,17 +3012,17 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_5generato if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -2995,7 +3032,7 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_5generato PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -3038,7 +3075,7 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_7_init_2_5generato return __pyx_r; } -/* "pykeyvi.pyx":79 +/* "pykeyvi.pyx":80 * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -3083,7 +3120,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_store_params); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_store_params); - /* "pykeyvi.pyx":80 + /* "pykeyvi.pyx":81 * * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -3105,12 +3142,12 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":81 + /* "pykeyvi.pyx":82 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -3129,35 +3166,35 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_value_store_params_wrong_typ); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":83 + /* "pykeyvi.pyx":84 * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() # <<<<<<<<<<<<<< @@ -3168,11 +3205,11 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __pyx_t_6 = new std::map (); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v1 = __pyx_t_6; - /* "pykeyvi.pyx":84 + /* "pykeyvi.pyx":85 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -3181,17 +3218,17 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ */ if (unlikely(__pyx_cur_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -3199,17 +3236,17 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -3219,7 +3256,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -3235,7 +3272,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -3248,15 +3285,15 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -3264,7 +3301,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -3272,7 +3309,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9); @@ -3280,18 +3317,18 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "pykeyvi.pyx":85 + /* "pykeyvi.pyx":86 * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): * deref(v1)[ key ] = value # <<<<<<<<<<<<<< * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit), deref(v1))) * del v1 */ - __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((*__pyx_v_v1)[((std::string)__pyx_t_14)]) = ((std::string)__pyx_t_13); - /* "pykeyvi.pyx":84 + /* "pykeyvi.pyx":85 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -3301,23 +3338,23 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pykeyvi.pyx":86 + /* "pykeyvi.pyx":87 * for key, value in value_store_params.items(): * deref(v1)[ key ] = value * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit), deref(v1))) # <<<<<<<<<<<<<< * del v1 * */ - __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_16 = new keyvi::dictionary::StringDictionaryCompiler(((size_t)__pyx_t_15), (*__pyx_v_v1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_16); - /* "pykeyvi.pyx":87 + /* "pykeyvi.pyx":88 * deref(v1)[ key ] = value * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit), deref(v1))) * del v1 # <<<<<<<<<<<<<< @@ -3326,7 +3363,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ */ delete __pyx_v_v1; - /* "pykeyvi.pyx":79 + /* "pykeyvi.pyx":80 * self.inst = shared_ptr[_StringDictionaryCompiler](new _StringDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -3354,7 +3391,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_6_init_2(struct __ return __pyx_r; } -/* "pykeyvi.pyx":89 +/* "pykeyvi.pyx":90 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -3381,7 +3418,7 @@ static int __pyx_pw_7pykeyvi_24StringDictionaryCompiler_9__init__(PyObject *__py } static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":94 +/* "pykeyvi.pyx":95 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -3407,7 +3444,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init___genexpr( __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -3446,13 +3483,13 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generat return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -3465,10 +3502,10 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generat } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3476,9 +3513,9 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generat __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -3486,17 +3523,17 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generat if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -3506,7 +3543,7 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___2generat PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -3569,7 +3606,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init___3genexpr __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -3608,13 +3645,13 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generat return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -3627,10 +3664,10 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generat } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3638,9 +3675,9 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generat __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -3648,17 +3685,17 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generat if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -3668,7 +3705,7 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generat PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -3712,7 +3749,7 @@ static PyObject *__pyx_gb_7pykeyvi_24StringDictionaryCompiler_8__init___5generat return __pyx_r; } -/* "pykeyvi.pyx":89 +/* "pykeyvi.pyx":90 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -3745,7 +3782,7 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); - /* "pykeyvi.pyx":90 + /* "pykeyvi.pyx":91 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -3756,21 +3793,21 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":91 + /* "pykeyvi.pyx":92 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":90 + /* "pykeyvi.pyx":91 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -3780,7 +3817,7 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o goto __pyx_L3; } - /* "pykeyvi.pyx":92 + /* "pykeyvi.pyx":93 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -3791,9 +3828,9 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { @@ -3823,21 +3860,21 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":93 + /* "pykeyvi.pyx":94 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) # <<<<<<<<<<<<<< * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":92 + /* "pykeyvi.pyx":93 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -3847,7 +3884,7 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o goto __pyx_L3; } - /* "pykeyvi.pyx":94 + /* "pykeyvi.pyx":95 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -3858,9 +3895,9 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((__pyx_t_5 == 2) != 0); if (__pyx_t_6) { @@ -3901,44 +3938,44 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":95 + /* "pykeyvi.pyx":96 * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":94 + /* "pykeyvi.pyx":95 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -3948,7 +3985,7 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o goto __pyx_L3; } - /* "pykeyvi.pyx":97 + /* "pykeyvi.pyx":98 * self._init_2(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -3956,29 +3993,29 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o * def Add(self, bytes in_0 , bytes in_1 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_args); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":89 + /* "pykeyvi.pyx":90 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -4000,7 +4037,7 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_8__init__(struct __pyx_o return __pyx_r; } -/* "pykeyvi.pyx":99 +/* "pykeyvi.pyx":100 * raise Exception('can not handle type of %s' % (args,)) * * def Add(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -4039,11 +4076,11 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_11Add(PyObject *__ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4056,14 +4093,14 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_11Add(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.StringDictionaryCompiler.Add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_10Add(((struct __pyx_obj_7pykeyvi_StringDictionaryCompiler *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -4087,7 +4124,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_10Add(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":100 + /* "pykeyvi.pyx":101 * * def Add(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -4099,12 +4136,12 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_10Add(struct __pyx __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":101 + /* "pykeyvi.pyx":102 * def Add(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -4116,32 +4153,32 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_10Add(struct __pyx __pyx_t_1 = PyBytes_Check(__pyx_v_in_1); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":102 + /* "pykeyvi.pyx":103 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef const_char * input_in_1 = in_1 * self.inst.get().Add(input_in_0, input_in_1) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":103 + /* "pykeyvi.pyx":104 * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 # <<<<<<<<<<<<<< * self.inst.get().Add(input_in_0, input_in_1) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_1 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":104 + /* "pykeyvi.pyx":105 * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 * self.inst.get().Add(input_in_0, input_in_1) # <<<<<<<<<<<<<< @@ -4152,10 +4189,10 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_10Add(struct __pyx __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0, __pyx_v_input_in_1); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":99 + /* "pykeyvi.pyx":100 * raise Exception('can not handle type of %s' % (args,)) * * def Add(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -4175,7 +4212,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_10Add(struct __pyx return __pyx_r; } -/* "pykeyvi.pyx":106 +/* "pykeyvi.pyx":107 * self.inst.get().Add(input_in_0, input_in_1) * * def __setitem__(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -4192,8 +4229,8 @@ static int __pyx_pw_7pykeyvi_24StringDictionaryCompiler_13__setitem__(PyObject * int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_12__setitem__(((struct __pyx_obj_7pykeyvi_StringDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0), ((PyObject*)__pyx_v_in_1)); /* function exit code */ @@ -4217,7 +4254,7 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_12__setitem__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "pykeyvi.pyx":107 + /* "pykeyvi.pyx":108 * * def __setitem__(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -4229,12 +4266,12 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_12__setitem__(struct __p __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":108 + /* "pykeyvi.pyx":109 * def __setitem__(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -4246,32 +4283,32 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_12__setitem__(struct __p __pyx_t_1 = PyBytes_Check(__pyx_v_in_1); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":109 + /* "pykeyvi.pyx":110 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef const_char * input_in_1 = in_1 * self.inst.get().__setitem__(input_in_0, input_in_1) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":110 + /* "pykeyvi.pyx":111 * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 # <<<<<<<<<<<<<< * self.inst.get().__setitem__(input_in_0, input_in_1) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_1 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":111 + /* "pykeyvi.pyx":112 * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 * self.inst.get().__setitem__(input_in_0, input_in_1) # <<<<<<<<<<<<<< @@ -4282,10 +4319,10 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_12__setitem__(struct __p __pyx_v_self->inst.get()->__setitem__(__pyx_v_input_in_0, __pyx_v_input_in_1); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":106 + /* "pykeyvi.pyx":107 * self.inst.get().Add(input_in_0, input_in_1) * * def __setitem__(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -4304,7 +4341,7 @@ static int __pyx_pf_7pykeyvi_24StringDictionaryCompiler_12__setitem__(struct __p return __pyx_r; } -/* "pykeyvi.pyx":113 +/* "pykeyvi.pyx":114 * self.inst.get().__setitem__(input_in_0, input_in_1) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -4321,7 +4358,7 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_15WriteToFile(PyOb PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_24StringDictionaryCompiler_14WriteToFile(((struct __pyx_obj_7pykeyvi_StringDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -4344,7 +4381,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_14WriteToFile(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":114 + /* "pykeyvi.pyx":115 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -4356,22 +4393,22 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_14WriteToFile(stru __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":115 + /* "pykeyvi.pyx":116 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":116 + /* "pykeyvi.pyx":117 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -4380,7 +4417,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_14WriteToFile(stru */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":113 + /* "pykeyvi.pyx":114 * self.inst.get().__setitem__(input_in_0, input_in_1) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -4400,7 +4437,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_14WriteToFile(stru return __pyx_r; } -/* "pykeyvi.pyx":118 +/* "pykeyvi.pyx":119 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -4426,7 +4463,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_16__enter__(struct __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "pykeyvi.pyx":119 + /* "pykeyvi.pyx":120 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -4438,7 +4475,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_16__enter__(struct __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":118 + /* "pykeyvi.pyx":119 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -4453,7 +4490,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_16__enter__(struct return __pyx_r; } -/* "pykeyvi.pyx":122 +/* "pykeyvi.pyx":123 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -4494,16 +4531,16 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_19__exit__(PyObjec case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -4518,7 +4555,7 @@ static PyObject *__pyx_pw_7pykeyvi_24StringDictionaryCompiler_19__exit__(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.StringDictionaryCompiler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4542,14 +4579,14 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_18__exit__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "pykeyvi.pyx":123 + /* "pykeyvi.pyx":124 * * def __exit__(self, type, value, traceback): * self.Compile() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -4562,16 +4599,16 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_18__exit__(struct } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":122 + /* "pykeyvi.pyx":123 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -4594,7 +4631,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_18__exit__(struct return __pyx_r; } -/* "pykeyvi.pyx":126 +/* "pykeyvi.pyx":127 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -4628,7 +4665,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ int __pyx_t_2; __Pyx_RefNannySetupContext("Compile", 0); - /* "pykeyvi.pyx":127 + /* "pykeyvi.pyx":128 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -4639,7 +4676,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":128 + /* "pykeyvi.pyx":129 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -4653,7 +4690,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ #endif /*try:*/ { - /* "pykeyvi.pyx":129 + /* "pykeyvi.pyx":130 * if not args: * with nogil: * self.inst.get().Compile() # <<<<<<<<<<<<<< @@ -4663,7 +4700,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ __pyx_v_self->inst.get()->Compile(); } - /* "pykeyvi.pyx":128 + /* "pykeyvi.pyx":129 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -4681,7 +4718,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ } } - /* "pykeyvi.pyx":130 + /* "pykeyvi.pyx":131 * with nogil: * self.inst.get().Compile() * return # <<<<<<<<<<<<<< @@ -4692,7 +4729,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pykeyvi.pyx":127 + /* "pykeyvi.pyx":128 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -4701,7 +4738,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ */ } - /* "pykeyvi.pyx":132 + /* "pykeyvi.pyx":133 * return * * cdef void* callback = args[0] # <<<<<<<<<<<<<< @@ -4710,7 +4747,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ */ __pyx_v_callback = ((void *)PyTuple_GET_ITEM(__pyx_v_args, 0)); - /* "pykeyvi.pyx":133 + /* "pykeyvi.pyx":134 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -4724,7 +4761,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ #endif /*try:*/ { - /* "pykeyvi.pyx":134 + /* "pykeyvi.pyx":135 * cdef void* callback = args[0] * with nogil: * self.inst.get().Compile(callback_wrapper, callback) # <<<<<<<<<<<<<< @@ -4734,7 +4771,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ __pyx_v_self->inst.get()->Compile(__pyx_f_7pykeyvi_callback_wrapper, __pyx_v_callback); } - /* "pykeyvi.pyx":133 + /* "pykeyvi.pyx":134 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -4752,7 +4789,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ } } - /* "pykeyvi.pyx":126 + /* "pykeyvi.pyx":127 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -4768,7 +4805,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_20Compile(struct _ return __pyx_r; } -/* "pykeyvi.pyx":137 +/* "pykeyvi.pyx":138 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -4803,16 +4840,16 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_22SetManifest(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetManifest", 0); - /* "pykeyvi.pyx":138 + /* "pykeyvi.pyx":139 * * def SetManifest(self, manifest): * m = json.dumps(manifest) # <<<<<<<<<<<<<< * self.inst.get().SetManifestFromString(m) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -4826,16 +4863,16 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_22SetManifest(stru } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_manifest); __Pyx_GIVEREF(__pyx_v_manifest); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_manifest); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -4843,17 +4880,17 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_22SetManifest(stru __pyx_v_m = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":139 + /* "pykeyvi.pyx":140 * def SetManifest(self, manifest): * m = json.dumps(manifest) * self.inst.get().SetManifestFromString(m) # <<<<<<<<<<<<<< * * cdef class JsonDictionaryCompiler: */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetManifestFromString(__pyx_t_5); - /* "pykeyvi.pyx":137 + /* "pykeyvi.pyx":138 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -4878,7 +4915,7 @@ static PyObject *__pyx_pf_7pykeyvi_24StringDictionaryCompiler_22SetManifest(stru return __pyx_r; } -/* "pykeyvi.pyx":145 +/* "pykeyvi.pyx":146 * cdef shared_ptr[_JsonDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -4901,7 +4938,7 @@ static void __pyx_pf_7pykeyvi_22JsonDictionaryCompiler___dealloc__(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":146 + /* "pykeyvi.pyx":147 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -4910,7 +4947,7 @@ static void __pyx_pf_7pykeyvi_22JsonDictionaryCompiler___dealloc__(struct __pyx_ */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":145 + /* "pykeyvi.pyx":146 * cdef shared_ptr[_JsonDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -4922,7 +4959,7 @@ static void __pyx_pf_7pykeyvi_22JsonDictionaryCompiler___dealloc__(struct __pyx_ __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":149 +/* "pykeyvi.pyx":150 * * * def Add(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -4961,11 +4998,11 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_3Add(PyObject *__pyx case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4978,14 +5015,14 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_3Add(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.JsonDictionaryCompiler.Add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_2Add(((struct __pyx_obj_7pykeyvi_JsonDictionaryCompiler *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -5009,7 +5046,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_2Add(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":150 + /* "pykeyvi.pyx":151 * * def Add(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -5021,12 +5058,12 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_2Add(struct __pyx_ob __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":151 + /* "pykeyvi.pyx":152 * def Add(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -5038,32 +5075,32 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_2Add(struct __pyx_ob __pyx_t_1 = PyBytes_Check(__pyx_v_in_1); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":152 + /* "pykeyvi.pyx":153 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef const_char * input_in_1 = in_1 * self.inst.get().Add(input_in_0, input_in_1) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":153 + /* "pykeyvi.pyx":154 * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 # <<<<<<<<<<<<<< * self.inst.get().Add(input_in_0, input_in_1) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_1 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":154 + /* "pykeyvi.pyx":155 * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 * self.inst.get().Add(input_in_0, input_in_1) # <<<<<<<<<<<<<< @@ -5074,10 +5111,10 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_2Add(struct __pyx_ob __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0, __pyx_v_input_in_1); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":149 + /* "pykeyvi.pyx":150 * * * def Add(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -5097,7 +5134,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_2Add(struct __pyx_ob return __pyx_r; } -/* "pykeyvi.pyx":156 +/* "pykeyvi.pyx":157 * self.inst.get().Add(input_in_0, input_in_1) * * def _init_0(self): # <<<<<<<<<<<<<< @@ -5127,7 +5164,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_4_init_0(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":157 + /* "pykeyvi.pyx":158 * * def _init_0(self): * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler()) # <<<<<<<<<<<<<< @@ -5138,11 +5175,11 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_4_init_0(struct __py __pyx_t_1 = new keyvi::dictionary::JsonDictionaryCompiler(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":156 + /* "pykeyvi.pyx":157 * self.inst.get().Add(input_in_0, input_in_1) * * def _init_0(self): # <<<<<<<<<<<<<< @@ -5162,7 +5199,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_4_init_0(struct __py return __pyx_r; } -/* "pykeyvi.pyx":159 +/* "pykeyvi.pyx":160 * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -5196,7 +5233,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_6_init_1(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":160 + /* "pykeyvi.pyx":161 * * def _init_1(self, memory_limit ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -5218,28 +5255,28 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_6_init_1(struct __py __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":162 + /* "pykeyvi.pyx":163 * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit))) # <<<<<<<<<<<<<< * * def _init_2(self, memory_limit , dict value_store_params ): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_5 = new keyvi::dictionary::JsonDictionaryCompiler(((size_t)__pyx_t_4)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_5); - /* "pykeyvi.pyx":159 + /* "pykeyvi.pyx":160 * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -5259,7 +5296,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_6_init_1(struct __py return __pyx_r; } -/* "pykeyvi.pyx":164 +/* "pykeyvi.pyx":165 * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -5298,11 +5335,11 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_9_init_2(PyObject *_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_store_params)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5315,13 +5352,13 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_9_init_2(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.JsonDictionaryCompiler._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(((struct __pyx_obj_7pykeyvi_JsonDictionaryCompiler *)__pyx_v_self), __pyx_v_memory_limit, __pyx_v_value_store_params); /* function exit code */ @@ -5334,7 +5371,7 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_9_init_2(PyObject *_ } static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_2generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":166 +/* "pykeyvi.pyx":167 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -5360,7 +5397,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_7_init_2_genexpr(PyO __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_2generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_2generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5398,21 +5435,21 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_2generator7 return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -5420,17 +5457,17 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_2generator7 if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -5440,7 +5477,7 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_2generator7 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -5502,7 +5539,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_7_init_2_3genexpr(Py __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_5generator8, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_5generator8, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5540,21 +5577,21 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_5generator8 return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -5562,17 +5599,17 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_5generator8 if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -5582,7 +5619,7 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_5generator8 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -5625,7 +5662,7 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_7_init_2_5generator8 return __pyx_r; } -/* "pykeyvi.pyx":164 +/* "pykeyvi.pyx":165 * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -5670,7 +5707,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_store_params); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_store_params); - /* "pykeyvi.pyx":165 + /* "pykeyvi.pyx":166 * * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -5692,12 +5729,12 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":166 + /* "pykeyvi.pyx":167 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -5716,35 +5753,35 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_value_store_params_wrong_typ); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":168 + /* "pykeyvi.pyx":169 * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() # <<<<<<<<<<<<<< @@ -5755,11 +5792,11 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __pyx_t_6 = new std::map (); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v1 = __pyx_t_6; - /* "pykeyvi.pyx":169 + /* "pykeyvi.pyx":170 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -5768,17 +5805,17 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py */ if (unlikely(__pyx_cur_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -5786,17 +5823,17 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -5806,7 +5843,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -5822,7 +5859,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -5835,15 +5872,15 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -5851,7 +5888,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -5859,7 +5896,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9); @@ -5867,18 +5904,18 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "pykeyvi.pyx":170 + /* "pykeyvi.pyx":171 * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): * deref(v1)[ key ] = value # <<<<<<<<<<<<<< * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit), deref(v1))) * del v1 */ - __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((*__pyx_v_v1)[((std::string)__pyx_t_14)]) = ((std::string)__pyx_t_13); - /* "pykeyvi.pyx":169 + /* "pykeyvi.pyx":170 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -5888,23 +5925,23 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pykeyvi.pyx":171 + /* "pykeyvi.pyx":172 * for key, value in value_store_params.items(): * deref(v1)[ key ] = value * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit), deref(v1))) # <<<<<<<<<<<<<< * del v1 * */ - __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_16 = new keyvi::dictionary::JsonDictionaryCompiler(((size_t)__pyx_t_15), (*__pyx_v_v1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_16); - /* "pykeyvi.pyx":172 + /* "pykeyvi.pyx":173 * deref(v1)[ key ] = value * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit), deref(v1))) * del v1 # <<<<<<<<<<<<<< @@ -5913,7 +5950,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py */ delete __pyx_v_v1; - /* "pykeyvi.pyx":164 + /* "pykeyvi.pyx":165 * self.inst = shared_ptr[_JsonDictionaryCompiler](new _JsonDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -5941,7 +5978,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8_init_2(struct __py return __pyx_r; } -/* "pykeyvi.pyx":174 +/* "pykeyvi.pyx":175 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -5968,7 +6005,7 @@ static int __pyx_pw_7pykeyvi_22JsonDictionaryCompiler_11__init__(PyObject *__pyx } static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator9(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":179 +/* "pykeyvi.pyx":180 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -5994,7 +6031,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8__init___genexpr(Py __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator9, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator9, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6033,13 +6070,13 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -6052,10 +6089,10 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -6063,9 +6100,9 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -6073,17 +6110,17 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -6093,7 +6130,7 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___2generator PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -6156,7 +6193,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8__init___3genexpr(P __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator10, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator10, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6195,13 +6232,13 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -6214,10 +6251,10 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -6225,9 +6262,9 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -6235,17 +6272,17 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -6255,7 +6292,7 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -6299,7 +6336,7 @@ static PyObject *__pyx_gb_7pykeyvi_22JsonDictionaryCompiler_8__init___5generator return __pyx_r; } -/* "pykeyvi.pyx":174 +/* "pykeyvi.pyx":175 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -6332,7 +6369,7 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); - /* "pykeyvi.pyx":175 + /* "pykeyvi.pyx":176 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -6343,21 +6380,21 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":176 + /* "pykeyvi.pyx":177 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":175 + /* "pykeyvi.pyx":176 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -6367,7 +6404,7 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob goto __pyx_L3; } - /* "pykeyvi.pyx":177 + /* "pykeyvi.pyx":178 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -6378,9 +6415,9 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { @@ -6410,21 +6447,21 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":178 + /* "pykeyvi.pyx":179 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) # <<<<<<<<<<<<<< * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":177 + /* "pykeyvi.pyx":178 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -6434,7 +6471,7 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob goto __pyx_L3; } - /* "pykeyvi.pyx":179 + /* "pykeyvi.pyx":180 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -6445,9 +6482,9 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((__pyx_t_5 == 2) != 0); if (__pyx_t_6) { @@ -6488,44 +6525,44 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":180 + /* "pykeyvi.pyx":181 * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":179 + /* "pykeyvi.pyx":180 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -6535,7 +6572,7 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob goto __pyx_L3; } - /* "pykeyvi.pyx":182 + /* "pykeyvi.pyx":183 * self._init_2(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -6543,29 +6580,29 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob * def __setitem__(self, bytes in_0 , bytes in_1 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_args); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":174 + /* "pykeyvi.pyx":175 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -6587,7 +6624,7 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_10__init__(struct __pyx_ob return __pyx_r; } -/* "pykeyvi.pyx":184 +/* "pykeyvi.pyx":185 * raise Exception('can not handle type of %s' % (args,)) * * def __setitem__(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -6604,8 +6641,8 @@ static int __pyx_pw_7pykeyvi_22JsonDictionaryCompiler_13__setitem__(PyObject *__ int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), (&PyBytes_Type), 1, "in_1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_12__setitem__(((struct __pyx_obj_7pykeyvi_JsonDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0), ((PyObject*)__pyx_v_in_1)); /* function exit code */ @@ -6629,7 +6666,7 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_12__setitem__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "pykeyvi.pyx":185 + /* "pykeyvi.pyx":186 * * def __setitem__(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -6641,12 +6678,12 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_12__setitem__(struct __pyx __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":186 + /* "pykeyvi.pyx":187 * def __setitem__(self, bytes in_0 , bytes in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -6658,32 +6695,32 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_12__setitem__(struct __pyx __pyx_t_1 = PyBytes_Check(__pyx_v_in_1); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":187 + /* "pykeyvi.pyx":188 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef const_char * input_in_1 = in_1 * self.inst.get().__setitem__(input_in_0, input_in_1) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":188 + /* "pykeyvi.pyx":189 * assert isinstance(in_1, bytes), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 # <<<<<<<<<<<<<< * self.inst.get().__setitem__(input_in_0, input_in_1) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_1 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":189 + /* "pykeyvi.pyx":190 * cdef const_char * input_in_0 = in_0 * cdef const_char * input_in_1 = in_1 * self.inst.get().__setitem__(input_in_0, input_in_1) # <<<<<<<<<<<<<< @@ -6694,10 +6731,10 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_12__setitem__(struct __pyx __pyx_v_self->inst.get()->__setitem__(__pyx_v_input_in_0, __pyx_v_input_in_1); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":184 + /* "pykeyvi.pyx":185 * raise Exception('can not handle type of %s' % (args,)) * * def __setitem__(self, bytes in_0 , bytes in_1 ): # <<<<<<<<<<<<<< @@ -6716,7 +6753,7 @@ static int __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_12__setitem__(struct __pyx return __pyx_r; } -/* "pykeyvi.pyx":191 +/* "pykeyvi.pyx":192 * self.inst.get().__setitem__(input_in_0, input_in_1) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -6733,7 +6770,7 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_15WriteToFile(PyObje PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_22JsonDictionaryCompiler_14WriteToFile(((struct __pyx_obj_7pykeyvi_JsonDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -6756,7 +6793,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_14WriteToFile(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":192 + /* "pykeyvi.pyx":193 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -6768,22 +6805,22 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_14WriteToFile(struct __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":193 + /* "pykeyvi.pyx":194 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":194 + /* "pykeyvi.pyx":195 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -6792,7 +6829,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_14WriteToFile(struct */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":191 + /* "pykeyvi.pyx":192 * self.inst.get().__setitem__(input_in_0, input_in_1) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -6812,7 +6849,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_14WriteToFile(struct return __pyx_r; } -/* "pykeyvi.pyx":196 +/* "pykeyvi.pyx":197 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -6838,7 +6875,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_16__enter__(struct _ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "pykeyvi.pyx":197 + /* "pykeyvi.pyx":198 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -6850,7 +6887,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_16__enter__(struct _ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":196 + /* "pykeyvi.pyx":197 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -6865,7 +6902,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_16__enter__(struct _ return __pyx_r; } -/* "pykeyvi.pyx":200 +/* "pykeyvi.pyx":201 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -6906,16 +6943,16 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_19__exit__(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -6930,7 +6967,7 @@ static PyObject *__pyx_pw_7pykeyvi_22JsonDictionaryCompiler_19__exit__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.JsonDictionaryCompiler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6954,14 +6991,14 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_18__exit__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "pykeyvi.pyx":201 + /* "pykeyvi.pyx":202 * * def __exit__(self, type, value, traceback): * self.Compile() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -6974,16 +7011,16 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_18__exit__(struct __ } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":200 + /* "pykeyvi.pyx":201 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -7006,7 +7043,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_18__exit__(struct __ return __pyx_r; } -/* "pykeyvi.pyx":204 +/* "pykeyvi.pyx":205 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -7040,7 +7077,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p int __pyx_t_2; __Pyx_RefNannySetupContext("Compile", 0); - /* "pykeyvi.pyx":205 + /* "pykeyvi.pyx":206 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -7051,7 +7088,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":206 + /* "pykeyvi.pyx":207 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -7065,7 +7102,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p #endif /*try:*/ { - /* "pykeyvi.pyx":207 + /* "pykeyvi.pyx":208 * if not args: * with nogil: * self.inst.get().Compile() # <<<<<<<<<<<<<< @@ -7075,7 +7112,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p __pyx_v_self->inst.get()->Compile(); } - /* "pykeyvi.pyx":206 + /* "pykeyvi.pyx":207 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -7093,7 +7130,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p } } - /* "pykeyvi.pyx":208 + /* "pykeyvi.pyx":209 * with nogil: * self.inst.get().Compile() * return # <<<<<<<<<<<<<< @@ -7104,7 +7141,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pykeyvi.pyx":205 + /* "pykeyvi.pyx":206 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -7113,7 +7150,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p */ } - /* "pykeyvi.pyx":210 + /* "pykeyvi.pyx":211 * return * * cdef void* callback = args[0] # <<<<<<<<<<<<<< @@ -7122,7 +7159,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p */ __pyx_v_callback = ((void *)PyTuple_GET_ITEM(__pyx_v_args, 0)); - /* "pykeyvi.pyx":211 + /* "pykeyvi.pyx":212 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -7136,7 +7173,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p #endif /*try:*/ { - /* "pykeyvi.pyx":212 + /* "pykeyvi.pyx":213 * cdef void* callback = args[0] * with nogil: * self.inst.get().Compile(callback_wrapper, callback) # <<<<<<<<<<<<<< @@ -7146,7 +7183,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p __pyx_v_self->inst.get()->Compile(__pyx_f_7pykeyvi_callback_wrapper, __pyx_v_callback); } - /* "pykeyvi.pyx":211 + /* "pykeyvi.pyx":212 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -7164,7 +7201,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p } } - /* "pykeyvi.pyx":204 + /* "pykeyvi.pyx":205 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -7180,7 +7217,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_20Compile(struct __p return __pyx_r; } -/* "pykeyvi.pyx":215 +/* "pykeyvi.pyx":216 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -7215,16 +7252,16 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_22SetManifest(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetManifest", 0); - /* "pykeyvi.pyx":216 + /* "pykeyvi.pyx":217 * * def SetManifest(self, manifest): * m = json.dumps(manifest) # <<<<<<<<<<<<<< * self.inst.get().SetManifestFromString(m) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -7238,16 +7275,16 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_22SetManifest(struct } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_manifest); __Pyx_GIVEREF(__pyx_v_manifest); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_manifest); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -7255,22 +7292,22 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_22SetManifest(struct __pyx_v_m = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":217 + /* "pykeyvi.pyx":218 * def SetManifest(self, manifest): * m = json.dumps(manifest) * self.inst.get().SetManifestFromString(m) # <<<<<<<<<<<<<< * * cdef class Dictionary: */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetManifestFromString(__pyx_t_5); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":215 + /* "pykeyvi.pyx":216 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -7295,7 +7332,7 @@ static PyObject *__pyx_pf_7pykeyvi_22JsonDictionaryCompiler_22SetManifest(struct return __pyx_r; } -/* "pykeyvi.pyx":223 +/* "pykeyvi.pyx":224 * cdef shared_ptr[_Dictionary] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7318,7 +7355,7 @@ static void __pyx_pf_7pykeyvi_10Dictionary___dealloc__(struct __pyx_obj_7pykeyvi __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":224 + /* "pykeyvi.pyx":225 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -7327,7 +7364,7 @@ static void __pyx_pf_7pykeyvi_10Dictionary___dealloc__(struct __pyx_obj_7pykeyvi */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":223 + /* "pykeyvi.pyx":224 * cdef shared_ptr[_Dictionary] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7339,7 +7376,7 @@ static void __pyx_pf_7pykeyvi_10Dictionary___dealloc__(struct __pyx_obj_7pykeyvi __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":227 +/* "pykeyvi.pyx":228 * * * def LookupText(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -7356,7 +7393,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_3LookupText(PyObject *__pyx_v_se PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("LookupText (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_2LookupText(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -7382,7 +7419,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_2LookupText(struct __pyx_obj_7py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("LookupText", 0); - /* "pykeyvi.pyx":228 + /* "pykeyvi.pyx":229 * * def LookupText(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -7394,22 +7431,22 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_2LookupText(struct __pyx_obj_7py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":229 + /* "pykeyvi.pyx":230 * def LookupText(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef _MatchIteratorPair _r = self.inst.get().LookupText(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":230 + /* "pykeyvi.pyx":231 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().LookupText(input_in_0) # <<<<<<<<<<<<<< @@ -7418,20 +7455,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_2LookupText(struct __pyx_obj_7py */ __pyx_v__r = __pyx_v_self->inst.get()->LookupText(__pyx_v_input_in_0); - /* "pykeyvi.pyx":231 + /* "pykeyvi.pyx":232 * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().LookupText(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":232 + /* "pykeyvi.pyx":233 * cdef _MatchIteratorPair _r = self.inst.get().LookupText(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -7440,7 +7477,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_2LookupText(struct __pyx_obj_7py */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":233 + /* "pykeyvi.pyx":234 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -7449,7 +7486,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_2LookupText(struct __pyx_obj_7py */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":234 + /* "pykeyvi.pyx":235 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -7461,7 +7498,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_2LookupText(struct __pyx_obj_7py __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":227 + /* "pykeyvi.pyx":228 * * * def LookupText(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -7481,7 +7518,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_2LookupText(struct __pyx_obj_7py return __pyx_r; } -/* "pykeyvi.pyx":236 +/* "pykeyvi.pyx":237 * return py_result * * def Lookup(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -7498,7 +7535,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_5Lookup(PyObject *__pyx_v_self, PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Lookup (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_4Lookup(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -7524,7 +7561,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_4Lookup(struct __pyx_obj_7pykeyv int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Lookup", 0); - /* "pykeyvi.pyx":237 + /* "pykeyvi.pyx":238 * * def Lookup(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -7536,22 +7573,22 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_4Lookup(struct __pyx_obj_7pykeyv __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":238 + /* "pykeyvi.pyx":239 * def Lookup(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef _MatchIteratorPair _r = self.inst.get().Lookup(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":239 + /* "pykeyvi.pyx":240 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().Lookup(input_in_0) # <<<<<<<<<<<<<< @@ -7560,20 +7597,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_4Lookup(struct __pyx_obj_7pykeyv */ __pyx_v__r = __pyx_v_self->inst.get()->Lookup(__pyx_v_input_in_0); - /* "pykeyvi.pyx":240 + /* "pykeyvi.pyx":241 * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().Lookup(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":241 + /* "pykeyvi.pyx":242 * cdef _MatchIteratorPair _r = self.inst.get().Lookup(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -7582,7 +7619,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_4Lookup(struct __pyx_obj_7pykeyv */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":242 + /* "pykeyvi.pyx":243 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -7591,7 +7628,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_4Lookup(struct __pyx_obj_7pykeyv */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":243 + /* "pykeyvi.pyx":244 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -7603,7 +7640,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_4Lookup(struct __pyx_obj_7pykeyv __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":236 + /* "pykeyvi.pyx":237 * return py_result * * def Lookup(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -7623,7 +7660,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_4Lookup(struct __pyx_obj_7pykeyv return __pyx_r; } -/* "pykeyvi.pyx":245 +/* "pykeyvi.pyx":246 * return py_result * * def _GetNear_0(self, bytes in_0 , minimum_prefix_length ): # <<<<<<<<<<<<<< @@ -7662,11 +7699,11 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_7_GetNear_0(PyObject *__pyx_v_se case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minimum_prefix_length)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_GetNear_0", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetNear_0", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetNear_0") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetNear_0") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7679,13 +7716,13 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_7_GetNear_0(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_GetNear_0", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetNear_0", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Dictionary._GetNear_0", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), __pyx_v_in_0, __pyx_v_minimum_prefix_length); /* function exit code */ @@ -7714,7 +7751,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetNear_0", 0); - /* "pykeyvi.pyx":246 + /* "pykeyvi.pyx":247 * * def _GetNear_0(self, bytes in_0 , minimum_prefix_length ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -7726,12 +7763,12 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":247 + /* "pykeyvi.pyx":248 * def _GetNear_0(self, bytes in_0 , minimum_prefix_length ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(minimum_prefix_length, (int, long)), 'arg minimum_prefix_length wrong type' # <<<<<<<<<<<<<< @@ -7753,42 +7790,42 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_minimum_prefix_length_wrong); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":250 + /* "pykeyvi.pyx":251 * * * cdef _MatchIteratorPair _r = self.inst.get().GetNear((in_0), (minimum_prefix_length)) # <<<<<<<<<<<<<< * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() */ - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_minimum_prefix_length); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_minimum_prefix_length); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_6 = __pyx_v_self->inst.get()->GetNear(((std::string)__pyx_t_4), ((size_t)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v__r = __pyx_t_6; - /* "pykeyvi.pyx":251 + /* "pykeyvi.pyx":252 * * cdef _MatchIteratorPair _r = self.inst.get().GetNear((in_0), (minimum_prefix_length)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_7 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - if (!(likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_7); __pyx_t_7 = 0; - /* "pykeyvi.pyx":252 + /* "pykeyvi.pyx":253 * cdef _MatchIteratorPair _r = self.inst.get().GetNear((in_0), (minimum_prefix_length)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -7797,7 +7834,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":253 + /* "pykeyvi.pyx":254 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -7806,7 +7843,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":254 + /* "pykeyvi.pyx":255 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -7818,7 +7855,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":245 + /* "pykeyvi.pyx":246 * return py_result * * def _GetNear_0(self, bytes in_0 , minimum_prefix_length ): # <<<<<<<<<<<<<< @@ -7838,7 +7875,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_6_GetNear_0(struct __pyx_obj_7py return __pyx_r; } -/* "pykeyvi.pyx":256 +/* "pykeyvi.pyx":257 * return py_result * * def _GetNear_1(self, bytes in_0 , minimum_prefix_length , greedy ): # <<<<<<<<<<<<<< @@ -7879,16 +7916,16 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_9_GetNear_1(PyObject *__pyx_v_se case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minimum_prefix_length)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_GetNear_1", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetNear_1", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_greedy)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_GetNear_1", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetNear_1", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetNear_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetNear_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -7903,13 +7940,13 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_9_GetNear_1(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_GetNear_1", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetNear_1", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Dictionary._GetNear_1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), __pyx_v_in_0, __pyx_v_minimum_prefix_length, __pyx_v_greedy); /* function exit code */ @@ -7939,7 +7976,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetNear_1", 0); - /* "pykeyvi.pyx":257 + /* "pykeyvi.pyx":258 * * def _GetNear_1(self, bytes in_0 , minimum_prefix_length , greedy ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -7951,12 +7988,12 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":258 + /* "pykeyvi.pyx":259 * def _GetNear_1(self, bytes in_0 , minimum_prefix_length , greedy ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(minimum_prefix_length, (int, long)), 'arg minimum_prefix_length wrong type' # <<<<<<<<<<<<<< @@ -7978,12 +8015,12 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_minimum_prefix_length_wrong); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":259 + /* "pykeyvi.pyx":260 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(minimum_prefix_length, (int, long)), 'arg minimum_prefix_length wrong type' * assert isinstance(greedy, (int, long)), 'arg greedy wrong type' # <<<<<<<<<<<<<< @@ -8005,43 +8042,43 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py __pyx_L5_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_greedy_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":263 + /* "pykeyvi.pyx":264 * * * cdef _MatchIteratorPair _r = self.inst.get().GetNear((in_0), (minimum_prefix_length), (greedy)) # <<<<<<<<<<<<<< * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() */ - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_minimum_prefix_length); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_greedy); if (unlikely((__pyx_t_6 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_minimum_prefix_length); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_greedy); if (unlikely((__pyx_t_6 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_7 = __pyx_v_self->inst.get()->GetNear(((std::string)__pyx_t_4), ((size_t)__pyx_t_5), ((bool)__pyx_t_6)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v__r = __pyx_t_7; - /* "pykeyvi.pyx":264 + /* "pykeyvi.pyx":265 * * cdef _MatchIteratorPair _r = self.inst.get().GetNear((in_0), (minimum_prefix_length), (greedy)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_8 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (!(likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_8); __pyx_t_8 = 0; - /* "pykeyvi.pyx":265 + /* "pykeyvi.pyx":266 * cdef _MatchIteratorPair _r = self.inst.get().GetNear((in_0), (minimum_prefix_length), (greedy)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -8050,7 +8087,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":266 + /* "pykeyvi.pyx":267 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -8059,7 +8096,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":267 + /* "pykeyvi.pyx":268 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -8071,7 +8108,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":256 + /* "pykeyvi.pyx":257 * return py_result * * def _GetNear_1(self, bytes in_0 , minimum_prefix_length , greedy ): # <<<<<<<<<<<<<< @@ -8091,7 +8128,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_8_GetNear_1(struct __pyx_obj_7py return __pyx_r; } -/* "pykeyvi.pyx":269 +/* "pykeyvi.pyx":270 * return py_result * * def GetNear(self, *args): # <<<<<<<<<<<<<< @@ -8132,14 +8169,14 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetNear", 0); - /* "pykeyvi.pyx":270 + /* "pykeyvi.pyx":271 * * def GetNear(self, *args): * if (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< * return self._GetNear_0(*args) * elif (len(args)==3) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))): */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_2 == 2) != 0); if (__pyx_t_3) { } else { @@ -8178,7 +8215,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":271 + /* "pykeyvi.pyx":272 * def GetNear(self, *args): * if (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): * return self._GetNear_0(*args) # <<<<<<<<<<<<<< @@ -8186,16 +8223,16 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke * return self._GetNear_1(*args) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetNear_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetNear_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":270 + /* "pykeyvi.pyx":271 * * def GetNear(self, *args): * if (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< @@ -8204,14 +8241,14 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke */ } - /* "pykeyvi.pyx":272 + /* "pykeyvi.pyx":273 * if (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): * return self._GetNear_0(*args) * elif (len(args)==3) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))): # <<<<<<<<<<<<<< * return self._GetNear_1(*args) * else: */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_2 == 3) != 0); if (__pyx_t_3) { } else { @@ -8273,7 +8310,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke __pyx_L9_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":273 + /* "pykeyvi.pyx":274 * return self._GetNear_0(*args) * elif (len(args)==3) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))): * return self._GetNear_1(*args) # <<<<<<<<<<<<<< @@ -8281,16 +8318,16 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke * raise Exception('can not handle type of %s' % (args,)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetNear_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetNear_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":272 + /* "pykeyvi.pyx":273 * if (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): * return self._GetNear_0(*args) * elif (len(args)==3) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))): # <<<<<<<<<<<<<< @@ -8299,7 +8336,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke */ } - /* "pykeyvi.pyx":275 + /* "pykeyvi.pyx":276 * return self._GetNear_1(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -8307,28 +8344,28 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke * def _init_0(self, bytes filename ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_args); - __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":269 + /* "pykeyvi.pyx":270 * return py_result * * def GetNear(self, *args): # <<<<<<<<<<<<<< @@ -8348,7 +8385,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_10GetNear(struct __pyx_obj_7pyke return __pyx_r; } -/* "pykeyvi.pyx":277 +/* "pykeyvi.pyx":278 * raise Exception('can not handle type of %s' % (args,)) * * def _init_0(self, bytes filename ): # <<<<<<<<<<<<<< @@ -8365,7 +8402,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_13_init_0(PyObject *__pyx_v_self PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_0 (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyBytes_Type), 1, "filename", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyBytes_Type), 1, "filename", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_12_init_0(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), ((PyObject*)__pyx_v_filename)); /* function exit code */ @@ -8389,7 +8426,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_12_init_0(struct __pyx_obj_7pyke int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":278 + /* "pykeyvi.pyx":279 * * def _init_0(self, bytes filename ): * assert isinstance(filename, bytes), 'arg filename wrong type' # <<<<<<<<<<<<<< @@ -8401,37 +8438,37 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_12_init_0(struct __pyx_obj_7pyke __pyx_t_1 = PyBytes_Check(__pyx_v_filename); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_filename_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":279 + /* "pykeyvi.pyx":280 * def _init_0(self, bytes filename ): * assert isinstance(filename, bytes), 'arg filename wrong type' * cdef const_char * input_filename = filename # <<<<<<<<<<<<<< * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename)) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_filename = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":280 + /* "pykeyvi.pyx":281 * assert isinstance(filename, bytes), 'arg filename wrong type' * cdef const_char * input_filename = filename * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename)) # <<<<<<<<<<<<<< * - * def _init_1(self, bytes filename , load_lazy ): + * def _init_1(self, bytes filename , int in_1 ): */ try { __pyx_t_3 = new keyvi::dictionary::Dictionary(__pyx_v_input_filename); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":277 + /* "pykeyvi.pyx":278 * raise Exception('can not handle type of %s' % (args,)) * * def _init_0(self, bytes filename ): # <<<<<<<<<<<<<< @@ -8451,19 +8488,19 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_12_init_0(struct __pyx_obj_7pyke return __pyx_r; } -/* "pykeyvi.pyx":282 +/* "pykeyvi.pyx":283 * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename)) * - * def _init_1(self, bytes filename , load_lazy ): # <<<<<<<<<<<<<< + * def _init_1(self, bytes filename , int in_1 ): # <<<<<<<<<<<<<< * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert isinstance(load_lazy, (int, long)), 'arg load_lazy wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' */ /* Python wrapper */ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_15_init_1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_15_init_1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; - PyObject *__pyx_v_load_lazy = 0; + int __pyx_v_in_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -8471,7 +8508,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_15_init_1(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_load_lazy,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_in_1,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -8488,13 +8525,13 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_15_init_1(PyObject *__pyx_v_self if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_load_lazy)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_init_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8503,18 +8540,18 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_15_init_1(PyObject *__pyx_v_self values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_filename = ((PyObject*)values[0]); - __pyx_v_load_lazy = values[1]; + __pyx_v_in_1 = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_in_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_init_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Dictionary._init_1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyBytes_Type), 1, "filename", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_14_init_1(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), __pyx_v_filename, __pyx_v_load_lazy); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyBytes_Type), 1, "filename", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_14_init_1(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), __pyx_v_filename, __pyx_v_in_1); /* function exit code */ goto __pyx_L0; @@ -8525,26 +8562,23 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_15_init_1(PyObject *__pyx_v_self return __pyx_r; } -static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_load_lazy) { +static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pykeyvi_Dictionary *__pyx_v_self, PyObject *__pyx_v_filename, int __pyx_v_in_1) { const char *__pyx_v_input_filename; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - int __pyx_t_2; - int __pyx_t_3; - const char *__pyx_t_4; - bool __pyx_t_5; - keyvi::dictionary::Dictionary *__pyx_t_6; + const char *__pyx_t_2; + keyvi::dictionary::Dictionary *__pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":283 + /* "pykeyvi.pyx":284 * - * def _init_1(self, bytes filename , load_lazy ): + * def _init_1(self, bytes filename , int in_1 ): * assert isinstance(filename, bytes), 'arg filename wrong type' # <<<<<<<<<<<<<< - * assert isinstance(load_lazy, (int, long)), 'arg load_lazy wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' * cdef const_char * input_filename = filename */ #ifndef CYTHON_WITHOUT_ASSERTIONS @@ -8552,70 +8586,72 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pyke __pyx_t_1 = PyBytes_Check(__pyx_v_filename); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_filename_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":284 - * def _init_1(self, bytes filename , load_lazy ): + /* "pykeyvi.pyx":285 + * def _init_1(self, bytes filename , int in_1 ): * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert isinstance(load_lazy, (int, long)), 'arg load_lazy wrong type' # <<<<<<<<<<<<<< + * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' # <<<<<<<<<<<<<< * cdef const_char * input_filename = filename * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_2 = PyInt_Check(__pyx_v_load_lazy); - __pyx_t_3 = (__pyx_t_2 != 0); - if (!__pyx_t_3) { - } else { - __pyx_t_1 = __pyx_t_3; - goto __pyx_L3_bool_binop_done; + switch (__pyx_v_in_1) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + __pyx_t_1 = 1; + break; + default: + __pyx_t_1 = 0; + break; } - __pyx_t_3 = PyLong_Check(__pyx_v_load_lazy); - __pyx_t_2 = (__pyx_t_3 != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { - PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_load_lazy_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":285 + /* "pykeyvi.pyx":286 * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert isinstance(load_lazy, (int, long)), 'arg load_lazy wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' * cdef const_char * input_filename = filename # <<<<<<<<<<<<<< * - * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (load_lazy))) + * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (<_loading_strategy_types>in_1))) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_input_filename = ((const char *)__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_input_filename = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":287 + /* "pykeyvi.pyx":288 * cdef const_char * input_filename = filename * - * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (load_lazy))) # <<<<<<<<<<<<<< + * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (<_loading_strategy_types>in_1))) # <<<<<<<<<<<<<< * * def __init__(self, *args): */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_load_lazy); if (unlikely((__pyx_t_5 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { - __pyx_t_6 = new keyvi::dictionary::Dictionary(__pyx_v_input_filename, ((bool)__pyx_t_5)); + __pyx_t_3 = new keyvi::dictionary::Dictionary(__pyx_v_input_filename, ((keyvi::dictionary::loading_strategy_types)__pyx_v_in_1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_v_self->inst = boost::shared_ptr (__pyx_t_6); + __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":282 + /* "pykeyvi.pyx":283 * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename)) * - * def _init_1(self, bytes filename , load_lazy ): # <<<<<<<<<<<<<< + * def _init_1(self, bytes filename , int in_1 ): # <<<<<<<<<<<<<< * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert isinstance(load_lazy, (int, long)), 'arg load_lazy wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' */ /* function exit code */ @@ -8630,8 +8666,8 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pyke return __pyx_r; } -/* "pykeyvi.pyx":289 - * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (load_lazy))) +/* "pykeyvi.pyx":290 + * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (<_loading_strategy_types>in_1))) * * def __init__(self, *args): # <<<<<<<<<<<<<< * if (len(args)==1) and (isinstance(args[0], bytes)): @@ -8665,20 +8701,19 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":290 + /* "pykeyvi.pyx":291 * * def __init__(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_2 == 1) != 0); if (__pyx_t_3) { } else { @@ -8694,38 +8729,38 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":291 + /* "pykeyvi.pyx":292 * def __init__(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): * self._init_0(*args) # <<<<<<<<<<<<<< - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): * self._init_1(*args) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "pykeyvi.pyx":290 + /* "pykeyvi.pyx":291 * * def __init__(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): */ goto __pyx_L3; } - /* "pykeyvi.pyx":292 + /* "pykeyvi.pyx":293 * if (len(args)==1) and (isinstance(args[0], bytes)): * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): # <<<<<<<<<<<<<< * self._init_1(*args) * else: */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_2 == 2) != 0); if (__pyx_t_5) { } else { @@ -8742,53 +8777,99 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } + __Pyx_INCREF(PyTuple_GET_ITEM(__pyx_v_args, 1)); __pyx_t_6 = PyTuple_GET_ITEM(__pyx_v_args, 1); - __Pyx_INCREF(__pyx_t_6); - __pyx_t_5 = PyInt_Check(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = (__pyx_t_5 != 0); - if (!__pyx_t_7) { + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { } else { - __pyx_t_3 = __pyx_t_7; + __pyx_t_3 = __pyx_t_5; goto __pyx_L9_bool_binop_done; } - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_v_args, 1); - __Pyx_INCREF(__pyx_t_6); - __pyx_t_7 = PyLong_Check(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_5; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":293 + /* "pykeyvi.pyx":294 * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): * self._init_1(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":292 + /* "pykeyvi.pyx":293 * if (len(args)==1) and (isinstance(args[0], bytes)): * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): # <<<<<<<<<<<<<< * self._init_1(*args) * else: */ goto __pyx_L3; } - /* "pykeyvi.pyx":295 + /* "pykeyvi.pyx":296 * self._init_1(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -8796,30 +8877,30 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D * def Get(self, bytes in_0 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_args); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":289 - * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (load_lazy))) + /* "pykeyvi.pyx":290 + * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (<_loading_strategy_types>in_1))) * * def __init__(self, *args): # <<<<<<<<<<<<<< * if (len(args)==1) and (isinstance(args[0], bytes)): @@ -8839,7 +8920,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D return __pyx_r; } -/* "pykeyvi.pyx":297 +/* "pykeyvi.pyx":298 * raise Exception('can not handle type of %s' % (args,)) * * def Get(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -8856,7 +8937,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_19Get(PyObject *__pyx_v_self, Py PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_10Dictionary_18Get(((struct __pyx_obj_7pykeyvi_Dictionary *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -8882,7 +8963,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Get", 0); - /* "pykeyvi.pyx":298 + /* "pykeyvi.pyx":299 * * def Get(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -8894,22 +8975,22 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":299 + /* "pykeyvi.pyx":300 * def Get(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef _MatchIteratorPair _r = self.inst.get().Get(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":300 + /* "pykeyvi.pyx":301 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().Get(input_in_0) # <<<<<<<<<<<<<< @@ -8918,20 +8999,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_ */ __pyx_v__r = __pyx_v_self->inst.get()->Get(__pyx_v_input_in_0); - /* "pykeyvi.pyx":301 + /* "pykeyvi.pyx":302 * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().Get(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":302 + /* "pykeyvi.pyx":303 * cdef _MatchIteratorPair _r = self.inst.get().Get(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -8940,7 +9021,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_ */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":303 + /* "pykeyvi.pyx":304 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -8949,7 +9030,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_ */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":304 + /* "pykeyvi.pyx":305 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -8961,7 +9042,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_ __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":297 + /* "pykeyvi.pyx":298 * raise Exception('can not handle type of %s' % (args,)) * * def Get(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -8981,7 +9062,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_18Get(struct __pyx_obj_7pykeyvi_ return __pyx_r; } -/* "pykeyvi.pyx":306 +/* "pykeyvi.pyx":307 * return py_result * * def get (self, key, default = None): # <<<<<<<<<<<<<< @@ -9025,7 +9106,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_21get(PyObject *__pyx_v_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -9040,7 +9121,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_21get(PyObject *__pyx_v_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Dictionary.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9069,7 +9150,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ __Pyx_RefNannySetupContext("get", 0); __Pyx_INCREF(__pyx_v_key); - /* "pykeyvi.pyx":307 + /* "pykeyvi.pyx":308 * * def get (self, key, default = None): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -9080,22 +9161,22 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":308 + /* "pykeyvi.pyx":309 * def get (self, key, default = None): * if isinstance(key, unicode): * key = key.encode('utf-8') # <<<<<<<<<<<<<< * assert isinstance(key, bytes), 'arg in_0 wrong type' * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":307 + /* "pykeyvi.pyx":308 * * def get (self, key, default = None): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -9104,7 +9185,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ */ } - /* "pykeyvi.pyx":309 + /* "pykeyvi.pyx":310 * if isinstance(key, unicode): * key = key.encode('utf-8') * assert isinstance(key, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -9116,22 +9197,22 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ __pyx_t_2 = PyBytes_Check(__pyx_v_key); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":311 + /* "pykeyvi.pyx":312 * assert isinstance(key, bytes), 'arg in_0 wrong type' * * cdef shared_ptr[_Match] _r = shared_ptr[_Match](new _Match(deref(self.inst.get())[(key)])) # <<<<<<<<<<<<<< * * if _r.get().IsEmpty(): */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = boost::shared_ptr (new keyvi::dictionary::Match(((*__pyx_v_self->inst.get())[((const char *)__pyx_t_5)]))); - /* "pykeyvi.pyx":313 + /* "pykeyvi.pyx":314 * cdef shared_ptr[_Match] _r = shared_ptr[_Match](new _Match(deref(self.inst.get())[(key)])) * * if _r.get().IsEmpty(): # <<<<<<<<<<<<<< @@ -9141,7 +9222,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ __pyx_t_2 = (__pyx_v__r.get()->IsEmpty() != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":314 + /* "pykeyvi.pyx":315 * * if _r.get().IsEmpty(): * return default # <<<<<<<<<<<<<< @@ -9153,7 +9234,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ __pyx_r = __pyx_v_default; goto __pyx_L0; - /* "pykeyvi.pyx":313 + /* "pykeyvi.pyx":314 * cdef shared_ptr[_Match] _r = shared_ptr[_Match](new _Match(deref(self.inst.get())[(key)])) * * if _r.get().IsEmpty(): # <<<<<<<<<<<<<< @@ -9162,20 +9243,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ */ } - /* "pykeyvi.pyx":315 + /* "pykeyvi.pyx":316 * if _r.get().IsEmpty(): * return default * cdef Match py_result = Match.__new__(Match) # <<<<<<<<<<<<<< * py_result.inst = _r * return py_result */ - __pyx_t_4 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":316 + /* "pykeyvi.pyx":317 * return default * cdef Match py_result = Match.__new__(Match) * py_result.inst = _r # <<<<<<<<<<<<<< @@ -9184,7 +9265,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ */ __pyx_v_py_result->inst = __pyx_v__r; - /* "pykeyvi.pyx":317 + /* "pykeyvi.pyx":318 * cdef Match py_result = Match.__new__(Match) * py_result.inst = _r * return py_result # <<<<<<<<<<<<<< @@ -9196,7 +9277,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":306 + /* "pykeyvi.pyx":307 * return py_result * * def get (self, key, default = None): # <<<<<<<<<<<<<< @@ -9218,7 +9299,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_20get(struct __pyx_obj_7pykeyvi_ return __pyx_r; } -/* "pykeyvi.pyx":319 +/* "pykeyvi.pyx":320 * return py_result * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -9253,7 +9334,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_22__contains__(struct __pyx_obj_7pykey __Pyx_RefNannySetupContext("__contains__", 0); __Pyx_INCREF(__pyx_v_key); - /* "pykeyvi.pyx":320 + /* "pykeyvi.pyx":321 * * def __contains__(self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -9264,22 +9345,22 @@ static int __pyx_pf_7pykeyvi_10Dictionary_22__contains__(struct __pyx_obj_7pykey __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":321 + /* "pykeyvi.pyx":322 * def __contains__(self, key): * if isinstance(key, unicode): * key = key.encode('utf-8') # <<<<<<<<<<<<<< * * assert isinstance(key, bytes), 'arg in_0 wrong type' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":320 + /* "pykeyvi.pyx":321 * * def __contains__(self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -9288,7 +9369,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_22__contains__(struct __pyx_obj_7pykey */ } - /* "pykeyvi.pyx":323 + /* "pykeyvi.pyx":324 * key = key.encode('utf-8') * * assert isinstance(key, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -9300,23 +9381,23 @@ static int __pyx_pf_7pykeyvi_10Dictionary_22__contains__(struct __pyx_obj_7pykey __pyx_t_2 = PyBytes_Check(__pyx_v_key); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":325 + /* "pykeyvi.pyx":326 * assert isinstance(key, bytes), 'arg in_0 wrong type' * * return self.inst.get().Contains(key) # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_v_self->inst.get()->Contains(__pyx_t_5); goto __pyx_L0; - /* "pykeyvi.pyx":319 + /* "pykeyvi.pyx":320 * return py_result * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -9336,7 +9417,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_22__contains__(struct __pyx_obj_7pykey return __pyx_r; } -/* "pykeyvi.pyx":327 +/* "pykeyvi.pyx":328 * return self.inst.get().Contains(key) * * def __len__(self): # <<<<<<<<<<<<<< @@ -9362,7 +9443,7 @@ static Py_ssize_t __pyx_pf_7pykeyvi_10Dictionary_24__len__(struct __pyx_obj_7pyk __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "pykeyvi.pyx":328 + /* "pykeyvi.pyx":329 * * def __len__(self): * return self.inst.get().GetSize() # <<<<<<<<<<<<<< @@ -9372,7 +9453,7 @@ static Py_ssize_t __pyx_pf_7pykeyvi_10Dictionary_24__len__(struct __pyx_obj_7pyk __pyx_r = __pyx_v_self->inst.get()->GetSize(); goto __pyx_L0; - /* "pykeyvi.pyx":327 + /* "pykeyvi.pyx":328 * return self.inst.get().Contains(key) * * def __len__(self): # <<<<<<<<<<<<<< @@ -9386,7 +9467,7 @@ static Py_ssize_t __pyx_pf_7pykeyvi_10Dictionary_24__len__(struct __pyx_obj_7pyk return __pyx_r; } -/* "pykeyvi.pyx":330 +/* "pykeyvi.pyx":331 * return self.inst.get().GetSize() * * def __getitem__ (self, key): # <<<<<<<<<<<<<< @@ -9423,7 +9504,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 __Pyx_RefNannySetupContext("__getitem__", 0); __Pyx_INCREF(__pyx_v_key); - /* "pykeyvi.pyx":331 + /* "pykeyvi.pyx":332 * * def __getitem__ (self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -9434,22 +9515,22 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":332 + /* "pykeyvi.pyx":333 * def __getitem__ (self, key): * if isinstance(key, unicode): * key = key.encode('utf-8') # <<<<<<<<<<<<<< * * assert isinstance(key, bytes), 'arg in_0 wrong type' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":331 + /* "pykeyvi.pyx":332 * * def __getitem__ (self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -9458,7 +9539,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 */ } - /* "pykeyvi.pyx":334 + /* "pykeyvi.pyx":335 * key = key.encode('utf-8') * * assert isinstance(key, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -9470,22 +9551,22 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 __pyx_t_2 = PyBytes_Check(__pyx_v_key); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":336 + /* "pykeyvi.pyx":337 * assert isinstance(key, bytes), 'arg in_0 wrong type' * * cdef shared_ptr[_Match] _r = shared_ptr[_Match](new _Match(deref(self.inst.get())[(key)])) # <<<<<<<<<<<<<< * * if _r.get().IsEmpty(): */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = boost::shared_ptr (new keyvi::dictionary::Match(((*__pyx_v_self->inst.get())[((const char *)__pyx_t_5)]))); - /* "pykeyvi.pyx":338 + /* "pykeyvi.pyx":339 * cdef shared_ptr[_Match] _r = shared_ptr[_Match](new _Match(deref(self.inst.get())[(key)])) * * if _r.get().IsEmpty(): # <<<<<<<<<<<<<< @@ -9495,26 +9576,26 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 __pyx_t_2 = (__pyx_v__r.get()->IsEmpty() != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":339 + /* "pykeyvi.pyx":340 * * if _r.get().IsEmpty(): * raise KeyError(key) # <<<<<<<<<<<<<< * cdef Match py_result = Match.__new__(Match) * py_result.inst = _r */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":338 + /* "pykeyvi.pyx":339 * cdef shared_ptr[_Match] _r = shared_ptr[_Match](new _Match(deref(self.inst.get())[(key)])) * * if _r.get().IsEmpty(): # <<<<<<<<<<<<<< @@ -9523,20 +9604,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 */ } - /* "pykeyvi.pyx":340 + /* "pykeyvi.pyx":341 * if _r.get().IsEmpty(): * raise KeyError(key) * cdef Match py_result = Match.__new__(Match) # <<<<<<<<<<<<<< * py_result.inst = _r * return py_result */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":341 + /* "pykeyvi.pyx":342 * raise KeyError(key) * cdef Match py_result = Match.__new__(Match) * py_result.inst = _r # <<<<<<<<<<<<<< @@ -9545,7 +9626,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 */ __pyx_v_py_result->inst = __pyx_v__r; - /* "pykeyvi.pyx":342 + /* "pykeyvi.pyx":343 * cdef Match py_result = Match.__new__(Match) * py_result.inst = _r * return py_result # <<<<<<<<<<<<<< @@ -9557,7 +9638,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":330 + /* "pykeyvi.pyx":331 * return self.inst.get().GetSize() * * def __getitem__ (self, key): # <<<<<<<<<<<<<< @@ -9580,7 +9661,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_26__getitem__(struct __pyx_obj_7 } static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":344 +/* "pykeyvi.pyx":345 * return py_result * * def _key_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -9622,7 +9703,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_28_key_iterator_wrapper(CYTHON_U __Pyx_INCREF(__pyx_cur_scope->__pyx_v_iterator); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_iterator); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_10Dictionary_30generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_key_iterator_wrapper, __pyx_n_s_Dictionary__key_iterator_wrapper); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_10Dictionary_30generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_key_iterator_wrapper, __pyx_n_s_Dictionary__key_iterator_wrapper); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -9661,9 +9742,9 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":345 + /* "pykeyvi.pyx":346 * * def _key_iterator_wrapper(self, iterator): * for m in iterator: # <<<<<<<<<<<<<< @@ -9674,26 +9755,26 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec __pyx_t_1 = __pyx_cur_scope->__pyx_v_iterator; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -9703,7 +9784,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -9714,14 +9795,14 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":346 + /* "pykeyvi.pyx":347 * def _key_iterator_wrapper(self, iterator): * for m in iterator: * yield m.GetMatchedString() # <<<<<<<<<<<<<< * * def _value_iterator_wrapper(self, iterator): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetMatchedString); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetMatchedString); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { @@ -9734,10 +9815,10 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec } } if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -9758,9 +9839,9 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":345 + /* "pykeyvi.pyx":346 * * def _key_iterator_wrapper(self, iterator): * for m in iterator: # <<<<<<<<<<<<<< @@ -9770,7 +9851,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":344 + /* "pykeyvi.pyx":345 * return py_result * * def _key_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -9796,7 +9877,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_30generator(__pyx_CoroutineObjec } static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":348 +/* "pykeyvi.pyx":349 * yield m.GetMatchedString() * * def _value_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -9838,7 +9919,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_31_value_iterator_wrapper(CYTHON __Pyx_INCREF(__pyx_cur_scope->__pyx_v_iterator); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_iterator); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_10Dictionary_33generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_value_iterator_wrapper, __pyx_n_s_Dictionary__value_iterator_wrapp); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_10Dictionary_33generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_value_iterator_wrapper, __pyx_n_s_Dictionary__value_iterator_wrapp); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -9877,9 +9958,9 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":349 + /* "pykeyvi.pyx":350 * * def _value_iterator_wrapper(self, iterator): * for m in iterator: # <<<<<<<<<<<<<< @@ -9890,26 +9971,26 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje __pyx_t_1 = __pyx_cur_scope->__pyx_v_iterator; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -9919,7 +10000,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -9930,14 +10011,14 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":350 + /* "pykeyvi.pyx":351 * def _value_iterator_wrapper(self, iterator): * for m in iterator: * yield m.GetRawValueAsString() # <<<<<<<<<<<<<< * * def _item_iterator_wrapper(self, iterator): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetRawValueAsString); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetRawValueAsString); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { @@ -9950,10 +10031,10 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje } } if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -9974,9 +10055,9 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":349 + /* "pykeyvi.pyx":350 * * def _value_iterator_wrapper(self, iterator): * for m in iterator: # <<<<<<<<<<<<<< @@ -9986,7 +10067,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":348 + /* "pykeyvi.pyx":349 * yield m.GetMatchedString() * * def _value_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -10012,7 +10093,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_33generator1(__pyx_CoroutineObje } static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":352 +/* "pykeyvi.pyx":353 * yield m.GetRawValueAsString() * * def _item_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -10054,7 +10135,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_34_item_iterator_wrapper(CYTHON_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_iterator); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_iterator); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_10Dictionary_36generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_item_iterator_wrapper, __pyx_n_s_Dictionary__item_iterator_wrappe); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_10Dictionary_36generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_item_iterator_wrapper, __pyx_n_s_Dictionary__item_iterator_wrappe); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -10094,9 +10175,9 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":353 + /* "pykeyvi.pyx":354 * * def _item_iterator_wrapper(self, iterator): * for m in iterator: # <<<<<<<<<<<<<< @@ -10107,26 +10188,26 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje __pyx_t_1 = __pyx_cur_scope->__pyx_v_iterator; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_iterator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -10136,7 +10217,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -10147,14 +10228,14 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":354 + /* "pykeyvi.pyx":355 * def _item_iterator_wrapper(self, iterator): * for m in iterator: * yield (m.GetMatchedString(), m.GetRawValueAsString()) # <<<<<<<<<<<<<< * * def GetAllKeys(self): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetMatchedString); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetMatchedString); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { @@ -10167,14 +10248,14 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje } } if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetRawValueAsString); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_m, __pyx_n_s_GetRawValueAsString); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { @@ -10187,14 +10268,14 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje } } if (__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -10219,9 +10300,9 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":353 + /* "pykeyvi.pyx":354 * * def _item_iterator_wrapper(self, iterator): * for m in iterator: # <<<<<<<<<<<<<< @@ -10231,7 +10312,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":352 + /* "pykeyvi.pyx":353 * yield m.GetRawValueAsString() * * def _item_iterator_wrapper(self, iterator): # <<<<<<<<<<<<<< @@ -10257,7 +10338,7 @@ static PyObject *__pyx_gb_7pykeyvi_10Dictionary_36generator2(__pyx_CoroutineObje return __pyx_r; } -/* "pykeyvi.pyx":356 +/* "pykeyvi.pyx":357 * yield (m.GetMatchedString(), m.GetRawValueAsString()) * * def GetAllKeys(self): # <<<<<<<<<<<<<< @@ -10292,7 +10373,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetAllKeys", 0); - /* "pykeyvi.pyx":357 + /* "pykeyvi.pyx":358 * * def GetAllKeys(self): * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() # <<<<<<<<<<<<<< @@ -10301,20 +10382,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p */ __pyx_v__r = __pyx_v_self->inst.get()->GetAllItems(); - /* "pykeyvi.pyx":358 + /* "pykeyvi.pyx":359 * def GetAllKeys(self): * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_1 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":359 + /* "pykeyvi.pyx":360 * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -10323,7 +10404,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":360 + /* "pykeyvi.pyx":361 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -10332,7 +10413,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":361 + /* "pykeyvi.pyx":362 * py_result.it = _r.begin() * py_result.end = _r.end() * return self._key_iterator_wrapper(py_result) # <<<<<<<<<<<<<< @@ -10340,7 +10421,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p * def GetAllValues(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_key_iterator_wrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_key_iterator_wrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -10353,16 +10434,16 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_py_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_py_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_py_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_py_result)); PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_py_result)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -10371,7 +10452,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":356 + /* "pykeyvi.pyx":357 * yield (m.GetMatchedString(), m.GetRawValueAsString()) * * def GetAllKeys(self): # <<<<<<<<<<<<<< @@ -10394,7 +10475,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_37GetAllKeys(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":363 +/* "pykeyvi.pyx":364 * return self._key_iterator_wrapper(py_result) * * def GetAllValues(self): # <<<<<<<<<<<<<< @@ -10429,7 +10510,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetAllValues", 0); - /* "pykeyvi.pyx":364 + /* "pykeyvi.pyx":365 * * def GetAllValues(self): * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() # <<<<<<<<<<<<<< @@ -10438,20 +10519,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ */ __pyx_v__r = __pyx_v_self->inst.get()->GetAllItems(); - /* "pykeyvi.pyx":365 + /* "pykeyvi.pyx":366 * def GetAllValues(self): * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_1 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":366 + /* "pykeyvi.pyx":367 * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -10460,7 +10541,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":367 + /* "pykeyvi.pyx":368 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -10469,7 +10550,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":368 + /* "pykeyvi.pyx":369 * py_result.it = _r.begin() * py_result.end = _r.end() * return self._value_iterator_wrapper(py_result) # <<<<<<<<<<<<<< @@ -10477,7 +10558,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ * def GetAllItems(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value_iterator_wrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value_iterator_wrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -10490,16 +10571,16 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_py_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_py_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_py_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_py_result)); PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_py_result)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -10508,7 +10589,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":363 + /* "pykeyvi.pyx":364 * return self._key_iterator_wrapper(py_result) * * def GetAllValues(self): # <<<<<<<<<<<<<< @@ -10531,7 +10612,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_39GetAllValues(struct __pyx_obj_ return __pyx_r; } -/* "pykeyvi.pyx":370 +/* "pykeyvi.pyx":371 * return self._value_iterator_wrapper(py_result) * * def GetAllItems(self): # <<<<<<<<<<<<<< @@ -10566,7 +10647,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetAllItems", 0); - /* "pykeyvi.pyx":371 + /* "pykeyvi.pyx":372 * * def GetAllItems(self): * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() # <<<<<<<<<<<<<< @@ -10575,20 +10656,20 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 */ __pyx_v__r = __pyx_v_self->inst.get()->GetAllItems(); - /* "pykeyvi.pyx":372 + /* "pykeyvi.pyx":373 * def GetAllItems(self): * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_1 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":373 + /* "pykeyvi.pyx":374 * cdef _MatchIteratorPair _r = self.inst.get().GetAllItems() * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -10597,7 +10678,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":374 + /* "pykeyvi.pyx":375 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -10606,7 +10687,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":375 + /* "pykeyvi.pyx":376 * py_result.it = _r.begin() * py_result.end = _r.end() * return self._item_iterator_wrapper(py_result) # <<<<<<<<<<<<<< @@ -10614,7 +10695,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 * def GetManifest(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_item_iterator_wrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_item_iterator_wrapper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -10627,16 +10708,16 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_py_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_py_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_py_result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_py_result)); PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_py_result)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -10645,7 +10726,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":370 + /* "pykeyvi.pyx":371 * return self._value_iterator_wrapper(py_result) * * def GetAllItems(self): # <<<<<<<<<<<<<< @@ -10668,7 +10749,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_41GetAllItems(struct __pyx_obj_7 return __pyx_r; } -/* "pykeyvi.pyx":377 +/* "pykeyvi.pyx":378 * return self._item_iterator_wrapper(py_result) * * def GetManifest(self): # <<<<<<<<<<<<<< @@ -10705,7 +10786,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_43GetManifest(struct __pyx_obj_7 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetManifest", 0); - /* "pykeyvi.pyx":378 + /* "pykeyvi.pyx":379 * * def GetManifest(self): * cdef libcpp_string _r = self.inst.get().GetManifestAsString() # <<<<<<<<<<<<<< @@ -10716,35 +10797,35 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_43GetManifest(struct __pyx_obj_7 __pyx_t_1 = __pyx_v_self->inst.get()->GetManifestAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v__r = __pyx_t_1; - /* "pykeyvi.pyx":379 + /* "pykeyvi.pyx":380 * def GetManifest(self): * cdef libcpp_string _r = self.inst.get().GetManifestAsString() * cdef bytes py_result = _r # <<<<<<<<<<<<<< * import json * return json.loads(py_result) */ - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__r); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__r); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_py_result = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pykeyvi.pyx":380 + /* "pykeyvi.pyx":381 * cdef libcpp_string _r = self.inst.get().GetManifestAsString() * cdef bytes py_result = _r * import json # <<<<<<<<<<<<<< * return json.loads(py_result) * */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_json = __pyx_t_2; __pyx_t_2 = 0; - /* "pykeyvi.pyx":381 + /* "pykeyvi.pyx":382 * cdef bytes py_result = _r * import json * return json.loads(py_result) # <<<<<<<<<<<<<< @@ -10752,7 +10833,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_43GetManifest(struct __pyx_obj_7 * def GetStatistics(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_json, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_json, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -10765,16 +10846,16 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_43GetManifest(struct __pyx_obj_7 } } if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_py_result); __Pyx_GIVEREF(__pyx_v_py_result); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_py_result); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -10783,7 +10864,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_43GetManifest(struct __pyx_obj_7 __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":377 + /* "pykeyvi.pyx":378 * return self._item_iterator_wrapper(py_result) * * def GetManifest(self): # <<<<<<<<<<<<<< @@ -10807,7 +10888,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_43GetManifest(struct __pyx_obj_7 return __pyx_r; } -/* "pykeyvi.pyx":383 +/* "pykeyvi.pyx":384 * return json.loads(py_result) * * def GetStatistics(self): # <<<<<<<<<<<<<< @@ -10828,7 +10909,7 @@ static PyObject *__pyx_pw_7pykeyvi_10Dictionary_46GetStatistics(PyObject *__pyx_ return __pyx_r; } -/* "pykeyvi.pyx":388 +/* "pykeyvi.pyx":389 * import json * return {k: json.loads(v) for k, v in filter( * lambda kv: kv and isinstance(kv, list) and len(kv) > 1 and kv[1], # <<<<<<<<<<<<<< @@ -10862,7 +10943,7 @@ static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda8", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_kv); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_kv); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_kv); @@ -10872,23 +10953,23 @@ static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self __pyx_t_2 = PyList_Check(__pyx_v_kv); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - __pyx_t_4 = PyObject_Length(__pyx_v_kv); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Length(__pyx_v_kv); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_4 > 1); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_kv, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_kv, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; @@ -10910,7 +10991,7 @@ static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "pykeyvi.pyx":383 +/* "pykeyvi.pyx":384 * return json.loads(py_result) * * def GetStatistics(self): # <<<<<<<<<<<<<< @@ -10939,7 +11020,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetStatistics", 0); - /* "pykeyvi.pyx":384 + /* "pykeyvi.pyx":385 * * def GetStatistics(self): * cdef libcpp_string _r = self.inst.get().GetStatistics() # <<<<<<<<<<<<<< @@ -10948,31 +11029,31 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj */ __pyx_v__r = __pyx_v_self->inst.get()->GetStatistics(); - /* "pykeyvi.pyx":385 + /* "pykeyvi.pyx":386 * def GetStatistics(self): * cdef libcpp_string _r = self.inst.get().GetStatistics() * cdef bytes py_result = _r # <<<<<<<<<<<<<< * import json * return {k: json.loads(v) for k, v in filter( */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__r); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__r); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_py_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":386 + /* "pykeyvi.pyx":387 * cdef libcpp_string _r = self.inst.get().GetStatistics() * cdef bytes py_result = _r * import json # <<<<<<<<<<<<<< * return {k: json.loads(v) for k, v in filter( * lambda kv: kv and isinstance(kv, list) and len(kv) > 1 and kv[1], */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_json = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":387 + /* "pykeyvi.pyx":388 * cdef bytes py_result = _r * import json * return {k: json.loads(v) for k, v in filter( # <<<<<<<<<<<<<< @@ -10984,40 +11065,40 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj PyObject *__pyx_8genexpr8__pyx_v_k = NULL; PyObject *__pyx_8genexpr8__pyx_v_v = NULL; PyObject *__pyx_8genexpr8__pyx_v_s = NULL; - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_1); - /* "pykeyvi.pyx":388 + /* "pykeyvi.pyx":389 * import json * return {k: json.loads(v) for k, v in filter( * lambda kv: kv and isinstance(kv, list) and len(kv) > 1 and kv[1], # <<<<<<<<<<<<<< * [s.rstrip().split("\n") for s in py_result.split("\n\n")] * )} */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7pykeyvi_10Dictionary_13GetStatistics_8genexpr8_lambda8, 0, __pyx_n_s_GetStatistics_locals_lambda, NULL, __pyx_n_s_pykeyvi, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7pykeyvi_10Dictionary_13GetStatistics_8genexpr8_lambda8, 0, __pyx_n_s_GetStatistics_locals_lambda, NULL, __pyx_n_s_pykeyvi, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); - /* "pykeyvi.pyx":389 + /* "pykeyvi.pyx":390 * return {k: json.loads(v) for k, v in filter( * lambda kv: kv and isinstance(kv, list) and len(kv) > 1 and kv[1], * [s.rstrip().split("\n") for s in py_result.split("\n\n")] # <<<<<<<<<<<<<< * )} * */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_result, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_result, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -11025,17 +11106,17 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); #endif } @@ -11045,7 +11126,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } break; } @@ -11053,7 +11134,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj } __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr8__pyx_v_s, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr8__pyx_v_s, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { @@ -11066,32 +11147,32 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj } } if (__pyx_t_9) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":387 + /* "pykeyvi.pyx":388 * cdef bytes py_result = _r * import json * return {k: json.loads(v) for k, v in filter( # <<<<<<<<<<<<<< * lambda kv: kv and isinstance(kv, list) and len(kv) > 1 and kv[1], * [s.rstrip().split("\n") for s in py_result.split("\n\n")] */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -11099,16 +11180,16 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -11116,17 +11197,17 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); #endif } @@ -11136,7 +11217,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } break; } @@ -11152,7 +11233,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -11165,15 +11246,15 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -11181,7 +11262,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_unpacking_done; @@ -11189,14 +11270,14 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_k, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_json, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_json, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { @@ -11209,21 +11290,21 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj } } if (!__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_8genexpr8__pyx_v_v); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_8genexpr8__pyx_v_v); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_8genexpr8__pyx_v_v); __Pyx_GIVEREF(__pyx_8genexpr8__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_8genexpr8__pyx_v_v); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr8__pyx_v_k, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr8__pyx_v_k, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -11242,7 +11323,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":383 + /* "pykeyvi.pyx":384 * return json.loads(py_result) * * def GetStatistics(self): # <<<<<<<<<<<<<< @@ -11269,7 +11350,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_45GetStatistics(struct __pyx_obj return __pyx_r; } -/* "pykeyvi.pyx":396 +/* "pykeyvi.pyx":397 * cdef shared_ptr[_FsaTransform] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -11292,7 +11373,7 @@ static void __pyx_pf_7pykeyvi_12FsaTransform___dealloc__(struct __pyx_obj_7pykey __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":397 + /* "pykeyvi.pyx":398 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -11301,7 +11382,7 @@ static void __pyx_pf_7pykeyvi_12FsaTransform___dealloc__(struct __pyx_obj_7pykey */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":396 + /* "pykeyvi.pyx":397 * cdef shared_ptr[_FsaTransform] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -11313,7 +11394,7 @@ static void __pyx_pf_7pykeyvi_12FsaTransform___dealloc__(struct __pyx_obj_7pykey __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":400 +/* "pykeyvi.pyx":401 * * * def Normalize(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -11330,7 +11411,7 @@ static PyObject *__pyx_pw_7pykeyvi_12FsaTransform_3Normalize(PyObject *__pyx_v_s PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Normalize (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_12FsaTransform_2Normalize(((struct __pyx_obj_7pykeyvi_FsaTransform *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -11355,7 +11436,7 @@ static PyObject *__pyx_pf_7pykeyvi_12FsaTransform_2Normalize(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Normalize", 0); - /* "pykeyvi.pyx":401 + /* "pykeyvi.pyx":402 * * def Normalize(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -11367,22 +11448,22 @@ static PyObject *__pyx_pf_7pykeyvi_12FsaTransform_2Normalize(struct __pyx_obj_7p __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":403 + /* "pykeyvi.pyx":404 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * cdef libcpp_string _r = self.inst.get().Normalize((in_0)) # <<<<<<<<<<<<<< * py_result = _r * return py_result */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->Normalize(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":404 + /* "pykeyvi.pyx":405 * * cdef libcpp_string _r = self.inst.get().Normalize((in_0)) * py_result = _r # <<<<<<<<<<<<<< @@ -11391,7 +11472,7 @@ static PyObject *__pyx_pf_7pykeyvi_12FsaTransform_2Normalize(struct __pyx_obj_7p */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":405 + /* "pykeyvi.pyx":406 * cdef libcpp_string _r = self.inst.get().Normalize((in_0)) * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -11399,13 +11480,13 @@ static PyObject *__pyx_pf_7pykeyvi_12FsaTransform_2Normalize(struct __pyx_obj_7p * def __init__(self, Dictionary in_0 ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":400 + /* "pykeyvi.pyx":401 * * * def Normalize(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -11424,7 +11505,7 @@ static PyObject *__pyx_pf_7pykeyvi_12FsaTransform_2Normalize(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":407 +/* "pykeyvi.pyx":408 * return py_result * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -11460,7 +11541,7 @@ static int __pyx_pw_7pykeyvi_12FsaTransform_5__init__(PyObject *__pyx_v_self, Py 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_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -11471,13 +11552,13 @@ static int __pyx_pw_7pykeyvi_12FsaTransform_5__init__(PyObject *__pyx_v_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.FsaTransform.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_12FsaTransform_4__init__(((struct __pyx_obj_7pykeyvi_FsaTransform *)__pyx_v_self), __pyx_v_in_0); /* function exit code */ @@ -11501,7 +11582,7 @@ static int __pyx_pf_7pykeyvi_12FsaTransform_4__init__(struct __pyx_obj_7pykeyvi_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":408 + /* "pykeyvi.pyx":409 * * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -11513,12 +11594,12 @@ static int __pyx_pf_7pykeyvi_12FsaTransform_4__init__(struct __pyx_obj_7pykeyvi_ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":409 + /* "pykeyvi.pyx":410 * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst # <<<<<<<<<<<<<< @@ -11528,7 +11609,7 @@ static int __pyx_pf_7pykeyvi_12FsaTransform_4__init__(struct __pyx_obj_7pykeyvi_ __pyx_t_2 = __pyx_v_in_0->inst; __pyx_v_input_in_0 = __pyx_t_2; - /* "pykeyvi.pyx":410 + /* "pykeyvi.pyx":411 * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst * self.inst = shared_ptr[_FsaTransform](new _FsaTransform(input_in_0)) # <<<<<<<<<<<<<< @@ -11539,11 +11620,11 @@ static int __pyx_pf_7pykeyvi_12FsaTransform_4__init__(struct __pyx_obj_7pykeyvi_ __pyx_t_3 = new keyvi::transform::FsaTransform(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":407 + /* "pykeyvi.pyx":408 * return py_result * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -11562,7 +11643,7 @@ static int __pyx_pf_7pykeyvi_12FsaTransform_4__init__(struct __pyx_obj_7pykeyvi_ return __pyx_r; } -/* "pykeyvi.pyx":416 +/* "pykeyvi.pyx":417 * cdef shared_ptr[_PrefixCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -11585,7 +11666,7 @@ static void __pyx_pf_7pykeyvi_16PrefixCompletion___dealloc__(struct __pyx_obj_7p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":417 + /* "pykeyvi.pyx":418 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -11594,7 +11675,7 @@ static void __pyx_pf_7pykeyvi_16PrefixCompletion___dealloc__(struct __pyx_obj_7p */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":416 + /* "pykeyvi.pyx":417 * cdef shared_ptr[_PrefixCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -11606,7 +11687,7 @@ static void __pyx_pf_7pykeyvi_16PrefixCompletion___dealloc__(struct __pyx_obj_7p __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":420 +/* "pykeyvi.pyx":421 * * * def GetFuzzyCompletions(self, bytes in_0 , max_edit_distance ): # <<<<<<<<<<<<<< @@ -11645,11 +11726,11 @@ static PyObject *__pyx_pw_7pykeyvi_16PrefixCompletion_3GetFuzzyCompletions(PyObj case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_edit_distance)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("GetFuzzyCompletions", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("GetFuzzyCompletions", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetFuzzyCompletions") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetFuzzyCompletions") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11662,13 +11743,13 @@ static PyObject *__pyx_pw_7pykeyvi_16PrefixCompletion_3GetFuzzyCompletions(PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("GetFuzzyCompletions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("GetFuzzyCompletions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.PrefixCompletion.GetFuzzyCompletions", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(((struct __pyx_obj_7pykeyvi_PrefixCompletion *)__pyx_v_self), __pyx_v_in_0, __pyx_v_max_edit_distance); /* function exit code */ @@ -11697,7 +11778,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetFuzzyCompletions", 0); - /* "pykeyvi.pyx":421 + /* "pykeyvi.pyx":422 * * def GetFuzzyCompletions(self, bytes in_0 , max_edit_distance ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -11709,12 +11790,12 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(struc __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":422 + /* "pykeyvi.pyx":423 * def GetFuzzyCompletions(self, bytes in_0 , max_edit_distance ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(max_edit_distance, (int, long)), 'arg max_edit_distance wrong type' # <<<<<<<<<<<<<< @@ -11736,45 +11817,45 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(struc __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_max_edit_distance_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":423 + /* "pykeyvi.pyx":424 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(max_edit_distance, (int, long)), 'arg max_edit_distance wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * cdef _MatchIteratorPair _r = self.inst.get().GetFuzzyCompletions(input_in_0, (max_edit_distance)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":425 + /* "pykeyvi.pyx":426 * cdef const_char * input_in_0 = in_0 * * cdef _MatchIteratorPair _r = self.inst.get().GetFuzzyCompletions(input_in_0, (max_edit_distance)) # <<<<<<<<<<<<<< * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_edit_distance); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_edit_distance); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->GetFuzzyCompletions(__pyx_v_input_in_0, ((int)__pyx_t_5)); - /* "pykeyvi.pyx":426 + /* "pykeyvi.pyx":427 * * cdef _MatchIteratorPair _r = self.inst.get().GetFuzzyCompletions(input_in_0, (max_edit_distance)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_6); __pyx_t_6 = 0; - /* "pykeyvi.pyx":427 + /* "pykeyvi.pyx":428 * cdef _MatchIteratorPair _r = self.inst.get().GetFuzzyCompletions(input_in_0, (max_edit_distance)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -11783,7 +11864,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(struc */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":428 + /* "pykeyvi.pyx":429 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -11792,7 +11873,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(struc */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":429 + /* "pykeyvi.pyx":430 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -11804,7 +11885,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(struc __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":420 + /* "pykeyvi.pyx":421 * * * def GetFuzzyCompletions(self, bytes in_0 , max_edit_distance ): # <<<<<<<<<<<<<< @@ -11824,7 +11905,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_2GetFuzzyCompletions(struc return __pyx_r; } -/* "pykeyvi.pyx":431 +/* "pykeyvi.pyx":432 * return py_result * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -11860,7 +11941,7 @@ static int __pyx_pw_7pykeyvi_16PrefixCompletion_5__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_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -11871,13 +11952,13 @@ static int __pyx_pw_7pykeyvi_16PrefixCompletion_5__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_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.PrefixCompletion.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_16PrefixCompletion_4__init__(((struct __pyx_obj_7pykeyvi_PrefixCompletion *)__pyx_v_self), __pyx_v_in_0); /* function exit code */ @@ -11901,7 +11982,7 @@ static int __pyx_pf_7pykeyvi_16PrefixCompletion_4__init__(struct __pyx_obj_7pyke int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":432 + /* "pykeyvi.pyx":433 * * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -11913,12 +11994,12 @@ static int __pyx_pf_7pykeyvi_16PrefixCompletion_4__init__(struct __pyx_obj_7pyke __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":433 + /* "pykeyvi.pyx":434 * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst # <<<<<<<<<<<<<< @@ -11928,7 +12009,7 @@ static int __pyx_pf_7pykeyvi_16PrefixCompletion_4__init__(struct __pyx_obj_7pyke __pyx_t_2 = __pyx_v_in_0->inst; __pyx_v_input_in_0 = __pyx_t_2; - /* "pykeyvi.pyx":434 + /* "pykeyvi.pyx":435 * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst * self.inst = shared_ptr[_PrefixCompletion](new _PrefixCompletion(input_in_0)) # <<<<<<<<<<<<<< @@ -11939,11 +12020,11 @@ static int __pyx_pf_7pykeyvi_16PrefixCompletion_4__init__(struct __pyx_obj_7pyke __pyx_t_3 = new keyvi::dictionary::completion::PrefixCompletion(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":431 + /* "pykeyvi.pyx":432 * return py_result * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -11962,7 +12043,7 @@ static int __pyx_pf_7pykeyvi_16PrefixCompletion_4__init__(struct __pyx_obj_7pyke return __pyx_r; } -/* "pykeyvi.pyx":436 +/* "pykeyvi.pyx":437 * self.inst = shared_ptr[_PrefixCompletion](new _PrefixCompletion(input_in_0)) * * def GetCompletions(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -11979,7 +12060,7 @@ static PyObject *__pyx_pw_7pykeyvi_16PrefixCompletion_7GetCompletions(PyObject * PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("GetCompletions (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(((struct __pyx_obj_7pykeyvi_PrefixCompletion *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -12005,7 +12086,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetCompletions", 0); - /* "pykeyvi.pyx":437 + /* "pykeyvi.pyx":438 * * def GetCompletions(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -12017,22 +12098,22 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(struct __p __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":438 + /* "pykeyvi.pyx":439 * def GetCompletions(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":439 + /* "pykeyvi.pyx":440 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) # <<<<<<<<<<<<<< @@ -12041,20 +12122,20 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(struct __p */ __pyx_v__r = __pyx_v_self->inst.get()->GetCompletions(__pyx_v_input_in_0); - /* "pykeyvi.pyx":440 + /* "pykeyvi.pyx":441 * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":441 + /* "pykeyvi.pyx":442 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -12063,7 +12144,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(struct __p */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":442 + /* "pykeyvi.pyx":443 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -12072,7 +12153,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(struct __p */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":443 + /* "pykeyvi.pyx":444 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -12084,7 +12165,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(struct __p __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":436 + /* "pykeyvi.pyx":437 * self.inst = shared_ptr[_PrefixCompletion](new _PrefixCompletion(input_in_0)) * * def GetCompletions(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -12104,7 +12185,7 @@ static PyObject *__pyx_pf_7pykeyvi_16PrefixCompletion_6GetCompletions(struct __p return __pyx_r; } -/* "pykeyvi.pyx":449 +/* "pykeyvi.pyx":450 * cdef shared_ptr[_ForwardBackwardCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -12127,7 +12208,7 @@ static void __pyx_pf_7pykeyvi_25ForwardBackwardCompletion___dealloc__(struct __p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":450 + /* "pykeyvi.pyx":451 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -12136,7 +12217,7 @@ static void __pyx_pf_7pykeyvi_25ForwardBackwardCompletion___dealloc__(struct __p */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":449 + /* "pykeyvi.pyx":450 * cdef shared_ptr[_ForwardBackwardCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -12148,7 +12229,7 @@ static void __pyx_pf_7pykeyvi_25ForwardBackwardCompletion___dealloc__(struct __p __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":453 +/* "pykeyvi.pyx":454 * * * def _GetCompletions_0(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -12165,7 +12246,7 @@ static PyObject *__pyx_pw_7pykeyvi_25ForwardBackwardCompletion_3_GetCompletions_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_GetCompletions_0 (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_0(((struct __pyx_obj_7pykeyvi_ForwardBackwardCompletion *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -12191,7 +12272,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetCompletions_0", 0); - /* "pykeyvi.pyx":454 + /* "pykeyvi.pyx":455 * * def _GetCompletions_0(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -12203,22 +12284,22 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":455 + /* "pykeyvi.pyx":456 * def _GetCompletions_0(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":456 + /* "pykeyvi.pyx":457 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) # <<<<<<<<<<<<<< @@ -12227,20 +12308,20 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_ */ __pyx_v__r = __pyx_v_self->inst.get()->GetCompletions(__pyx_v_input_in_0); - /* "pykeyvi.pyx":457 + /* "pykeyvi.pyx":458 * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":458 + /* "pykeyvi.pyx":459 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -12249,7 +12330,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_ */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":459 + /* "pykeyvi.pyx":460 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -12258,7 +12339,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_ */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":460 + /* "pykeyvi.pyx":461 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -12270,7 +12351,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_ __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":453 + /* "pykeyvi.pyx":454 * * * def _GetCompletions_0(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -12290,7 +12371,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_2_GetCompletions_ return __pyx_r; } -/* "pykeyvi.pyx":462 +/* "pykeyvi.pyx":463 * return py_result * * def _GetCompletions_1(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -12329,11 +12410,11 @@ static PyObject *__pyx_pw_7pykeyvi_25ForwardBackwardCompletion_5_GetCompletions_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetCompletions_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetCompletions_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -12346,13 +12427,13 @@ static PyObject *__pyx_pw_7pykeyvi_25ForwardBackwardCompletion_5_GetCompletions_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.ForwardBackwardCompletion._GetCompletions_1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_1(((struct __pyx_obj_7pykeyvi_ForwardBackwardCompletion *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -12381,7 +12462,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetCompletions_1", 0); - /* "pykeyvi.pyx":463 + /* "pykeyvi.pyx":464 * * def _GetCompletions_1(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -12393,12 +12474,12 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":464 + /* "pykeyvi.pyx":465 * def _GetCompletions_1(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -12420,45 +12501,45 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":465 + /* "pykeyvi.pyx":466 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":467 + /* "pykeyvi.pyx":468 * cdef const_char * input_in_0 = in_0 * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) # <<<<<<<<<<<<<< * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->GetCompletions(__pyx_v_input_in_0, ((int)__pyx_t_5)); - /* "pykeyvi.pyx":468 + /* "pykeyvi.pyx":469 * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_6); __pyx_t_6 = 0; - /* "pykeyvi.pyx":469 + /* "pykeyvi.pyx":470 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -12467,7 +12548,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_ */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":470 + /* "pykeyvi.pyx":471 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -12476,7 +12557,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_ */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":471 + /* "pykeyvi.pyx":472 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -12488,7 +12569,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_ __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":462 + /* "pykeyvi.pyx":463 * return py_result * * def _GetCompletions_1(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -12508,7 +12589,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_4_GetCompletions_ return __pyx_r; } -/* "pykeyvi.pyx":473 +/* "pykeyvi.pyx":474 * return py_result * * def GetCompletions(self, *args): # <<<<<<<<<<<<<< @@ -12549,14 +12630,14 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetCompletions", 0); - /* "pykeyvi.pyx":474 + /* "pykeyvi.pyx":475 * * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_2 == 1) != 0); if (__pyx_t_3) { } else { @@ -12572,7 +12653,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":475 + /* "pykeyvi.pyx":476 * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) # <<<<<<<<<<<<<< @@ -12580,16 +12661,16 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s * return self._GetCompletions_1(*args) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":474 + /* "pykeyvi.pyx":475 * * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< @@ -12598,14 +12679,14 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s */ } - /* "pykeyvi.pyx":476 + /* "pykeyvi.pyx":477 * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< * return self._GetCompletions_1(*args) * else: */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_2 == 2) != 0); if (__pyx_t_5) { } else { @@ -12644,7 +12725,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":477 + /* "pykeyvi.pyx":478 * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): * return self._GetCompletions_1(*args) # <<<<<<<<<<<<<< @@ -12652,16 +12733,16 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s * raise Exception('can not handle type of %s' % (args,)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":476 + /* "pykeyvi.pyx":477 * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< @@ -12670,7 +12751,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s */ } - /* "pykeyvi.pyx":479 + /* "pykeyvi.pyx":480 * return self._GetCompletions_1(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -12678,28 +12759,28 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s * def __init__(self, Dictionary in_0 , Dictionary in_1 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_args); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":473 + /* "pykeyvi.pyx":474 * return py_result * * def GetCompletions(self, *args): # <<<<<<<<<<<<<< @@ -12719,7 +12800,7 @@ static PyObject *__pyx_pf_7pykeyvi_25ForwardBackwardCompletion_6GetCompletions(s return __pyx_r; } -/* "pykeyvi.pyx":481 +/* "pykeyvi.pyx":482 * raise Exception('can not handle type of %s' % (args,)) * * def __init__(self, Dictionary in_0 , Dictionary in_1 ): # <<<<<<<<<<<<<< @@ -12758,11 +12839,11 @@ static int __pyx_pw_7pykeyvi_25ForwardBackwardCompletion_9__init__(PyObject *__p case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -12775,14 +12856,14 @@ static int __pyx_pw_7pykeyvi_25ForwardBackwardCompletion_9__init__(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.ForwardBackwardCompletion.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_1", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_1), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_1", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(((struct __pyx_obj_7pykeyvi_ForwardBackwardCompletion *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -12807,7 +12888,7 @@ static int __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":482 + /* "pykeyvi.pyx":483 * * def __init__(self, Dictionary in_0 , Dictionary in_1 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -12819,12 +12900,12 @@ static int __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(struct __pyx_ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":483 + /* "pykeyvi.pyx":484 * def __init__(self, Dictionary in_0 , Dictionary in_1 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * assert isinstance(in_1, Dictionary), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -12836,12 +12917,12 @@ static int __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(struct __pyx_ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_1), __pyx_ptype_7pykeyvi_Dictionary); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":484 + /* "pykeyvi.pyx":485 * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * assert isinstance(in_1, Dictionary), 'arg in_1 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst # <<<<<<<<<<<<<< @@ -12851,7 +12932,7 @@ static int __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(struct __pyx_ __pyx_t_2 = __pyx_v_in_0->inst; __pyx_v_input_in_0 = __pyx_t_2; - /* "pykeyvi.pyx":485 + /* "pykeyvi.pyx":486 * assert isinstance(in_1, Dictionary), 'arg in_1 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst * cdef shared_ptr[_Dictionary] input_in_1 = in_1.inst # <<<<<<<<<<<<<< @@ -12861,22 +12942,22 @@ static int __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(struct __pyx_ __pyx_t_2 = __pyx_v_in_1->inst; __pyx_v_input_in_1 = __pyx_t_2; - /* "pykeyvi.pyx":486 + /* "pykeyvi.pyx":487 * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst * cdef shared_ptr[_Dictionary] input_in_1 = in_1.inst * self.inst = shared_ptr[_ForwardBackwardCompletion](new _ForwardBackwardCompletion(input_in_0, input_in_1)) # <<<<<<<<<<<<<< * - * cdef class CompletionDictionaryCompiler: + * cdef class loading_strategy_types: */ try { __pyx_t_3 = new keyvi::dictionary::completion::ForwardBackwardCompletion(__pyx_v_input_in_0, __pyx_v_input_in_1); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":481 + /* "pykeyvi.pyx":482 * raise Exception('can not handle type of %s' % (args,)) * * def __init__(self, Dictionary in_0 , Dictionary in_1 ): # <<<<<<<<<<<<<< @@ -12895,7 +12976,7 @@ static int __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(struct __pyx_ return __pyx_r; } -/* "pykeyvi.pyx":492 +/* "pykeyvi.pyx":502 * cdef shared_ptr[_CompletionDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -12918,7 +12999,7 @@ static void __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler___dealloc__(struct __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":493 + /* "pykeyvi.pyx":503 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -12927,7 +13008,7 @@ static void __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler___dealloc__(struct */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":492 + /* "pykeyvi.pyx":502 * cdef shared_ptr[_CompletionDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -12939,7 +13020,7 @@ static void __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler___dealloc__(struct __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":496 +/* "pykeyvi.pyx":506 * * * def __setitem__(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -12956,7 +13037,7 @@ static int __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_3__setitem__(PyObjec int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0), ((PyObject *)__pyx_v_in_1)); /* function exit code */ @@ -12982,7 +13063,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "pykeyvi.pyx":497 + /* "pykeyvi.pyx":507 * * def __setitem__(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -12994,12 +13075,12 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":498 + /* "pykeyvi.pyx":508 * def __setitem__(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -13021,37 +13102,37 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":499 + /* "pykeyvi.pyx":509 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * self.inst.get().__setitem__(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":501 + /* "pykeyvi.pyx":511 * cdef const_char * input_in_0 = in_0 * * self.inst.get().__setitem__(input_in_0, (in_1)) # <<<<<<<<<<<<<< * * def Add(self, bytes in_0 , in_1 ): */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->__setitem__(__pyx_v_input_in_0, ((int)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":496 + /* "pykeyvi.pyx":506 * * * def __setitem__(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -13070,7 +13151,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct return __pyx_r; } -/* "pykeyvi.pyx":503 +/* "pykeyvi.pyx":513 * self.inst.get().__setitem__(input_in_0, (in_1)) * * def Add(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -13109,11 +13190,11 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_5Add(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -13126,13 +13207,13 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_5Add(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.CompletionDictionaryCompiler.Add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -13158,7 +13239,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":504 + /* "pykeyvi.pyx":514 * * def Add(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -13170,12 +13251,12 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":505 + /* "pykeyvi.pyx":515 * def Add(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -13197,37 +13278,37 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":506 + /* "pykeyvi.pyx":516 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * self.inst.get().Add(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":508 + /* "pykeyvi.pyx":518 * cdef const_char * input_in_0 = in_0 * * self.inst.get().Add(input_in_0, (in_1)) # <<<<<<<<<<<<<< * * def _init_0(self): */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0, ((int)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":503 + /* "pykeyvi.pyx":513 * self.inst.get().__setitem__(input_in_0, (in_1)) * * def Add(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -13247,7 +13328,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ return __pyx_r; } -/* "pykeyvi.pyx":510 +/* "pykeyvi.pyx":520 * self.inst.get().Add(input_in_0, (in_1)) * * def _init_0(self): # <<<<<<<<<<<<<< @@ -13277,7 +13358,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_6_init_0(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":511 + /* "pykeyvi.pyx":521 * * def _init_0(self): * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler()) # <<<<<<<<<<<<<< @@ -13288,11 +13369,11 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_6_init_0(struc __pyx_t_1 = new keyvi::dictionary::CompletionDictionaryCompiler(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":510 + /* "pykeyvi.pyx":520 * self.inst.get().Add(input_in_0, (in_1)) * * def _init_0(self): # <<<<<<<<<<<<<< @@ -13312,7 +13393,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_6_init_0(struc return __pyx_r; } -/* "pykeyvi.pyx":513 +/* "pykeyvi.pyx":523 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -13346,7 +13427,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8_init_1(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":514 + /* "pykeyvi.pyx":524 * * def _init_1(self, memory_limit ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -13368,28 +13449,28 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8_init_1(struc __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":516 + /* "pykeyvi.pyx":526 * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) # <<<<<<<<<<<<<< * * def _init_2(self, memory_limit , dict value_store_params ): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_5 = new keyvi::dictionary::CompletionDictionaryCompiler(((size_t)__pyx_t_4)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_5); - /* "pykeyvi.pyx":513 + /* "pykeyvi.pyx":523 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -13409,7 +13490,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8_init_1(struc return __pyx_r; } -/* "pykeyvi.pyx":518 +/* "pykeyvi.pyx":528 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -13448,11 +13529,11 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_11_init_2(PyOb case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_store_params)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -13465,13 +13546,13 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_11_init_2(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.CompletionDictionaryCompiler._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), __pyx_v_memory_limit, __pyx_v_value_store_params); /* function exit code */ @@ -13484,7 +13565,7 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_11_init_2(PyOb } static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":520 +/* "pykeyvi.pyx":530 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -13510,7 +13591,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_genex __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13548,21 +13629,21 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2gene return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -13570,17 +13651,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2gene if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -13590,7 +13671,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2gene PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -13652,7 +13733,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_3gene __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13690,21 +13771,21 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -13712,17 +13793,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -13732,7 +13813,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -13775,7 +13856,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene return __pyx_r; } -/* "pykeyvi.pyx":518 +/* "pykeyvi.pyx":528 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -13820,7 +13901,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_store_params); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_store_params); - /* "pykeyvi.pyx":519 + /* "pykeyvi.pyx":529 * * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -13842,12 +13923,12 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":520 + /* "pykeyvi.pyx":530 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -13866,35 +13947,35 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_value_store_params_wrong_typ); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":522 + /* "pykeyvi.pyx":532 * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() # <<<<<<<<<<<<<< @@ -13905,11 +13986,11 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __pyx_t_6 = new std::map (); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v1 = __pyx_t_6; - /* "pykeyvi.pyx":523 + /* "pykeyvi.pyx":533 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -13918,17 +13999,17 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru */ if (unlikely(__pyx_cur_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -13936,17 +14017,17 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -13956,7 +14037,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -13972,7 +14053,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -13985,15 +14066,15 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -14001,7 +14082,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -14009,7 +14090,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9); @@ -14017,18 +14098,18 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "pykeyvi.pyx":524 + /* "pykeyvi.pyx":534 * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): * deref(v1)[ key ] = value # <<<<<<<<<<<<<< * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit), deref(v1))) * del v1 */ - __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((*__pyx_v_v1)[((std::string)__pyx_t_14)]) = ((std::string)__pyx_t_13); - /* "pykeyvi.pyx":523 + /* "pykeyvi.pyx":533 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -14038,23 +14119,23 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pykeyvi.pyx":525 + /* "pykeyvi.pyx":535 * for key, value in value_store_params.items(): * deref(v1)[ key ] = value * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit), deref(v1))) # <<<<<<<<<<<<<< * del v1 * */ - __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_16 = new keyvi::dictionary::CompletionDictionaryCompiler(((size_t)__pyx_t_15), (*__pyx_v_v1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_16); - /* "pykeyvi.pyx":526 + /* "pykeyvi.pyx":536 * deref(v1)[ key ] = value * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit), deref(v1))) * del v1 # <<<<<<<<<<<<<< @@ -14063,7 +14144,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru */ delete __pyx_v_v1; - /* "pykeyvi.pyx":518 + /* "pykeyvi.pyx":528 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -14091,7 +14172,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru return __pyx_r; } -/* "pykeyvi.pyx":528 +/* "pykeyvi.pyx":538 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -14118,7 +14199,7 @@ static int __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_13__init__(PyObject } static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":533 +/* "pykeyvi.pyx":543 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -14144,7 +14225,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___gene __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -14183,13 +14264,13 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -14202,10 +14283,10 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -14213,9 +14294,9 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14223,17 +14304,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14243,7 +14324,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -14306,7 +14387,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___3gen __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5generator14, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5generator14, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -14345,13 +14426,13 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -14364,10 +14445,10 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -14375,9 +14456,9 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14385,17 +14466,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14405,7 +14486,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -14449,7 +14530,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen return __pyx_r; } -/* "pykeyvi.pyx":528 +/* "pykeyvi.pyx":538 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -14482,7 +14563,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); - /* "pykeyvi.pyx":529 + /* "pykeyvi.pyx":539 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -14493,21 +14574,21 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":530 + /* "pykeyvi.pyx":540 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":529 + /* "pykeyvi.pyx":539 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -14517,7 +14598,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ goto __pyx_L3; } - /* "pykeyvi.pyx":531 + /* "pykeyvi.pyx":541 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -14528,9 +14609,9 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { @@ -14560,21 +14641,21 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":532 + /* "pykeyvi.pyx":542 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) # <<<<<<<<<<<<<< * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":531 + /* "pykeyvi.pyx":541 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -14584,7 +14665,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ goto __pyx_L3; } - /* "pykeyvi.pyx":533 + /* "pykeyvi.pyx":543 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -14595,9 +14676,9 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((__pyx_t_5 == 2) != 0); if (__pyx_t_6) { @@ -14638,44 +14719,44 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":534 + /* "pykeyvi.pyx":544 * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":533 + /* "pykeyvi.pyx":543 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -14685,7 +14766,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ goto __pyx_L3; } - /* "pykeyvi.pyx":536 + /* "pykeyvi.pyx":546 * self._init_2(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -14693,29 +14774,29 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ * def WriteToFile(self, bytes in_0 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_args); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":528 + /* "pykeyvi.pyx":538 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -14737,7 +14818,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ return __pyx_r; } -/* "pykeyvi.pyx":538 +/* "pykeyvi.pyx":548 * raise Exception('can not handle type of %s' % (args,)) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -14754,7 +14835,7 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_15WriteToFile( PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -14777,7 +14858,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":539 + /* "pykeyvi.pyx":549 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -14789,22 +14870,22 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":540 + /* "pykeyvi.pyx":550 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":541 + /* "pykeyvi.pyx":551 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -14813,7 +14894,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":538 + /* "pykeyvi.pyx":548 * raise Exception('can not handle type of %s' % (args,)) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -14833,7 +14914,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( return __pyx_r; } -/* "pykeyvi.pyx":543 +/* "pykeyvi.pyx":553 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -14859,7 +14940,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_16__enter__(st __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "pykeyvi.pyx":544 + /* "pykeyvi.pyx":554 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -14871,7 +14952,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_16__enter__(st __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":543 + /* "pykeyvi.pyx":553 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -14886,7 +14967,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_16__enter__(st return __pyx_r; } -/* "pykeyvi.pyx":547 +/* "pykeyvi.pyx":557 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -14927,16 +15008,16 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_19__exit__(PyO case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -14951,7 +15032,7 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_19__exit__(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.CompletionDictionaryCompiler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14975,14 +15056,14 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_18__exit__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "pykeyvi.pyx":548 + /* "pykeyvi.pyx":558 * * def __exit__(self, type, value, traceback): * self.Compile() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -14995,16 +15076,16 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_18__exit__(str } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":547 + /* "pykeyvi.pyx":557 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -15027,7 +15108,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_18__exit__(str return __pyx_r; } -/* "pykeyvi.pyx":551 +/* "pykeyvi.pyx":561 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -15061,7 +15142,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru int __pyx_t_2; __Pyx_RefNannySetupContext("Compile", 0); - /* "pykeyvi.pyx":552 + /* "pykeyvi.pyx":562 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -15072,7 +15153,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":553 + /* "pykeyvi.pyx":563 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -15086,7 +15167,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru #endif /*try:*/ { - /* "pykeyvi.pyx":554 + /* "pykeyvi.pyx":564 * if not args: * with nogil: * self.inst.get().Compile() # <<<<<<<<<<<<<< @@ -15096,7 +15177,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_v_self->inst.get()->Compile(); } - /* "pykeyvi.pyx":553 + /* "pykeyvi.pyx":563 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -15114,7 +15195,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru } } - /* "pykeyvi.pyx":555 + /* "pykeyvi.pyx":565 * with nogil: * self.inst.get().Compile() * return # <<<<<<<<<<<<<< @@ -15125,7 +15206,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pykeyvi.pyx":552 + /* "pykeyvi.pyx":562 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -15134,7 +15215,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru */ } - /* "pykeyvi.pyx":557 + /* "pykeyvi.pyx":567 * return * * cdef void* callback = args[0] # <<<<<<<<<<<<<< @@ -15143,7 +15224,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru */ __pyx_v_callback = ((void *)PyTuple_GET_ITEM(__pyx_v_args, 0)); - /* "pykeyvi.pyx":558 + /* "pykeyvi.pyx":568 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -15157,7 +15238,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru #endif /*try:*/ { - /* "pykeyvi.pyx":559 + /* "pykeyvi.pyx":569 * cdef void* callback = args[0] * with nogil: * self.inst.get().Compile(callback_wrapper, callback) # <<<<<<<<<<<<<< @@ -15167,7 +15248,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_v_self->inst.get()->Compile(__pyx_f_7pykeyvi_callback_wrapper, __pyx_v_callback); } - /* "pykeyvi.pyx":558 + /* "pykeyvi.pyx":568 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -15185,7 +15266,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru } } - /* "pykeyvi.pyx":551 + /* "pykeyvi.pyx":561 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -15201,7 +15282,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru return __pyx_r; } -/* "pykeyvi.pyx":562 +/* "pykeyvi.pyx":572 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -15236,16 +15317,16 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetManifest", 0); - /* "pykeyvi.pyx":563 + /* "pykeyvi.pyx":573 * * def SetManifest(self, manifest): * m = json.dumps(manifest) # <<<<<<<<<<<<<< * self.inst.get().SetManifestFromString(m) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -15259,16 +15340,16 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_manifest); __Pyx_GIVEREF(__pyx_v_manifest); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_manifest); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -15276,17 +15357,17 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( __pyx_v_m = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":564 + /* "pykeyvi.pyx":574 * def SetManifest(self, manifest): * m = json.dumps(manifest) * self.inst.get().SetManifestFromString(m) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetManifestFromString(__pyx_t_5); - /* "pykeyvi.pyx":562 + /* "pykeyvi.pyx":572 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -15311,7 +15392,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( return __pyx_r; } -/* "pykeyvi.pyx":568 +/* "pykeyvi.pyx":578 * * # definition for all compilers * cdef void callback_wrapper(size_t a, size_t b, void* py_callback) with gil: # <<<<<<<<<<<<<< @@ -15336,16 +15417,16 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b #endif __Pyx_RefNannySetupContext("callback_wrapper", 0); - /* "pykeyvi.pyx":569 + /* "pykeyvi.pyx":579 * # definition for all compilers * cdef void callback_wrapper(size_t a, size_t b, void* py_callback) with gil: * (py_callback)(a, b) # <<<<<<<<<<<<<< * * cdef class MultiWordCompletion: */ - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_b); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_b); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_py_callback)); __pyx_t_4 = ((PyObject *)__pyx_v_py_callback); __pyx_t_5 = NULL; @@ -15360,7 +15441,7 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b __pyx_t_6 = 1; } } - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __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; @@ -15371,13 +15452,13 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":568 + /* "pykeyvi.pyx":578 * * # definition for all compilers * cdef void callback_wrapper(size_t a, size_t b, void* py_callback) with gil: # <<<<<<<<<<<<<< @@ -15402,7 +15483,7 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b #endif } -/* "pykeyvi.pyx":575 +/* "pykeyvi.pyx":585 * cdef shared_ptr[_MultiWordCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -15425,7 +15506,7 @@ static void __pyx_pf_7pykeyvi_19MultiWordCompletion___dealloc__(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":576 + /* "pykeyvi.pyx":586 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -15434,7 +15515,7 @@ static void __pyx_pf_7pykeyvi_19MultiWordCompletion___dealloc__(struct __pyx_obj */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":575 + /* "pykeyvi.pyx":585 * cdef shared_ptr[_MultiWordCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -15446,7 +15527,7 @@ static void __pyx_pf_7pykeyvi_19MultiWordCompletion___dealloc__(struct __pyx_obj __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":579 +/* "pykeyvi.pyx":589 * * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -15482,7 +15563,7 @@ static int __pyx_pw_7pykeyvi_19MultiWordCompletion_3__init__(PyObject *__pyx_v_s 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_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -15493,13 +15574,13 @@ static int __pyx_pw_7pykeyvi_19MultiWordCompletion_3__init__(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.MultiWordCompletion.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(((struct __pyx_obj_7pykeyvi_MultiWordCompletion *)__pyx_v_self), __pyx_v_in_0); /* function exit code */ @@ -15523,7 +15604,7 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":580 + /* "pykeyvi.pyx":590 * * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -15535,12 +15616,12 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":581 + /* "pykeyvi.pyx":591 * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst # <<<<<<<<<<<<<< @@ -15550,7 +15631,7 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p __pyx_t_2 = __pyx_v_in_0->inst; __pyx_v_input_in_0 = __pyx_t_2; - /* "pykeyvi.pyx":582 + /* "pykeyvi.pyx":592 * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst * self.inst = shared_ptr[_MultiWordCompletion](new _MultiWordCompletion(input_in_0)) # <<<<<<<<<<<<<< @@ -15561,11 +15642,11 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p __pyx_t_3 = new keyvi::dictionary::completion::MultiWordCompletion(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":579 + /* "pykeyvi.pyx":589 * * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -15584,7 +15665,7 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":584 +/* "pykeyvi.pyx":594 * self.inst = shared_ptr[_MultiWordCompletion](new _MultiWordCompletion(input_in_0)) * * def _GetCompletions_0(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -15601,7 +15682,7 @@ static PyObject *__pyx_pw_7pykeyvi_19MultiWordCompletion_5_GetCompletions_0(PyOb PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_GetCompletions_0 (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(((struct __pyx_obj_7pykeyvi_MultiWordCompletion *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -15627,7 +15708,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetCompletions_0", 0); - /* "pykeyvi.pyx":585 + /* "pykeyvi.pyx":595 * * def _GetCompletions_0(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -15639,22 +15720,22 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":586 + /* "pykeyvi.pyx":596 * def _GetCompletions_0(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":587 + /* "pykeyvi.pyx":597 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) # <<<<<<<<<<<<<< @@ -15663,20 +15744,20 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru */ __pyx_v__r = __pyx_v_self->inst.get()->GetCompletions(__pyx_v_input_in_0); - /* "pykeyvi.pyx":588 + /* "pykeyvi.pyx":598 * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":589 + /* "pykeyvi.pyx":599 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -15685,7 +15766,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":590 + /* "pykeyvi.pyx":600 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -15694,7 +15775,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":591 + /* "pykeyvi.pyx":601 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -15706,7 +15787,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":584 + /* "pykeyvi.pyx":594 * self.inst = shared_ptr[_MultiWordCompletion](new _MultiWordCompletion(input_in_0)) * * def _GetCompletions_0(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -15726,7 +15807,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru return __pyx_r; } -/* "pykeyvi.pyx":593 +/* "pykeyvi.pyx":603 * return py_result * * def _GetCompletions_1(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -15765,11 +15846,11 @@ static PyObject *__pyx_pw_7pykeyvi_19MultiWordCompletion_7_GetCompletions_1(PyOb case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetCompletions_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetCompletions_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -15782,13 +15863,13 @@ static PyObject *__pyx_pw_7pykeyvi_19MultiWordCompletion_7_GetCompletions_1(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.MultiWordCompletion._GetCompletions_1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(((struct __pyx_obj_7pykeyvi_MultiWordCompletion *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -15817,7 +15898,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetCompletions_1", 0); - /* "pykeyvi.pyx":594 + /* "pykeyvi.pyx":604 * * def _GetCompletions_1(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -15829,12 +15910,12 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":595 + /* "pykeyvi.pyx":605 * def _GetCompletions_1(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -15856,45 +15937,45 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":596 + /* "pykeyvi.pyx":606 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":598 + /* "pykeyvi.pyx":608 * cdef const_char * input_in_0 = in_0 * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) # <<<<<<<<<<<<<< * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->GetCompletions(__pyx_v_input_in_0, ((int)__pyx_t_5)); - /* "pykeyvi.pyx":599 + /* "pykeyvi.pyx":609 * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_6); __pyx_t_6 = 0; - /* "pykeyvi.pyx":600 + /* "pykeyvi.pyx":610 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -15903,7 +15984,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":601 + /* "pykeyvi.pyx":611 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -15912,7 +15993,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":602 + /* "pykeyvi.pyx":612 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -15924,7 +16005,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":593 + /* "pykeyvi.pyx":603 * return py_result * * def _GetCompletions_1(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -15944,7 +16025,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru return __pyx_r; } -/* "pykeyvi.pyx":604 +/* "pykeyvi.pyx":614 * return py_result * * def GetCompletions(self, *args): # <<<<<<<<<<<<<< @@ -15985,14 +16066,14 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetCompletions", 0); - /* "pykeyvi.pyx":605 + /* "pykeyvi.pyx":615 * * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_2 == 1) != 0); if (__pyx_t_3) { } else { @@ -16008,7 +16089,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":606 + /* "pykeyvi.pyx":616 * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) # <<<<<<<<<<<<<< @@ -16016,16 +16097,16 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct * return self._GetCompletions_1(*args) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":605 + /* "pykeyvi.pyx":615 * * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< @@ -16034,14 +16115,14 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct */ } - /* "pykeyvi.pyx":607 + /* "pykeyvi.pyx":617 * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< * return self._GetCompletions_1(*args) * else: */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_2 == 2) != 0); if (__pyx_t_5) { } else { @@ -16080,7 +16161,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":608 + /* "pykeyvi.pyx":618 * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): * return self._GetCompletions_1(*args) # <<<<<<<<<<<<<< @@ -16088,16 +16169,16 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct * raise Exception('can not handle type of %s' % (args,)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":607 + /* "pykeyvi.pyx":617 * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< @@ -16106,7 +16187,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct */ } - /* "pykeyvi.pyx":610 + /* "pykeyvi.pyx":620 * return self._GetCompletions_1(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -16114,28 +16195,28 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct * cdef class PredictiveCompression: */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_args); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":604 + /* "pykeyvi.pyx":614 * return py_result * * def GetCompletions(self, *args): # <<<<<<<<<<<<<< @@ -16155,7 +16236,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct return __pyx_r; } -/* "pykeyvi.pyx":616 +/* "pykeyvi.pyx":626 * cdef shared_ptr[_PredictiveCompression] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16178,7 +16259,7 @@ static void __pyx_pf_7pykeyvi_21PredictiveCompression___dealloc__(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":617 + /* "pykeyvi.pyx":627 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -16187,7 +16268,7 @@ static void __pyx_pf_7pykeyvi_21PredictiveCompression___dealloc__(struct __pyx_o */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":616 + /* "pykeyvi.pyx":626 * cdef shared_ptr[_PredictiveCompression] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16199,7 +16280,7 @@ static void __pyx_pf_7pykeyvi_21PredictiveCompression___dealloc__(struct __pyx_o __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":620 +/* "pykeyvi.pyx":630 * * * def Compress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16216,7 +16297,7 @@ static PyObject *__pyx_pw_7pykeyvi_21PredictiveCompression_3Compress(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Compress (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(((struct __pyx_obj_7pykeyvi_PredictiveCompression *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16241,7 +16322,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Compress", 0); - /* "pykeyvi.pyx":621 + /* "pykeyvi.pyx":631 * * def Compress(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16253,22 +16334,22 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":623 + /* "pykeyvi.pyx":633 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * cdef libcpp_string _r = self.inst.get().Compress((in_0)) # <<<<<<<<<<<<<< * py_result = _r * return py_result */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->Compress(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":624 + /* "pykeyvi.pyx":634 * * cdef libcpp_string _r = self.inst.get().Compress((in_0)) * py_result = _r # <<<<<<<<<<<<<< @@ -16277,7 +16358,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":625 + /* "pykeyvi.pyx":635 * cdef libcpp_string _r = self.inst.get().Compress((in_0)) * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -16285,13 +16366,13 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py * def __init__(self, bytes in_0 ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":620 + /* "pykeyvi.pyx":630 * * * def Compress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16310,7 +16391,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py return __pyx_r; } -/* "pykeyvi.pyx":627 +/* "pykeyvi.pyx":637 * return py_result * * def __init__(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16346,7 +16427,7 @@ static int __pyx_pw_7pykeyvi_21PredictiveCompression_5__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_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -16357,13 +16438,13 @@ static int __pyx_pw_7pykeyvi_21PredictiveCompression_5__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_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.PredictiveCompression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(((struct __pyx_obj_7pykeyvi_PredictiveCompression *)__pyx_v_self), __pyx_v_in_0); /* function exit code */ @@ -16386,7 +16467,7 @@ static int __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":628 + /* "pykeyvi.pyx":638 * * def __init__(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16398,28 +16479,28 @@ static int __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(struct __pyx_obj_ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":630 + /* "pykeyvi.pyx":640 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * self.inst = shared_ptr[_PredictiveCompression](new _PredictiveCompression((in_0))) # <<<<<<<<<<<<<< * * def Uncompress(self, bytes in_0 ): */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_3 = new keyvi::compression::PredictiveCompression(((std::string)__pyx_t_2)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":627 + /* "pykeyvi.pyx":637 * return py_result * * def __init__(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16438,7 +16519,7 @@ static int __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(struct __pyx_obj_ return __pyx_r; } -/* "pykeyvi.pyx":632 +/* "pykeyvi.pyx":642 * self.inst = shared_ptr[_PredictiveCompression](new _PredictiveCompression((in_0))) * * def Uncompress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16455,7 +16536,7 @@ static PyObject *__pyx_pw_7pykeyvi_21PredictiveCompression_7Uncompress(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Uncompress (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(((struct __pyx_obj_7pykeyvi_PredictiveCompression *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16480,7 +16561,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Uncompress", 0); - /* "pykeyvi.pyx":633 + /* "pykeyvi.pyx":643 * * def Uncompress(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16492,22 +16573,22 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":635 + /* "pykeyvi.pyx":645 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * cdef libcpp_string _r = self.inst.get().Uncompress((in_0)) # <<<<<<<<<<<<<< * py_result = _r * return py_result */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->Uncompress(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":636 + /* "pykeyvi.pyx":646 * * cdef libcpp_string _r = self.inst.get().Uncompress((in_0)) * py_result = _r # <<<<<<<<<<<<<< @@ -16516,7 +16597,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":637 + /* "pykeyvi.pyx":647 * cdef libcpp_string _r = self.inst.get().Uncompress((in_0)) * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -16524,13 +16605,13 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ * cdef class KeyOnlyDictionaryGenerator: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":632 + /* "pykeyvi.pyx":642 * self.inst = shared_ptr[_PredictiveCompression](new _PredictiveCompression((in_0))) * * def Uncompress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16549,7 +16630,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ return __pyx_r; } -/* "pykeyvi.pyx":643 +/* "pykeyvi.pyx":653 * cdef shared_ptr[_KeyOnlyDictionaryGenerator] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16572,7 +16653,7 @@ static void __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator___dealloc__(struct __ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":644 + /* "pykeyvi.pyx":654 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -16581,7 +16662,7 @@ static void __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator___dealloc__(struct __ */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":643 + /* "pykeyvi.pyx":653 * cdef shared_ptr[_KeyOnlyDictionaryGenerator] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16593,7 +16674,7 @@ static void __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator___dealloc__(struct __ __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":647 +/* "pykeyvi.pyx":657 * * * def __init__(self): # <<<<<<<<<<<<<< @@ -16626,7 +16707,7 @@ static int __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_2__init__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":648 + /* "pykeyvi.pyx":658 * * def __init__(self): * self.inst = shared_ptr[_KeyOnlyDictionaryGenerator](new _KeyOnlyDictionaryGenerator()) # <<<<<<<<<<<<<< @@ -16637,11 +16718,11 @@ static int __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_2__init__(struct __pyx __pyx_t_1 = new keyvi::dictionary::KeyOnlyDictionaryGenerator(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":647 + /* "pykeyvi.pyx":657 * * * def __init__(self): # <<<<<<<<<<<<<< @@ -16660,7 +16741,7 @@ static int __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_2__init__(struct __pyx return __pyx_r; } -/* "pykeyvi.pyx":650 +/* "pykeyvi.pyx":660 * self.inst = shared_ptr[_KeyOnlyDictionaryGenerator](new _KeyOnlyDictionaryGenerator()) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16677,7 +16758,7 @@ static PyObject *__pyx_pw_7pykeyvi_26KeyOnlyDictionaryGenerator_5Add(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryGenerator *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16700,7 +16781,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":651 + /* "pykeyvi.pyx":661 * * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16712,22 +16793,22 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":652 + /* "pykeyvi.pyx":662 * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().Add(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":653 + /* "pykeyvi.pyx":663 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().Add(input_in_0) # <<<<<<<<<<<<<< @@ -16738,10 +16819,10 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":650 + /* "pykeyvi.pyx":660 * self.inst = shared_ptr[_KeyOnlyDictionaryGenerator](new _KeyOnlyDictionaryGenerator()) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16761,7 +16842,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py return __pyx_r; } -/* "pykeyvi.pyx":655 +/* "pykeyvi.pyx":665 * self.inst.get().Add(input_in_0) * * def CloseFeeding(self): # <<<<<<<<<<<<<< @@ -16787,7 +16868,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_6CloseFeeding(st __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("CloseFeeding", 0); - /* "pykeyvi.pyx":656 + /* "pykeyvi.pyx":666 * * def CloseFeeding(self): * self.inst.get().CloseFeeding() # <<<<<<<<<<<<<< @@ -16796,7 +16877,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_6CloseFeeding(st */ __pyx_v_self->inst.get()->CloseFeeding(); - /* "pykeyvi.pyx":655 + /* "pykeyvi.pyx":665 * self.inst.get().Add(input_in_0) * * def CloseFeeding(self): # <<<<<<<<<<<<<< @@ -16811,7 +16892,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_6CloseFeeding(st return __pyx_r; } -/* "pykeyvi.pyx":658 +/* "pykeyvi.pyx":668 * self.inst.get().CloseFeeding() * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16828,7 +16909,7 @@ static PyObject *__pyx_pw_7pykeyvi_26KeyOnlyDictionaryGenerator_9WriteToFile(PyO PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryGenerator *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16851,7 +16932,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":659 + /* "pykeyvi.pyx":669 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16863,22 +16944,22 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":660 + /* "pykeyvi.pyx":670 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":661 + /* "pykeyvi.pyx":671 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -16887,7 +16968,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":658 + /* "pykeyvi.pyx":668 * self.inst.get().CloseFeeding() * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16907,7 +16988,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str return __pyx_r; } -/* "pykeyvi.pyx":667 +/* "pykeyvi.pyx":677 * cdef shared_ptr[_KeyOnlyDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16930,7 +17011,7 @@ static void __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler___dealloc__(struct __p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":668 + /* "pykeyvi.pyx":678 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -16939,7 +17020,7 @@ static void __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler___dealloc__(struct __p */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":667 + /* "pykeyvi.pyx":677 * cdef shared_ptr[_KeyOnlyDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16951,7 +17032,7 @@ static void __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler___dealloc__(struct __p __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":671 +/* "pykeyvi.pyx":681 * * * def _init_0(self): # <<<<<<<<<<<<<< @@ -16981,7 +17062,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_2_init_0(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":672 + /* "pykeyvi.pyx":682 * * def _init_0(self): * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler()) # <<<<<<<<<<<<<< @@ -16992,11 +17073,11 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_2_init_0(struct _ __pyx_t_1 = new keyvi::dictionary::KeyOnlyDictionaryCompiler(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":671 + /* "pykeyvi.pyx":681 * * * def _init_0(self): # <<<<<<<<<<<<<< @@ -17016,7 +17097,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_2_init_0(struct _ return __pyx_r; } -/* "pykeyvi.pyx":674 +/* "pykeyvi.pyx":684 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -17050,7 +17131,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_4_init_1(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":675 + /* "pykeyvi.pyx":685 * * def _init_1(self, memory_limit ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -17072,28 +17153,28 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_4_init_1(struct _ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":677 + /* "pykeyvi.pyx":687 * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) # <<<<<<<<<<<<<< * * def _init_2(self, memory_limit , dict value_store_params ): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_5 = new keyvi::dictionary::KeyOnlyDictionaryCompiler(((size_t)__pyx_t_4)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_5); - /* "pykeyvi.pyx":674 + /* "pykeyvi.pyx":684 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -17113,7 +17194,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_4_init_1(struct _ return __pyx_r; } -/* "pykeyvi.pyx":679 +/* "pykeyvi.pyx":689 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -17152,11 +17233,11 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_store_params)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17169,13 +17250,13 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.KeyOnlyDictionaryCompiler._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler *)__pyx_v_self), __pyx_v_memory_limit, __pyx_v_value_store_params); /* function exit code */ @@ -17188,7 +17269,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2(PyObject } static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generator15(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":681 +/* "pykeyvi.pyx":691 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -17214,7 +17295,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_genexpr( __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generator15, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generator15, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17252,21 +17333,21 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generat return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -17274,17 +17355,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generat if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -17294,7 +17375,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generat PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -17356,7 +17437,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_3genexpr __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generator16, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generator16, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17394,21 +17475,21 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -17416,17 +17497,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -17436,7 +17517,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -17479,7 +17560,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat return __pyx_r; } -/* "pykeyvi.pyx":679 +/* "pykeyvi.pyx":689 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -17524,7 +17605,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_store_params); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_store_params); - /* "pykeyvi.pyx":680 + /* "pykeyvi.pyx":690 * * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -17546,12 +17627,12 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":681 + /* "pykeyvi.pyx":691 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -17570,35 +17651,35 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_value_store_params_wrong_typ); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":683 + /* "pykeyvi.pyx":693 * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() # <<<<<<<<<<<<<< @@ -17609,11 +17690,11 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __pyx_t_6 = new std::map (); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v1 = __pyx_t_6; - /* "pykeyvi.pyx":684 + /* "pykeyvi.pyx":694 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -17622,17 +17703,17 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ */ if (unlikely(__pyx_cur_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -17640,17 +17721,17 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -17660,7 +17741,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -17676,7 +17757,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -17689,15 +17770,15 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -17705,7 +17786,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -17713,7 +17794,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9); @@ -17721,18 +17802,18 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "pykeyvi.pyx":685 + /* "pykeyvi.pyx":695 * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): * deref(v1)[ key ] = value # <<<<<<<<<<<<<< * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit), deref(v1))) * del v1 */ - __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((*__pyx_v_v1)[((std::string)__pyx_t_14)]) = ((std::string)__pyx_t_13); - /* "pykeyvi.pyx":684 + /* "pykeyvi.pyx":694 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -17742,23 +17823,23 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pykeyvi.pyx":686 + /* "pykeyvi.pyx":696 * for key, value in value_store_params.items(): * deref(v1)[ key ] = value * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit), deref(v1))) # <<<<<<<<<<<<<< * del v1 * */ - __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_16 = new keyvi::dictionary::KeyOnlyDictionaryCompiler(((size_t)__pyx_t_15), (*__pyx_v_v1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_16); - /* "pykeyvi.pyx":687 + /* "pykeyvi.pyx":697 * deref(v1)[ key ] = value * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit), deref(v1))) * del v1 # <<<<<<<<<<<<<< @@ -17767,7 +17848,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ */ delete __pyx_v_v1; - /* "pykeyvi.pyx":679 + /* "pykeyvi.pyx":689 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -17795,7 +17876,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ return __pyx_r; } -/* "pykeyvi.pyx":689 +/* "pykeyvi.pyx":699 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -17822,7 +17903,7 @@ static int __pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_9__init__(PyObject *__p } static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2generator17(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":694 +/* "pykeyvi.pyx":704 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -17848,7 +17929,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___genexpr __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2generator17, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2generator17, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17887,13 +17968,13 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -17906,10 +17987,10 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -17917,9 +17998,9 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -17927,17 +18008,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -17947,7 +18028,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -18010,7 +18091,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___3genexp __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5generator18, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5generator18, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -18049,13 +18130,13 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -18068,10 +18149,10 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -18079,9 +18160,9 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -18089,17 +18170,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -18109,7 +18190,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -18153,7 +18234,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera return __pyx_r; } -/* "pykeyvi.pyx":689 +/* "pykeyvi.pyx":699 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -18186,7 +18267,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); - /* "pykeyvi.pyx":690 + /* "pykeyvi.pyx":700 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -18197,21 +18278,21 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":691 + /* "pykeyvi.pyx":701 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":690 + /* "pykeyvi.pyx":700 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -18221,7 +18302,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ goto __pyx_L3; } - /* "pykeyvi.pyx":692 + /* "pykeyvi.pyx":702 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -18232,9 +18313,9 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { @@ -18264,21 +18345,21 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":693 + /* "pykeyvi.pyx":703 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) # <<<<<<<<<<<<<< * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":692 + /* "pykeyvi.pyx":702 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -18288,7 +18369,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ goto __pyx_L3; } - /* "pykeyvi.pyx":694 + /* "pykeyvi.pyx":704 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -18299,9 +18380,9 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((__pyx_t_5 == 2) != 0); if (__pyx_t_6) { @@ -18342,44 +18423,44 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":695 + /* "pykeyvi.pyx":705 * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":694 + /* "pykeyvi.pyx":704 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -18389,7 +18470,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ goto __pyx_L3; } - /* "pykeyvi.pyx":697 + /* "pykeyvi.pyx":707 * self._init_2(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -18397,29 +18478,29 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ * def Add(self, bytes in_0 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_args); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":689 + /* "pykeyvi.pyx":699 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -18441,7 +18522,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ return __pyx_r; } -/* "pykeyvi.pyx":699 +/* "pykeyvi.pyx":709 * raise Exception('can not handle type of %s' % (args,)) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18458,7 +18539,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_11Add(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -18481,7 +18562,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":700 + /* "pykeyvi.pyx":710 * * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -18493,22 +18574,22 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":701 + /* "pykeyvi.pyx":711 * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().Add(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":702 + /* "pykeyvi.pyx":712 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().Add(input_in_0) # <<<<<<<<<<<<<< @@ -18519,10 +18600,10 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":699 + /* "pykeyvi.pyx":709 * raise Exception('can not handle type of %s' % (args,)) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18542,7 +18623,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py return __pyx_r; } -/* "pykeyvi.pyx":704 +/* "pykeyvi.pyx":714 * self.inst.get().Add(input_in_0) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18559,7 +18640,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_13WriteToFile(PyO PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -18582,7 +18663,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":705 + /* "pykeyvi.pyx":715 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -18594,22 +18675,22 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":706 + /* "pykeyvi.pyx":716 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":707 + /* "pykeyvi.pyx":717 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -18618,7 +18699,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":704 + /* "pykeyvi.pyx":714 * self.inst.get().Add(input_in_0) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18638,7 +18719,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str return __pyx_r; } -/* "pykeyvi.pyx":709 +/* "pykeyvi.pyx":719 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -18664,7 +18745,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_14__enter__(struc __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "pykeyvi.pyx":710 + /* "pykeyvi.pyx":720 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -18676,7 +18757,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_14__enter__(struc __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":709 + /* "pykeyvi.pyx":719 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -18691,7 +18772,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_14__enter__(struc return __pyx_r; } -/* "pykeyvi.pyx":713 +/* "pykeyvi.pyx":723 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -18732,16 +18813,16 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_17__exit__(PyObje case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -18756,7 +18837,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_17__exit__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.KeyOnlyDictionaryCompiler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18780,14 +18861,14 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_16__exit__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "pykeyvi.pyx":714 + /* "pykeyvi.pyx":724 * * def __exit__(self, type, value, traceback): * self.Compile() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -18800,16 +18881,16 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_16__exit__(struct } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":713 + /* "pykeyvi.pyx":723 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -18832,7 +18913,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_16__exit__(struct return __pyx_r; } -/* "pykeyvi.pyx":717 +/* "pykeyvi.pyx":727 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -18866,7 +18947,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct int __pyx_t_2; __Pyx_RefNannySetupContext("Compile", 0); - /* "pykeyvi.pyx":718 + /* "pykeyvi.pyx":728 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -18877,7 +18958,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":719 + /* "pykeyvi.pyx":729 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -18891,7 +18972,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct #endif /*try:*/ { - /* "pykeyvi.pyx":720 + /* "pykeyvi.pyx":730 * if not args: * with nogil: * self.inst.get().Compile() # <<<<<<<<<<<<<< @@ -18901,7 +18982,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_v_self->inst.get()->Compile(); } - /* "pykeyvi.pyx":719 + /* "pykeyvi.pyx":729 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -18919,7 +19000,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct } } - /* "pykeyvi.pyx":721 + /* "pykeyvi.pyx":731 * with nogil: * self.inst.get().Compile() * return # <<<<<<<<<<<<<< @@ -18930,7 +19011,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pykeyvi.pyx":718 + /* "pykeyvi.pyx":728 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -18939,7 +19020,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct */ } - /* "pykeyvi.pyx":723 + /* "pykeyvi.pyx":733 * return * * cdef void* callback = args[0] # <<<<<<<<<<<<<< @@ -18948,7 +19029,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct */ __pyx_v_callback = ((void *)PyTuple_GET_ITEM(__pyx_v_args, 0)); - /* "pykeyvi.pyx":724 + /* "pykeyvi.pyx":734 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -18962,7 +19043,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct #endif /*try:*/ { - /* "pykeyvi.pyx":725 + /* "pykeyvi.pyx":735 * cdef void* callback = args[0] * with nogil: * self.inst.get().Compile(callback_wrapper, callback) # <<<<<<<<<<<<<< @@ -18972,7 +19053,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_v_self->inst.get()->Compile(__pyx_f_7pykeyvi_callback_wrapper, __pyx_v_callback); } - /* "pykeyvi.pyx":724 + /* "pykeyvi.pyx":734 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -18990,7 +19071,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct } } - /* "pykeyvi.pyx":717 + /* "pykeyvi.pyx":727 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -19006,7 +19087,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct return __pyx_r; } -/* "pykeyvi.pyx":728 +/* "pykeyvi.pyx":738 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -19041,16 +19122,16 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetManifest", 0); - /* "pykeyvi.pyx":729 + /* "pykeyvi.pyx":739 * * def SetManifest(self, manifest): * m = json.dumps(manifest) # <<<<<<<<<<<<<< * self.inst.get().SetManifestFromString(m) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -19064,16 +19145,16 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_manifest); __Pyx_GIVEREF(__pyx_v_manifest); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_manifest); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -19081,17 +19162,17 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str __pyx_v_m = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":730 + /* "pykeyvi.pyx":740 * def SetManifest(self, manifest): * m = json.dumps(manifest) * self.inst.get().SetManifestFromString(m) # <<<<<<<<<<<<<< * * cdef class Match: */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetManifestFromString(__pyx_t_5); - /* "pykeyvi.pyx":728 + /* "pykeyvi.pyx":738 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -19116,7 +19197,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str return __pyx_r; } -/* "pykeyvi.pyx":736 +/* "pykeyvi.pyx":746 * cdef shared_ptr[_Match] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -19139,7 +19220,7 @@ static void __pyx_pf_7pykeyvi_5Match___dealloc__(struct __pyx_obj_7pykeyvi_Match __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":737 + /* "pykeyvi.pyx":747 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -19148,7 +19229,7 @@ static void __pyx_pf_7pykeyvi_5Match___dealloc__(struct __pyx_obj_7pykeyvi_Match */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":736 + /* "pykeyvi.pyx":746 * cdef shared_ptr[_Match] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -19160,7 +19241,7 @@ static void __pyx_pf_7pykeyvi_5Match___dealloc__(struct __pyx_obj_7pykeyvi_Match __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":740 +/* "pykeyvi.pyx":750 * * * def SetEnd(self, end ): # <<<<<<<<<<<<<< @@ -19193,7 +19274,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_2SetEnd(struct __pyx_obj_7pykeyvi_Matc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetEnd", 0); - /* "pykeyvi.pyx":741 + /* "pykeyvi.pyx":751 * * def SetEnd(self, end ): * assert isinstance(end, (int, long)), 'arg end wrong type' # <<<<<<<<<<<<<< @@ -19215,22 +19296,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_2SetEnd(struct __pyx_obj_7pykeyvi_Matc __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_end_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":743 + /* "pykeyvi.pyx":753 * assert isinstance(end, (int, long)), 'arg end wrong type' * * self.inst.get().SetEnd((end)) # <<<<<<<<<<<<<< * * def GetStart(self): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_end); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_end); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetEnd(((size_t)__pyx_t_4)); - /* "pykeyvi.pyx":740 + /* "pykeyvi.pyx":750 * * * def SetEnd(self, end ): # <<<<<<<<<<<<<< @@ -19250,7 +19331,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_2SetEnd(struct __pyx_obj_7pykeyvi_Matc return __pyx_r; } -/* "pykeyvi.pyx":745 +/* "pykeyvi.pyx":755 * self.inst.get().SetEnd((end)) * * def GetStart(self): # <<<<<<<<<<<<<< @@ -19282,7 +19363,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetStart", 0); - /* "pykeyvi.pyx":746 + /* "pykeyvi.pyx":756 * * def GetStart(self): * cdef size_t _r = self.inst.get().GetStart() # <<<<<<<<<<<<<< @@ -19291,7 +19372,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v__r = __pyx_v_self->inst.get()->GetStart(); - /* "pykeyvi.pyx":747 + /* "pykeyvi.pyx":757 * def GetStart(self): * cdef size_t _r = self.inst.get().GetStart() * py_result = _r # <<<<<<<<<<<<<< @@ -19300,7 +19381,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_py_result = ((size_t)__pyx_v__r); - /* "pykeyvi.pyx":748 + /* "pykeyvi.pyx":758 * cdef size_t _r = self.inst.get().GetStart() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19308,13 +19389,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma * def GetScore(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":745 + /* "pykeyvi.pyx":755 * self.inst.get().SetEnd((end)) * * def GetStart(self): # <<<<<<<<<<<<<< @@ -19333,7 +19414,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":750 +/* "pykeyvi.pyx":760 * return py_result * * def GetScore(self): # <<<<<<<<<<<<<< @@ -19365,7 +19446,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetScore", 0); - /* "pykeyvi.pyx":751 + /* "pykeyvi.pyx":761 * * def GetScore(self): * cdef float _r = self.inst.get().GetScore() # <<<<<<<<<<<<<< @@ -19374,19 +19455,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v__r = __pyx_v_self->inst.get()->GetScore(); - /* "pykeyvi.pyx":752 + /* "pykeyvi.pyx":762 * def GetScore(self): * cdef float _r = self.inst.get().GetScore() * py_result = _r # <<<<<<<<<<<<<< * return py_result * */ - __pyx_t_1 = PyFloat_FromDouble(((float)__pyx_v__r)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(((float)__pyx_v__r)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_py_result = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":753 + /* "pykeyvi.pyx":763 * cdef float _r = self.inst.get().GetScore() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19398,7 +19479,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma __pyx_r = __pyx_v_py_result; goto __pyx_L0; - /* "pykeyvi.pyx":750 + /* "pykeyvi.pyx":760 * return py_result * * def GetScore(self): # <<<<<<<<<<<<<< @@ -19418,7 +19499,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":755 +/* "pykeyvi.pyx":765 * return py_result * * def SetMatchedString(self, bytes matched_string ): # <<<<<<<<<<<<<< @@ -19435,7 +19516,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_9SetMatchedString(PyObject *__pyx_v_se PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SetMatchedString (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matched_string), (&PyBytes_Type), 1, "matched_string", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matched_string), (&PyBytes_Type), 1, "matched_string", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_5Match_8SetMatchedString(((struct __pyx_obj_7pykeyvi_Match *)__pyx_v_self), ((PyObject*)__pyx_v_matched_string)); /* function exit code */ @@ -19457,7 +19538,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_8SetMatchedString(struct __pyx_obj_7py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetMatchedString", 0); - /* "pykeyvi.pyx":756 + /* "pykeyvi.pyx":766 * * def SetMatchedString(self, bytes matched_string ): * assert isinstance(matched_string, bytes), 'arg matched_string wrong type' # <<<<<<<<<<<<<< @@ -19469,22 +19550,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_8SetMatchedString(struct __pyx_obj_7py __pyx_t_1 = PyBytes_Check(__pyx_v_matched_string); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_matched_string_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":758 + /* "pykeyvi.pyx":768 * assert isinstance(matched_string, bytes), 'arg matched_string wrong type' * * self.inst.get().SetMatchedString((matched_string)) # <<<<<<<<<<<<<< * * def GetValueAsString(self): */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_matched_string); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_matched_string); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetMatchedString(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":755 + /* "pykeyvi.pyx":765 * return py_result * * def SetMatchedString(self, bytes matched_string ): # <<<<<<<<<<<<<< @@ -19504,7 +19585,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_8SetMatchedString(struct __pyx_obj_7py return __pyx_r; } -/* "pykeyvi.pyx":760 +/* "pykeyvi.pyx":770 * self.inst.get().SetMatchedString((matched_string)) * * def GetValueAsString(self): # <<<<<<<<<<<<<< @@ -19537,7 +19618,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetValueAsString", 0); - /* "pykeyvi.pyx":761 + /* "pykeyvi.pyx":771 * * def GetValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetValueAsString() # <<<<<<<<<<<<<< @@ -19548,11 +19629,11 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p __pyx_t_1 = __pyx_v_self->inst.get()->GetValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v__r = __pyx_t_1; - /* "pykeyvi.pyx":762 + /* "pykeyvi.pyx":772 * def GetValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetValueAsString() * py_result = _r # <<<<<<<<<<<<<< @@ -19561,7 +19642,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":763 + /* "pykeyvi.pyx":773 * cdef libcpp_string _r = self.inst.get().GetValueAsString() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19569,13 +19650,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p * def IsEmpty(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":760 + /* "pykeyvi.pyx":770 * self.inst.get().SetMatchedString((matched_string)) * * def GetValueAsString(self): # <<<<<<<<<<<<<< @@ -19594,7 +19675,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":765 +/* "pykeyvi.pyx":775 * return py_result * * def IsEmpty(self): # <<<<<<<<<<<<<< @@ -19626,7 +19707,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("IsEmpty", 0); - /* "pykeyvi.pyx":766 + /* "pykeyvi.pyx":776 * * def IsEmpty(self): * cdef bool _r = self.inst.get().IsEmpty() # <<<<<<<<<<<<<< @@ -19635,7 +19716,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v__r = __pyx_v_self->inst.get()->IsEmpty(); - /* "pykeyvi.pyx":767 + /* "pykeyvi.pyx":777 * def IsEmpty(self): * cdef bool _r = self.inst.get().IsEmpty() * py_result = _r # <<<<<<<<<<<<<< @@ -19644,7 +19725,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_py_result = ((bool)__pyx_v__r); - /* "pykeyvi.pyx":768 + /* "pykeyvi.pyx":778 * cdef bool _r = self.inst.get().IsEmpty() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19652,13 +19733,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma * def SetScore(self, float score ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":765 + /* "pykeyvi.pyx":775 * return py_result * * def IsEmpty(self): # <<<<<<<<<<<<<< @@ -19677,7 +19758,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":770 +/* "pykeyvi.pyx":780 * return py_result * * def SetScore(self, float score ): # <<<<<<<<<<<<<< @@ -19696,7 +19777,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_15SetScore(PyObject *__pyx_v_self, PyO __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SetScore (wrapper)", 0); assert(__pyx_arg_score); { - __pyx_v_score = __pyx_PyFloat_AsFloat(__pyx_arg_score); if (unlikely((__pyx_v_score == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_score = __pyx_PyFloat_AsFloat(__pyx_arg_score); if (unlikely((__pyx_v_score == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19721,7 +19802,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetScore", 0); - /* "pykeyvi.pyx":771 + /* "pykeyvi.pyx":781 * * def SetScore(self, float score ): * assert isinstance(score, float), 'arg score wrong type' # <<<<<<<<<<<<<< @@ -19730,18 +19811,18 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_Check(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_score_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":773 + /* "pykeyvi.pyx":783 * assert isinstance(score, float), 'arg score wrong type' * * self.inst.get().SetScore((score)) # <<<<<<<<<<<<<< @@ -19750,7 +19831,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M */ __pyx_v_self->inst.get()->SetScore(((float)__pyx_v_score)); - /* "pykeyvi.pyx":770 + /* "pykeyvi.pyx":780 * return py_result * * def SetScore(self, float score ): # <<<<<<<<<<<<<< @@ -19771,7 +19852,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":775 +/* "pykeyvi.pyx":785 * self.inst.get().SetScore((score)) * * def GetRawValueAsString(self): # <<<<<<<<<<<<<< @@ -19804,7 +19885,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetRawValueAsString", 0); - /* "pykeyvi.pyx":776 + /* "pykeyvi.pyx":786 * * def GetRawValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetRawValueAsString() # <<<<<<<<<<<<<< @@ -19815,11 +19896,11 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj __pyx_t_1 = __pyx_v_self->inst.get()->GetRawValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v__r = __pyx_t_1; - /* "pykeyvi.pyx":777 + /* "pykeyvi.pyx":787 * def GetRawValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetRawValueAsString() * py_result = _r # <<<<<<<<<<<<<< @@ -19828,7 +19909,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":778 + /* "pykeyvi.pyx":788 * cdef libcpp_string _r = self.inst.get().GetRawValueAsString() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19836,13 +19917,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj * def SetStart(self, start ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":775 + /* "pykeyvi.pyx":785 * self.inst.get().SetScore((score)) * * def GetRawValueAsString(self): # <<<<<<<<<<<<<< @@ -19861,7 +19942,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj return __pyx_r; } -/* "pykeyvi.pyx":780 +/* "pykeyvi.pyx":790 * return py_result * * def SetStart(self, start ): # <<<<<<<<<<<<<< @@ -19894,7 +19975,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_18SetStart(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetStart", 0); - /* "pykeyvi.pyx":781 + /* "pykeyvi.pyx":791 * * def SetStart(self, start ): * assert isinstance(start, (int, long)), 'arg start wrong type' # <<<<<<<<<<<<<< @@ -19916,22 +19997,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_18SetStart(struct __pyx_obj_7pykeyvi_M __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_start_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":783 + /* "pykeyvi.pyx":793 * assert isinstance(start, (int, long)), 'arg start wrong type' * * self.inst.get().SetStart((start)) # <<<<<<<<<<<<<< * * def GetEnd(self): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_start); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_start); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetStart(((size_t)__pyx_t_4)); - /* "pykeyvi.pyx":780 + /* "pykeyvi.pyx":790 * return py_result * * def SetStart(self, start ): # <<<<<<<<<<<<<< @@ -19951,7 +20032,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_18SetStart(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":785 +/* "pykeyvi.pyx":795 * self.inst.get().SetStart((start)) * * def GetEnd(self): # <<<<<<<<<<<<<< @@ -19983,7 +20064,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetEnd", 0); - /* "pykeyvi.pyx":786 + /* "pykeyvi.pyx":796 * * def GetEnd(self): * cdef size_t _r = self.inst.get().GetEnd() # <<<<<<<<<<<<<< @@ -19992,7 +20073,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat */ __pyx_v__r = __pyx_v_self->inst.get()->GetEnd(); - /* "pykeyvi.pyx":787 + /* "pykeyvi.pyx":797 * def GetEnd(self): * cdef size_t _r = self.inst.get().GetEnd() * py_result = _r # <<<<<<<<<<<<<< @@ -20001,7 +20082,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat */ __pyx_v_py_result = ((size_t)__pyx_v__r); - /* "pykeyvi.pyx":788 + /* "pykeyvi.pyx":798 * cdef size_t _r = self.inst.get().GetEnd() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -20009,13 +20090,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat * def __copy__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":785 + /* "pykeyvi.pyx":795 * self.inst.get().SetStart((start)) * * def GetEnd(self): # <<<<<<<<<<<<<< @@ -20034,7 +20115,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat return __pyx_r; } -/* "pykeyvi.pyx":790 +/* "pykeyvi.pyx":800 * return py_result * * def __copy__(self): # <<<<<<<<<<<<<< @@ -20065,20 +20146,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__copy__", 0); - /* "pykeyvi.pyx":791 + /* "pykeyvi.pyx":801 * * def __copy__(self): * cdef Match rv = Match.__new__(Match) # <<<<<<<<<<<<<< * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv */ - __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rv = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":792 + /* "pykeyvi.pyx":802 * def __copy__(self): * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) # <<<<<<<<<<<<<< @@ -20087,7 +20168,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M */ __pyx_v_rv->inst = boost::shared_ptr (new keyvi::dictionary::Match((*__pyx_v_self->inst.get()))); - /* "pykeyvi.pyx":793 + /* "pykeyvi.pyx":803 * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv # <<<<<<<<<<<<<< @@ -20099,7 +20180,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M __pyx_r = ((PyObject *)__pyx_v_rv); goto __pyx_L0; - /* "pykeyvi.pyx":790 + /* "pykeyvi.pyx":800 * return py_result * * def __copy__(self): # <<<<<<<<<<<<<< @@ -20119,7 +20200,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":795 +/* "pykeyvi.pyx":805 * return rv * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -20150,20 +20231,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "pykeyvi.pyx":796 + /* "pykeyvi.pyx":806 * * def __deepcopy__(self, memo): * cdef Match rv = Match.__new__(Match) # <<<<<<<<<<<<<< * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv */ - __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rv = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":797 + /* "pykeyvi.pyx":807 * def __deepcopy__(self, memo): * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) # <<<<<<<<<<<<<< @@ -20172,7 +20253,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey */ __pyx_v_rv->inst = boost::shared_ptr (new keyvi::dictionary::Match((*__pyx_v_self->inst.get()))); - /* "pykeyvi.pyx":798 + /* "pykeyvi.pyx":808 * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv # <<<<<<<<<<<<<< @@ -20184,7 +20265,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey __pyx_r = ((PyObject *)__pyx_v_rv); goto __pyx_L0; - /* "pykeyvi.pyx":795 + /* "pykeyvi.pyx":805 * return rv * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -20204,7 +20285,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey return __pyx_r; } -/* "pykeyvi.pyx":800 +/* "pykeyvi.pyx":810 * return rv * * def _init_0(self): # <<<<<<<<<<<<<< @@ -20230,7 +20311,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_26_init_0(struct __pyx_obj_7pykeyvi_Ma __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":801 + /* "pykeyvi.pyx":811 * * def _init_0(self): * self.inst = shared_ptr[_Match](new _Match()) # <<<<<<<<<<<<<< @@ -20239,7 +20320,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_26_init_0(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_self->inst = boost::shared_ptr (new keyvi::dictionary::Match()); - /* "pykeyvi.pyx":800 + /* "pykeyvi.pyx":810 * return rv * * def _init_0(self): # <<<<<<<<<<<<<< @@ -20254,7 +20335,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_26_init_0(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":803 +/* "pykeyvi.pyx":813 * self.inst = shared_ptr[_Match](new _Match()) * * def _init_1(self, Match m ): # <<<<<<<<<<<<<< @@ -20271,7 +20352,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_29_init_1(PyObject *__pyx_v_self, PyOb PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_7pykeyvi_Match, 1, "m", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_7pykeyvi_Match, 1, "m", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_5Match_28_init_1(((struct __pyx_obj_7pykeyvi_Match *)__pyx_v_self), ((struct __pyx_obj_7pykeyvi_Match *)__pyx_v_m)); /* function exit code */ @@ -20292,7 +20373,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":804 + /* "pykeyvi.pyx":814 * * def _init_1(self, Match m ): * assert isinstance(m, Match), 'arg m wrong type' # <<<<<<<<<<<<<< @@ -20304,12 +20385,12 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_m), __pyx_ptype_7pykeyvi_Match); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_m_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":806 + /* "pykeyvi.pyx":816 * assert isinstance(m, Match), 'arg m wrong type' * * self.inst = shared_ptr[_Match](new _Match((deref(m.inst.get())))) # <<<<<<<<<<<<<< @@ -20318,7 +20399,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_self->inst = boost::shared_ptr (new keyvi::dictionary::Match((*__pyx_v_m->inst.get()))); - /* "pykeyvi.pyx":803 + /* "pykeyvi.pyx":813 * self.inst = shared_ptr[_Match](new _Match()) * * def _init_1(self, Match m ): # <<<<<<<<<<<<<< @@ -20338,7 +20419,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":808 +/* "pykeyvi.pyx":818 * self.inst = shared_ptr[_Match](new _Match((deref(m.inst.get())))) * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -20378,7 +20459,7 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":809 + /* "pykeyvi.pyx":819 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -20389,21 +20470,21 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":810 + /* "pykeyvi.pyx":820 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], Match)): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":809 + /* "pykeyvi.pyx":819 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -20413,14 +20494,14 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * goto __pyx_L3; } - /* "pykeyvi.pyx":811 + /* "pykeyvi.pyx":821 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], Match)): # <<<<<<<<<<<<<< * self._init_1(*args) * else: */ - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { } else { @@ -20436,21 +20517,21 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":812 + /* "pykeyvi.pyx":822 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], Match)): * self._init_1(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":811 + /* "pykeyvi.pyx":821 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], Match)): # <<<<<<<<<<<<<< @@ -20460,7 +20541,7 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * goto __pyx_L3; } - /* "pykeyvi.pyx":814 + /* "pykeyvi.pyx":824 * self._init_1(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -20468,29 +20549,29 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * * def GetMatchedString(self): */ /*else*/ { - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_args); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":808 + /* "pykeyvi.pyx":818 * self.inst = shared_ptr[_Match](new _Match((deref(m.inst.get())))) * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -20511,7 +20592,7 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * return __pyx_r; } -/* "pykeyvi.pyx":816 +/* "pykeyvi.pyx":826 * raise Exception('can not handle type of %s' % (args,)) * * def GetMatchedString(self): # <<<<<<<<<<<<<< @@ -20543,7 +20624,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetMatchedString", 0); - /* "pykeyvi.pyx":817 + /* "pykeyvi.pyx":827 * * def GetMatchedString(self): * cdef libcpp_string _r = self.inst.get().GetMatchedString() # <<<<<<<<<<<<<< @@ -20552,7 +20633,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p */ __pyx_v__r = __pyx_v_self->inst.get()->GetMatchedString(); - /* "pykeyvi.pyx":818 + /* "pykeyvi.pyx":828 * def GetMatchedString(self): * cdef libcpp_string _r = self.inst.get().GetMatchedString() * py_result = _r # <<<<<<<<<<<<<< @@ -20561,7 +20642,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":819 + /* "pykeyvi.pyx":829 * cdef libcpp_string _r = self.inst.get().GetMatchedString() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -20569,13 +20650,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p * def GetAttribute(self, key): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":816 + /* "pykeyvi.pyx":826 * raise Exception('can not handle type of %s' % (args,)) * * def GetMatchedString(self): # <<<<<<<<<<<<<< @@ -20594,7 +20675,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":821 +/* "pykeyvi.pyx":831 * return py_result * * def GetAttribute(self, key): # <<<<<<<<<<<<<< @@ -20631,7 +20712,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey __Pyx_RefNannySetupContext("GetAttribute", 0); __Pyx_INCREF(__pyx_v_key); - /* "pykeyvi.pyx":822 + /* "pykeyvi.pyx":832 * * def GetAttribute(self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20642,22 +20723,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":823 + /* "pykeyvi.pyx":833 * def GetAttribute(self, key): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * py_result = self.inst.get().GetAttributePy( key) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":822 + /* "pykeyvi.pyx":832 * * def GetAttribute(self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20666,23 +20747,23 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey */ } - /* "pykeyvi.pyx":825 + /* "pykeyvi.pyx":835 * key = key.encode("utf-8") * * py_result = self.inst.get().GetAttributePy( key) # <<<<<<<<<<<<<< * return py_result * */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_6 = __pyx_v_self->inst.get()->GetAttributePy(((std::string)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_py_result = __pyx_t_6; - /* "pykeyvi.pyx":826 + /* "pykeyvi.pyx":836 * * py_result = self.inst.get().GetAttributePy( key) * return py_result # <<<<<<<<<<<<<< @@ -20694,7 +20775,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":821 + /* "pykeyvi.pyx":831 * return py_result * * def GetAttribute(self, key): # <<<<<<<<<<<<<< @@ -20715,7 +20796,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey return __pyx_r; } -/* "pykeyvi.pyx":829 +/* "pykeyvi.pyx":839 * * * def SetAttribute(self, key, value): # <<<<<<<<<<<<<< @@ -20754,11 +20835,11 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_37SetAttribute(PyObject *__pyx_v_self, case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -20771,7 +20852,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_37SetAttribute(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Match.SetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20804,7 +20885,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __Pyx_RefNannySetupContext("SetAttribute", 0); __Pyx_INCREF(__pyx_v_key); - /* "pykeyvi.pyx":830 + /* "pykeyvi.pyx":840 * * def SetAttribute(self, key, value): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20815,22 +20896,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":831 + /* "pykeyvi.pyx":841 * def SetAttribute(self, key, value): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * t = type(value) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":830 + /* "pykeyvi.pyx":840 * * def SetAttribute(self, key, value): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20839,7 +20920,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey */ } - /* "pykeyvi.pyx":833 + /* "pykeyvi.pyx":843 * key = key.encode("utf-8") * * t = type(value) # <<<<<<<<<<<<<< @@ -20849,35 +20930,35 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); __pyx_v_t = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value))); - /* "pykeyvi.pyx":834 + /* "pykeyvi.pyx":844 * * t = type(value) * if t == str: # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value) * elif t == unicode: */ - __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":835 + /* "pykeyvi.pyx":845 * t = type(value) * if t == str: * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * elif t == unicode: * value_utf8 = value.encode("utf-8") */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((std::string)__pyx_t_6)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":834 + /* "pykeyvi.pyx":844 * * t = type(value) * if t == str: # <<<<<<<<<<<<<< @@ -20887,50 +20968,50 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":836 + /* "pykeyvi.pyx":846 * if t == str: * self.inst.get().SetAttribute( key, value) * elif t == unicode: # <<<<<<<<<<<<<< * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) */ - __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":837 + /* "pykeyvi.pyx":847 * self.inst.get().SetAttribute( key, value) * elif t == unicode: * value_utf8 = value.encode("utf-8") # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_value_utf8 = __pyx_t_3; __pyx_t_3 = 0; - /* "pykeyvi.pyx":838 + /* "pykeyvi.pyx":848 * elif t == unicode: * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) # <<<<<<<<<<<<<< * elif t == float: * self.inst.get().SetAttribute( key, value) */ - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value_utf8); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value_utf8); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_6), ((std::string)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":836 + /* "pykeyvi.pyx":846 * if t == str: * self.inst.get().SetAttribute( key, value) * elif t == unicode: # <<<<<<<<<<<<<< @@ -20940,35 +21021,35 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":839 + /* "pykeyvi.pyx":849 * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value) * elif t == int: */ - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":840 + /* "pykeyvi.pyx":850 * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * elif t == int: * self.inst.get().SetAttribute( key, value) */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((float)__pyx_t_7)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":839 + /* "pykeyvi.pyx":849 * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: # <<<<<<<<<<<<<< @@ -20978,35 +21059,35 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":841 + /* "pykeyvi.pyx":851 * elif t == float: * self.inst.get().SetAttribute( key, value) * elif t == int: # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value) * # special trick as t == bool does not work due to name collision between cython and C */ - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":842 + /* "pykeyvi.pyx":852 * self.inst.get().SetAttribute( key, value) * elif t == int: * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((int)__pyx_t_8)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":841 + /* "pykeyvi.pyx":851 * elif t == float: * self.inst.get().SetAttribute( key, value) * elif t == int: # <<<<<<<<<<<<<< @@ -21016,7 +21097,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":844 + /* "pykeyvi.pyx":854 * self.inst.get().SetAttribute( key, value) * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): # <<<<<<<<<<<<<< @@ -21027,23 +21108,23 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pykeyvi.pyx":845 + /* "pykeyvi.pyx":855 * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * else: * raise Exception("Unsupported Value Type") */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((bool)__pyx_t_9)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":844 + /* "pykeyvi.pyx":854 * self.inst.get().SetAttribute( key, value) * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): # <<<<<<<<<<<<<< @@ -21053,7 +21134,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":847 + /* "pykeyvi.pyx":857 * self.inst.get().SetAttribute( key, value) * else: * raise Exception("Unsupported Value Type") # <<<<<<<<<<<<<< @@ -21061,15 +21142,15 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey * */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; - /* "pykeyvi.pyx":829 + /* "pykeyvi.pyx":839 * * * def SetAttribute(self, key, value): # <<<<<<<<<<<<<< @@ -21094,7 +21175,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey return __pyx_r; } -/* "pykeyvi.pyx":850 +/* "pykeyvi.pyx":860 * * * def GetValue(self): # <<<<<<<<<<<<<< @@ -21135,7 +21216,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetValue", 0); - /* "pykeyvi.pyx":852 + /* "pykeyvi.pyx":862 * def GetValue(self): * """Decodes a keyvi value and returns it.""" * value = self.inst.get().GetRawValueAsString() # <<<<<<<<<<<<<< @@ -21146,14 +21227,14 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_1 = __pyx_v_self->inst.get()->GetRawValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "pykeyvi.pyx":853 + /* "pykeyvi.pyx":863 * """Decodes a keyvi value and returns it.""" * value = self.inst.get().GetRawValueAsString() * if value is None or len(value) == 0: # <<<<<<<<<<<<<< @@ -21167,13 +21248,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_6 == 0) != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "pykeyvi.pyx":854 + /* "pykeyvi.pyx":864 * value = self.inst.get().GetRawValueAsString() * if value is None or len(value) == 0: * return None # <<<<<<<<<<<<<< @@ -21185,7 +21266,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_r = Py_None; goto __pyx_L0; - /* "pykeyvi.pyx":853 + /* "pykeyvi.pyx":863 * """Decodes a keyvi value and returns it.""" * value = self.inst.get().GetRawValueAsString() * if value is None or len(value) == 0: # <<<<<<<<<<<<<< @@ -21194,20 +21275,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M */ } - /* "pykeyvi.pyx":856 + /* "pykeyvi.pyx":866 * return None * * elif value[0] == '\x00': # <<<<<<<<<<<<<< * return msgpack.loads(value[1:]) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__12, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__12, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pykeyvi.pyx":857 + /* "pykeyvi.pyx":867 * * elif value[0] == '\x00': * return msgpack.loads(value[1:]) # <<<<<<<<<<<<<< @@ -21215,12 +21296,12 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M * elif value[0] == '\x01': */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_loads); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_loads); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -21233,17 +21314,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -21252,7 +21333,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":856 + /* "pykeyvi.pyx":866 * return None * * elif value[0] == '\x00': # <<<<<<<<<<<<<< @@ -21261,32 +21342,32 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M */ } - /* "pykeyvi.pyx":859 + /* "pykeyvi.pyx":869 * return msgpack.loads(value[1:]) * * elif value[0] == '\x01': # <<<<<<<<<<<<<< * value = zlib.decompress(value[1:]) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pykeyvi.pyx":860 + /* "pykeyvi.pyx":870 * * elif value[0] == '\x01': * value = zlib.decompress(value[1:]) # <<<<<<<<<<<<<< * * elif value[0] == '\x02': */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zlib); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zlib); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decompress); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decompress); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__15, 1, 0, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__15, 1, 0, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { @@ -21299,17 +21380,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -21317,7 +21398,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "pykeyvi.pyx":859 + /* "pykeyvi.pyx":869 * return msgpack.loads(value[1:]) * * elif value[0] == '\x01': # <<<<<<<<<<<<<< @@ -21327,32 +21408,32 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M goto __pyx_L3; } - /* "pykeyvi.pyx":862 + /* "pykeyvi.pyx":872 * value = zlib.decompress(value[1:]) * * elif value[0] == '\x02': # <<<<<<<<<<<<<< * value = snappy.decompress(value[1:]) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pykeyvi.pyx":863 + /* "pykeyvi.pyx":873 * * elif value[0] == '\x02': * value = snappy.decompress(value[1:]) # <<<<<<<<<<<<<< * * return msgpack.loads(value) */ - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_snappy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_snappy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decompress); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decompress); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__17, 1, 0, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__17, 1, 0, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { @@ -21365,17 +21446,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_8) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -21383,7 +21464,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "pykeyvi.pyx":862 + /* "pykeyvi.pyx":872 * value = zlib.decompress(value[1:]) * * elif value[0] == '\x02': # <<<<<<<<<<<<<< @@ -21393,7 +21474,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } __pyx_L3:; - /* "pykeyvi.pyx":865 + /* "pykeyvi.pyx":875 * value = snappy.decompress(value[1:]) * * return msgpack.loads(value) # <<<<<<<<<<<<<< @@ -21401,9 +21482,9 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_loads); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_loads); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -21417,16 +21498,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_value); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -21435,7 +21516,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":850 + /* "pykeyvi.pyx":860 * * * def GetValue(self): # <<<<<<<<<<<<<< @@ -21459,7 +21540,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":868 +/* "pykeyvi.pyx":878 * * * def dumps(self): # <<<<<<<<<<<<<< @@ -21504,19 +21585,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dumps", 0); - /* "pykeyvi.pyx":869 + /* "pykeyvi.pyx":879 * * def dumps(self): * m=[] # <<<<<<<<<<<<<< * do_pack_rest = False * score = self.inst.get().GetScore() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":870 + /* "pykeyvi.pyx":880 * def dumps(self): * m=[] * do_pack_rest = False # <<<<<<<<<<<<<< @@ -21525,40 +21606,40 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 0; - /* "pykeyvi.pyx":871 + /* "pykeyvi.pyx":881 * m=[] * do_pack_rest = False * score = self.inst.get().GetScore() # <<<<<<<<<<<<<< * if score != 0: * m.append(score) */ - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->inst.get()->GetScore()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->inst.get()->GetScore()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_score = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":872 + /* "pykeyvi.pyx":882 * do_pack_rest = False * score = self.inst.get().GetScore() * if score != 0: # <<<<<<<<<<<<<< * m.append(score) * do_pack_rest = True */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_score, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_score, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":873 + /* "pykeyvi.pyx":883 * score = self.inst.get().GetScore() * if score != 0: * m.append(score) # <<<<<<<<<<<<<< * do_pack_rest = True * end = self.inst.get().GetEnd() */ - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_v_score); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_v_score); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":874 + /* "pykeyvi.pyx":884 * if score != 0: * m.append(score) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21567,7 +21648,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":872 + /* "pykeyvi.pyx":882 * do_pack_rest = False * score = self.inst.get().GetScore() * if score != 0: # <<<<<<<<<<<<<< @@ -21576,7 +21657,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":875 + /* "pykeyvi.pyx":885 * m.append(score) * do_pack_rest = True * end = self.inst.get().GetEnd() # <<<<<<<<<<<<<< @@ -21585,7 +21666,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_end = __pyx_v_self->inst.get()->GetEnd(); - /* "pykeyvi.pyx":876 + /* "pykeyvi.pyx":886 * do_pack_rest = True * end = self.inst.get().GetEnd() * if end != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21603,19 +21684,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":877 + /* "pykeyvi.pyx":887 * end = self.inst.get().GetEnd() * if end != 0 or do_pack_rest: * m.append(end) # <<<<<<<<<<<<<< * do_pack_rest = True * start = self.inst.get().GetStart() */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":878 + /* "pykeyvi.pyx":888 * if end != 0 or do_pack_rest: * m.append(end) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21624,7 +21705,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":876 + /* "pykeyvi.pyx":886 * do_pack_rest = True * end = self.inst.get().GetEnd() * if end != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21633,7 +21714,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":879 + /* "pykeyvi.pyx":889 * m.append(end) * do_pack_rest = True * start = self.inst.get().GetStart() # <<<<<<<<<<<<<< @@ -21642,7 +21723,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_start = __pyx_v_self->inst.get()->GetStart(); - /* "pykeyvi.pyx":880 + /* "pykeyvi.pyx":890 * do_pack_rest = True * start = self.inst.get().GetStart() * if start != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21660,19 +21741,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":881 + /* "pykeyvi.pyx":891 * start = self.inst.get().GetStart() * if start != 0 or do_pack_rest: * m.append(start) # <<<<<<<<<<<<<< * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":882 + /* "pykeyvi.pyx":892 * if start != 0 or do_pack_rest: * m.append(start) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21681,7 +21762,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":880 + /* "pykeyvi.pyx":890 * do_pack_rest = True * start = self.inst.get().GetStart() * if start != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21690,7 +21771,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":883 + /* "pykeyvi.pyx":893 * m.append(start) * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() # <<<<<<<<<<<<<< @@ -21699,16 +21780,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_matchedstring = __pyx_v_self->inst.get()->GetMatchedString(); - /* "pykeyvi.pyx":884 + /* "pykeyvi.pyx":894 * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() * if len(matchedstring) != 0 or do_pack_rest: # <<<<<<<<<<<<<< * m.append(matchedstring) * do_pack_rest = True */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((__pyx_t_5 != 0) != 0); if (!__pyx_t_4) { @@ -21721,19 +21802,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L11_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":885 + /* "pykeyvi.pyx":895 * matchedstring = self.inst.get().GetMatchedString() * if len(matchedstring) != 0 or do_pack_rest: * m.append(matchedstring) # <<<<<<<<<<<<<< * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":886 + /* "pykeyvi.pyx":896 * if len(matchedstring) != 0 or do_pack_rest: * m.append(matchedstring) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21742,7 +21823,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":884 + /* "pykeyvi.pyx":894 * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() * if len(matchedstring) != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21751,7 +21832,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":887 + /* "pykeyvi.pyx":897 * m.append(matchedstring) * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() # <<<<<<<<<<<<<< @@ -21762,20 +21843,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_t_6 = __pyx_v_self->inst.get()->GetRawValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rawvalue = __pyx_t_6; - /* "pykeyvi.pyx":888 + /* "pykeyvi.pyx":898 * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() * if len(rawvalue) != 0 or do_pack_rest: # <<<<<<<<<<<<<< * m.append(rawvalue) * m.reverse() */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((__pyx_t_5 != 0) != 0); if (!__pyx_t_4) { @@ -21788,19 +21869,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L14_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":889 + /* "pykeyvi.pyx":899 * rawvalue = self.inst.get().GetRawValueAsString() * if len(rawvalue) != 0 or do_pack_rest: * m.append(rawvalue) # <<<<<<<<<<<<<< * m.reverse() * return msgpack.dumps(m) */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":888 + /* "pykeyvi.pyx":898 * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() * if len(rawvalue) != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21809,16 +21890,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":890 + /* "pykeyvi.pyx":900 * if len(rawvalue) != 0 or do_pack_rest: * m.append(rawvalue) * m.reverse() # <<<<<<<<<<<<<< * return msgpack.dumps(m) * */ - __pyx_t_3 = PyList_Reverse(__pyx_v_m); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_Reverse(__pyx_v_m); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":891 + /* "pykeyvi.pyx":901 * m.append(rawvalue) * m.reverse() * return msgpack.dumps(m) # <<<<<<<<<<<<<< @@ -21826,9 +21907,9 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc * def __SetRawValue(self, str): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dumps); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dumps); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -21842,16 +21923,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc } } if (!__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_m); __Pyx_GIVEREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_m); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -21860,7 +21941,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":868 + /* "pykeyvi.pyx":878 * * * def dumps(self): # <<<<<<<<<<<<<< @@ -21884,7 +21965,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc return __pyx_r; } -/* "pykeyvi.pyx":893 +/* "pykeyvi.pyx":903 * return msgpack.dumps(m) * * def __SetRawValue(self, str): # <<<<<<<<<<<<<< @@ -21914,22 +21995,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_42__SetRawValue(struct __pyx_obj_7pyke int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__SetRawValue", 0); - /* "pykeyvi.pyx":894 + /* "pykeyvi.pyx":904 * * def __SetRawValue(self, str): * self.inst.get().SetRawValue( str) # <<<<<<<<<<<<<< * * @staticmethod */ - __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetRawValue(((std::string)__pyx_t_1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":893 + /* "pykeyvi.pyx":903 * return msgpack.dumps(m) * * def __SetRawValue(self, str): # <<<<<<<<<<<<<< @@ -21949,7 +22030,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_42__SetRawValue(struct __pyx_obj_7pyke return __pyx_r; } -/* "pykeyvi.pyx":897 +/* "pykeyvi.pyx":907 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< @@ -21986,7 +22067,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_45loads(CYTHON_UNUSED PyObject *__pyx_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loads") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loads") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -21997,7 +22078,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_45loads(CYTHON_UNUSED PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("loads", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("loads", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Match.loads", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22028,28 +22109,28 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m int __pyx_clineno = 0; __Pyx_RefNannySetupContext("loads", 0); - /* "pykeyvi.pyx":898 + /* "pykeyvi.pyx":908 * @staticmethod * def loads(serialized_match): * m=Match() # <<<<<<<<<<<<<< * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":899 + /* "pykeyvi.pyx":909 * def loads(serialized_match): * m=Match() * unserialized = msgpack.loads(serialized_match) # <<<<<<<<<<<<<< * number_of_fields = len(unserialized) * if number_of_fields > 0: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -22063,16 +22144,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_serialized_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_serialized_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_serialized_match); __Pyx_GIVEREF(__pyx_v_serialized_match); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_serialized_match); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -22080,17 +22161,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_v_unserialized = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":900 + /* "pykeyvi.pyx":910 * m=Match() * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) # <<<<<<<<<<<<<< * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) */ - __pyx_t_5 = PyObject_Length(__pyx_v_unserialized); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Length(__pyx_v_unserialized); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_number_of_fields = __pyx_t_5; - /* "pykeyvi.pyx":901 + /* "pykeyvi.pyx":911 * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) * if number_of_fields > 0: # <<<<<<<<<<<<<< @@ -22100,16 +22181,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 0) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":902 + /* "pykeyvi.pyx":912 * number_of_fields = len(unserialized) * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) # <<<<<<<<<<<<<< * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetRawValue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetRawValue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22122,24 +22203,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":903 + /* "pykeyvi.pyx":913 * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) * if number_of_fields > 1: # <<<<<<<<<<<<<< @@ -22149,16 +22230,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 1) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":904 + /* "pykeyvi.pyx":914 * m.__SetRawValue(unserialized[0]) * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) # <<<<<<<<<<<<<< * if number_of_fields > 2: * m.SetStart(unserialized[2]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetMatchedString); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetMatchedString); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22171,24 +22252,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":905 + /* "pykeyvi.pyx":915 * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) * if number_of_fields > 2: # <<<<<<<<<<<<<< @@ -22198,16 +22279,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 2) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":906 + /* "pykeyvi.pyx":916 * m.SetMatchedString(unserialized[1]) * if number_of_fields > 2: * m.SetStart(unserialized[2]) # <<<<<<<<<<<<<< * if number_of_fields > 3: * m.SetEnd(unserialized[3]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetStart); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetStart); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_unserialized, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_unserialized, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22220,24 +22301,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":907 + /* "pykeyvi.pyx":917 * if number_of_fields > 2: * m.SetStart(unserialized[2]) * if number_of_fields > 3: # <<<<<<<<<<<<<< @@ -22247,16 +22328,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 3) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":908 + /* "pykeyvi.pyx":918 * m.SetStart(unserialized[2]) * if number_of_fields > 3: * m.SetEnd(unserialized[3]) # <<<<<<<<<<<<<< * if number_of_fields > 4: * m.SetScore(unserialized[4]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetEnd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetEnd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22269,24 +22350,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":909 + /* "pykeyvi.pyx":919 * if number_of_fields > 3: * m.SetEnd(unserialized[3]) * if number_of_fields > 4: # <<<<<<<<<<<<<< @@ -22296,16 +22377,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 4) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":910 + /* "pykeyvi.pyx":920 * m.SetEnd(unserialized[3]) * if number_of_fields > 4: * m.SetScore(unserialized[4]) # <<<<<<<<<<<<<< * * return m */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetScore); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetScore); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22318,24 +22399,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":909 + /* "pykeyvi.pyx":919 * if number_of_fields > 3: * m.SetEnd(unserialized[3]) * if number_of_fields > 4: # <<<<<<<<<<<<<< @@ -22344,7 +22425,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":907 + /* "pykeyvi.pyx":917 * if number_of_fields > 2: * m.SetStart(unserialized[2]) * if number_of_fields > 3: # <<<<<<<<<<<<<< @@ -22353,7 +22434,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":905 + /* "pykeyvi.pyx":915 * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) * if number_of_fields > 2: # <<<<<<<<<<<<<< @@ -22362,7 +22443,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":903 + /* "pykeyvi.pyx":913 * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) * if number_of_fields > 1: # <<<<<<<<<<<<<< @@ -22371,7 +22452,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":901 + /* "pykeyvi.pyx":911 * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) * if number_of_fields > 0: # <<<<<<<<<<<<<< @@ -22380,7 +22461,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":912 + /* "pykeyvi.pyx":922 * m.SetScore(unserialized[4]) * * return m # <<<<<<<<<<<<<< @@ -22392,7 +22473,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_r = ((PyObject *)__pyx_v_m); goto __pyx_L0; - /* "pykeyvi.pyx":897 + /* "pykeyvi.pyx":907 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< @@ -22417,7 +22498,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m return __pyx_r; } -/* "pykeyvi.pyx":940 +/* "pykeyvi.pyx":950 * # self.it = it * * def __iter__(self): # <<<<<<<<<<<<<< @@ -22443,7 +22524,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator___iter__(struct __pyx_obj_7py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "pykeyvi.pyx":941 + /* "pykeyvi.pyx":951 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -22455,7 +22536,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator___iter__(struct __pyx_obj_7py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":940 + /* "pykeyvi.pyx":950 * # self.it = it * * def __iter__(self): # <<<<<<<<<<<<<< @@ -22470,7 +22551,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator___iter__(struct __pyx_obj_7py return __pyx_r; } -/* "pykeyvi.pyx":949 +/* "pykeyvi.pyx":959 * # del self.end * * def __next__(self): # <<<<<<<<<<<<<< @@ -22503,7 +22584,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); - /* "pykeyvi.pyx":952 + /* "pykeyvi.pyx":962 * # This works correctly by using "*it" and "*end" in the code, * #if co.dereference( self.it ) == co.dereference( self.end ) : * if self.it == self.end: # <<<<<<<<<<<<<< @@ -22513,20 +22594,20 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p __pyx_t_1 = ((__pyx_v_self->it == __pyx_v_self->end) != 0); if (__pyx_t_1) { - /* "pykeyvi.pyx":954 + /* "pykeyvi.pyx":964 * if self.it == self.end: * * raise StopIteration() # <<<<<<<<<<<<<< * cdef _Match * _r = new _Match(co.dereference( self.it )) * */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_StopIteration); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_StopIteration); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":952 + /* "pykeyvi.pyx":962 * # This works correctly by using "*it" and "*end" in the code, * #if co.dereference( self.it ) == co.dereference( self.end ) : * if self.it == self.end: # <<<<<<<<<<<<<< @@ -22535,7 +22616,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ } - /* "pykeyvi.pyx":955 + /* "pykeyvi.pyx":965 * * raise StopIteration() * cdef _Match * _r = new _Match(co.dereference( self.it )) # <<<<<<<<<<<<<< @@ -22544,7 +22625,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ __pyx_v__r = new keyvi::dictionary::Match((*__pyx_v_self->it)); - /* "pykeyvi.pyx":958 + /* "pykeyvi.pyx":968 * * # This also does the expected thing. * co.preincrement( self.it ) # <<<<<<<<<<<<<< @@ -22553,20 +22634,20 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ (++__pyx_v_self->it); - /* "pykeyvi.pyx":960 + /* "pykeyvi.pyx":970 * co.preincrement( self.it ) * * cdef Match py_result = Match.__new__(Match) # <<<<<<<<<<<<<< * py_result.inst = shared_ptr[_Match](_r) * */ - __pyx_t_2 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_2); __pyx_t_2 = 0; - /* "pykeyvi.pyx":961 + /* "pykeyvi.pyx":971 * * cdef Match py_result = Match.__new__(Match) * py_result.inst = shared_ptr[_Match](_r) # <<<<<<<<<<<<<< @@ -22575,7 +22656,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ __pyx_v_py_result->inst = boost::shared_ptr (__pyx_v__r); - /* "pykeyvi.pyx":963 + /* "pykeyvi.pyx":973 * py_result.inst = shared_ptr[_Match](_r) * * return py_result # <<<<<<<<<<<<<< @@ -22587,7 +22668,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":949 + /* "pykeyvi.pyx":959 * # del self.end * * def __next__(self): # <<<<<<<<<<<<<< @@ -23679,8 +23760,7 @@ static PyTypeObject __pyx_type_7pykeyvi_ForwardBackwardCompletion = { #endif }; -static PyObject *__pyx_tp_new_7pykeyvi_CompletionDictionaryCompiler(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *p; +static PyObject *__pyx_tp_new_7pykeyvi_loading_strategy_types(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); @@ -23688,45 +23768,124 @@ static PyObject *__pyx_tp_new_7pykeyvi_CompletionDictionaryCompiler(PyTypeObject o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)o); - new((void*)&(p->inst)) boost::shared_ptr (); return o; } -static void __pyx_tp_dealloc_7pykeyvi_CompletionDictionaryCompiler(PyObject *o) { - struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *p = (struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)o; +static void __pyx_tp_dealloc_7pykeyvi_loading_strategy_types(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_1__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } - __Pyx_call_destructor(p->inst); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_mp_ass_subscript_7pykeyvi_CompletionDictionaryCompiler(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_3__setitem__(o, i, v); - } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); - return -1; - } -} - -static PyMethodDef __pyx_methods_7pykeyvi_CompletionDictionaryCompiler[] = { - {"Add", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_5Add, METH_VARARGS|METH_KEYWORDS, 0}, - {"_init_0", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_7_init_0, METH_NOARGS, 0}, - {"_init_1", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_9_init_1, METH_O, 0}, +static PyTypeObject __pyx_type_7pykeyvi_loading_strategy_types = { + PyVarObject_HEAD_INIT(0, 0) + "pykeyvi.loading_strategy_types", /*tp_name*/ + sizeof(struct __pyx_obj_7pykeyvi_loading_strategy_types), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_7pykeyvi_loading_strategy_types, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_7pykeyvi_loading_strategy_types, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_7pykeyvi_CompletionDictionaryCompiler(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)o); + new((void*)&(p->inst)) boost::shared_ptr (); + return o; +} + +static void __pyx_tp_dealloc_7pykeyvi_CompletionDictionaryCompiler(PyObject *o) { + struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *p = (struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_1__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + __Pyx_call_destructor(p->inst); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_mp_ass_subscript_7pykeyvi_CompletionDictionaryCompiler(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_3__setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyMethodDef __pyx_methods_7pykeyvi_CompletionDictionaryCompiler[] = { + {"Add", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_5Add, METH_VARARGS|METH_KEYWORDS, 0}, + {"_init_0", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_7_init_0, METH_NOARGS, 0}, + {"_init_1", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_9_init_1, METH_O, 0}, {"_init_2", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_11_init_2, METH_VARARGS|METH_KEYWORDS, 0}, {"WriteToFile", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_15WriteToFile, METH_O, 0}, {"__enter__", (PyCFunction)__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_17__enter__, METH_NOARGS, 0}, @@ -27440,7 +27599,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_arg_greedy_wrong_type, __pyx_k_arg_greedy_wrong_type, sizeof(__pyx_k_arg_greedy_wrong_type), 0, 0, 1, 0}, {&__pyx_kp_s_arg_in_0_wrong_type, __pyx_k_arg_in_0_wrong_type, sizeof(__pyx_k_arg_in_0_wrong_type), 0, 0, 1, 0}, {&__pyx_kp_s_arg_in_1_wrong_type, __pyx_k_arg_in_1_wrong_type, sizeof(__pyx_k_arg_in_1_wrong_type), 0, 0, 1, 0}, - {&__pyx_kp_s_arg_load_lazy_wrong_type, __pyx_k_arg_load_lazy_wrong_type, sizeof(__pyx_k_arg_load_lazy_wrong_type), 0, 0, 1, 0}, {&__pyx_kp_s_arg_m_wrong_type, __pyx_k_arg_m_wrong_type, sizeof(__pyx_k_arg_m_wrong_type), 0, 0, 1, 0}, {&__pyx_kp_s_arg_matched_string_wrong_type, __pyx_k_arg_matched_string_wrong_type, sizeof(__pyx_k_arg_matched_string_wrong_type), 0, 0, 1, 0}, {&__pyx_kp_s_arg_max_edit_distance_wrong_type, __pyx_k_arg_max_edit_distance_wrong_type, sizeof(__pyx_k_arg_max_edit_distance_wrong_type), 0, 0, 1, 0}, @@ -27476,7 +27634,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_key_iterator_wrapper, __pyx_k_key_iterator_wrapper, sizeof(__pyx_k_key_iterator_wrapper), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, - {&__pyx_n_s_load_lazy, __pyx_k_load_lazy, sizeof(__pyx_k_load_lazy), 0, 0, 1, 1}, + {&__pyx_n_s_lazy, __pyx_k_lazy, sizeof(__pyx_k_lazy), 0, 0, 1, 1}, + {&__pyx_n_s_lazy_no_readahead, __pyx_k_lazy_no_readahead, sizeof(__pyx_k_lazy_no_readahead), 0, 0, 1, 1}, + {&__pyx_n_s_lazy_no_readahead_value_part, __pyx_k_lazy_no_readahead_value_part, sizeof(__pyx_k_lazy_no_readahead_value_part), 0, 0, 1, 1}, {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, @@ -27485,6 +27645,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_minimum_prefix_length, __pyx_k_minimum_prefix_length, sizeof(__pyx_k_minimum_prefix_length), 0, 0, 1, 1}, {&__pyx_n_s_msgpack, __pyx_k_msgpack, sizeof(__pyx_k_msgpack), 0, 0, 1, 1}, {&__pyx_n_s_number_of_fields, __pyx_k_number_of_fields, sizeof(__pyx_k_number_of_fields), 0, 0, 1, 1}, + {&__pyx_n_s_populate, __pyx_k_populate, sizeof(__pyx_k_populate), 0, 0, 1, 1}, + {&__pyx_n_s_populate_key_part, __pyx_k_populate_key_part, sizeof(__pyx_k_populate_key_part), 0, 0, 1, 1}, + {&__pyx_n_s_populate_key_part_no_readahead_v, __pyx_k_populate_key_part_no_readahead_v, sizeof(__pyx_k_populate_key_part_no_readahead_v), 0, 0, 1, 1}, + {&__pyx_n_s_populate_lazy, __pyx_k_populate_lazy, sizeof(__pyx_k_populate_lazy), 0, 0, 1, 1}, {&__pyx_n_s_py_result, __pyx_k_py_result, sizeof(__pyx_k_py_result), 0, 0, 1, 1}, {&__pyx_n_s_pykeyvi, __pyx_k_pykeyvi, sizeof(__pyx_k_pykeyvi), 0, 0, 1, 1}, {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, @@ -27508,11 +27672,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -27522,153 +27686,153 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "pykeyvi.pyx":308 + /* "pykeyvi.pyx":309 * def get (self, key, default = None): * if isinstance(key, unicode): * key = key.encode('utf-8') # <<<<<<<<<<<<<< * assert isinstance(key, bytes), 'arg in_0 wrong type' * */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "pykeyvi.pyx":321 + /* "pykeyvi.pyx":322 * def __contains__(self, key): * if isinstance(key, unicode): * key = key.encode('utf-8') # <<<<<<<<<<<<<< * * assert isinstance(key, bytes), 'arg in_0 wrong type' */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "pykeyvi.pyx":332 + /* "pykeyvi.pyx":333 * def __getitem__ (self, key): * if isinstance(key, unicode): * key = key.encode('utf-8') # <<<<<<<<<<<<<< * * assert isinstance(key, bytes), 'arg in_0 wrong type' */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "pykeyvi.pyx":389 + /* "pykeyvi.pyx":390 * return {k: json.loads(v) for k, v in filter( * lambda kv: kv and isinstance(kv, list) and len(kv) > 1 and kv[1], * [s.rstrip().split("\n") for s in py_result.split("\n\n")] # <<<<<<<<<<<<<< * )} * */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s__6); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s__6); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "pykeyvi.pyx":823 + /* "pykeyvi.pyx":833 * def GetAttribute(self, key): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * py_result = self.inst.get().GetAttributePy( key) */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "pykeyvi.pyx":831 + /* "pykeyvi.pyx":841 * def SetAttribute(self, key, value): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * t = type(value) */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "pykeyvi.pyx":837 + /* "pykeyvi.pyx":847 * self.inst.get().SetAttribute( key, value) * elif t == unicode: * value_utf8 = value.encode("utf-8") # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "pykeyvi.pyx":847 + /* "pykeyvi.pyx":857 * self.inst.get().SetAttribute( key, value) * else: * raise Exception("Unsupported Value Type") # <<<<<<<<<<<<<< * * */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_Value_Type); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_Value_Type); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "pykeyvi.pyx":857 + /* "pykeyvi.pyx":867 * * elif value[0] == '\x00': * return msgpack.loads(value[1:]) # <<<<<<<<<<<<<< * * elif value[0] == '\x01': */ - __pyx_slice__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__13); __Pyx_GIVEREF(__pyx_slice__13); - /* "pykeyvi.pyx":860 + /* "pykeyvi.pyx":870 * * elif value[0] == '\x01': * value = zlib.decompress(value[1:]) # <<<<<<<<<<<<<< * * elif value[0] == '\x02': */ - __pyx_slice__15 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__15 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__15); __Pyx_GIVEREF(__pyx_slice__15); - /* "pykeyvi.pyx":863 + /* "pykeyvi.pyx":873 * * elif value[0] == '\x02': * value = snappy.decompress(value[1:]) # <<<<<<<<<<<<<< * * return msgpack.loads(value) */ - __pyx_slice__17 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__17 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__17); __Pyx_GIVEREF(__pyx_slice__17); - /* "pykeyvi.pyx":33 + /* "pykeyvi.pyx":34 * char * _cast_const_away(char *) * * def JumpConsistentHashString(bytes in_0 , in_1 ): # <<<<<<<<<<<<<< * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' */ - __pyx_tuple__18 = PyTuple_Pack(5, __pyx_n_s_in_0, __pyx_n_s_in_1, __pyx_n_s_input_in_0, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__18 = PyTuple_Pack(5, __pyx_n_s_in_0, __pyx_n_s_in_1, __pyx_n_s_input_in_0, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hendrik_dev_git_cliqz_keyv, __pyx_n_s_JumpConsistentHashString, 33, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hendrik_dev_git_cliqz_keyv, __pyx_n_s_JumpConsistentHashString, 34, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":897 + /* "pykeyvi.pyx":907 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< * m=Match() * unserialized = msgpack.loads(serialized_match) */ - __pyx_tuple__20 = PyTuple_Pack(4, __pyx_n_s_serialized_match, __pyx_n_s_m, __pyx_n_s_unserialized, __pyx_n_s_number_of_fields); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__20 = PyTuple_Pack(4, __pyx_n_s_serialized_match, __pyx_n_s_m, __pyx_n_s_unserialized, __pyx_n_s_number_of_fields); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hendrik_dev_git_cliqz_keyv, __pyx_n_s_loads, 897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hendrik_dev_git_cliqz_keyv, __pyx_n_s_loads, 907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -27683,6 +27847,11 @@ static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -27775,141 +27944,145 @@ PyMODINIT_FUNC PyInit_pykeyvi(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_7pykeyvi_JsonDictionaryMerger) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_JsonDictionaryMerger) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_JsonDictionaryMerger.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "JsonDictionaryMerger", (PyObject *)&__pyx_type_7pykeyvi_JsonDictionaryMerger) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "JsonDictionaryMerger", (PyObject *)&__pyx_type_7pykeyvi_JsonDictionaryMerger) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_JsonDictionaryMerger = &__pyx_type_7pykeyvi_JsonDictionaryMerger; - if (PyType_Ready(&__pyx_type_7pykeyvi_StringDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_StringDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_StringDictionaryCompiler.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "StringDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_StringDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "StringDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_StringDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_StringDictionaryCompiler = &__pyx_type_7pykeyvi_StringDictionaryCompiler; - if (PyType_Ready(&__pyx_type_7pykeyvi_JsonDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_JsonDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_JsonDictionaryCompiler.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "JsonDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_JsonDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "JsonDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_JsonDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_JsonDictionaryCompiler = &__pyx_type_7pykeyvi_JsonDictionaryCompiler; - if (PyType_Ready(&__pyx_type_7pykeyvi_Dictionary) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_Dictionary) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_Dictionary.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "Dictionary", (PyObject *)&__pyx_type_7pykeyvi_Dictionary) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "Dictionary", (PyObject *)&__pyx_type_7pykeyvi_Dictionary) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_Dictionary = &__pyx_type_7pykeyvi_Dictionary; - if (PyType_Ready(&__pyx_type_7pykeyvi_FsaTransform) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_FsaTransform) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_FsaTransform.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "FsaTransform", (PyObject *)&__pyx_type_7pykeyvi_FsaTransform) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "FsaTransform", (PyObject *)&__pyx_type_7pykeyvi_FsaTransform) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_FsaTransform = &__pyx_type_7pykeyvi_FsaTransform; - if (PyType_Ready(&__pyx_type_7pykeyvi_PrefixCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_PrefixCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_PrefixCompletion.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "PrefixCompletion", (PyObject *)&__pyx_type_7pykeyvi_PrefixCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "PrefixCompletion", (PyObject *)&__pyx_type_7pykeyvi_PrefixCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_PrefixCompletion = &__pyx_type_7pykeyvi_PrefixCompletion; - if (PyType_Ready(&__pyx_type_7pykeyvi_ForwardBackwardCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_ForwardBackwardCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_ForwardBackwardCompletion.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "ForwardBackwardCompletion", (PyObject *)&__pyx_type_7pykeyvi_ForwardBackwardCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "ForwardBackwardCompletion", (PyObject *)&__pyx_type_7pykeyvi_ForwardBackwardCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_ForwardBackwardCompletion = &__pyx_type_7pykeyvi_ForwardBackwardCompletion; - if (PyType_Ready(&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_loading_strategy_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_7pykeyvi_loading_strategy_types.tp_print = 0; + if (PyObject_SetAttrString(__pyx_m, "loading_strategy_types", (PyObject *)&__pyx_type_7pykeyvi_loading_strategy_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_7pykeyvi_loading_strategy_types = &__pyx_type_7pykeyvi_loading_strategy_types; + if (PyType_Ready(&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_CompletionDictionaryCompiler.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "CompletionDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "CompletionDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_CompletionDictionaryCompiler = &__pyx_type_7pykeyvi_CompletionDictionaryCompiler; - if (PyType_Ready(&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_MultiWordCompletion.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "MultiWordCompletion", (PyObject *)&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "MultiWordCompletion", (PyObject *)&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_MultiWordCompletion = &__pyx_type_7pykeyvi_MultiWordCompletion; - if (PyType_Ready(&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_PredictiveCompression.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "PredictiveCompression", (PyObject *)&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "PredictiveCompression", (PyObject *)&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_PredictiveCompression = &__pyx_type_7pykeyvi_PredictiveCompression; - if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryGenerator", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryGenerator", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_KeyOnlyDictionaryGenerator = &__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator; - if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_KeyOnlyDictionaryCompiler = &__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler; - if (PyType_Ready(&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_Match.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "Match", (PyObject *)&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "Match", (PyObject *)&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_Match = &__pyx_type_7pykeyvi_Match; - if (PyType_Ready(&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_MatchIterator.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "MatchIterator", (PyObject *)&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "MatchIterator", (PyObject *)&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_MatchIterator = &__pyx_type_7pykeyvi_MatchIterator; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct___init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct___init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct___init_2.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct___init_2 = &__pyx_type_7pykeyvi___pyx_scope_struct___init_2; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_1_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_1_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_1_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_2_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_2_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_2_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_3___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_3___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_3___init__.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_3___init__ = &__pyx_type_7pykeyvi___pyx_scope_struct_3___init__; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_4_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_4_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_4_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_4_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_4_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_5_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_5_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_5_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_5_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_5_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_6__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_6__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_6__init_2.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_6__init_2 = &__pyx_type_7pykeyvi___pyx_scope_struct_6__init_2; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_7_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_7_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_7_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_7_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_7_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_8_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_8_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_8_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_8_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_8_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_9___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_9___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_9___init__.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_9___init__ = &__pyx_type_7pykeyvi___pyx_scope_struct_9___init__; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_10_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_10_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_10_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_10_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_10_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_11_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_11_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_11_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_11_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_11_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_12__key_iterator_wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_12__key_iterator_wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_12__key_iterator_wrapper.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_12__key_iterator_wrapper = &__pyx_type_7pykeyvi___pyx_scope_struct_12__key_iterator_wrapper; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_13__value_iterator_wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_13__value_iterator_wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_13__value_iterator_wrapper.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_13__value_iterator_wrapper = &__pyx_type_7pykeyvi___pyx_scope_struct_13__value_iterator_wrapper; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper = &__pyx_type_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_15__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_15__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_15__init_2.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_15__init_2 = &__pyx_type_7pykeyvi___pyx_scope_struct_15__init_2; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_16_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_17_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_18___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_18___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_18___init__.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_18___init__ = &__pyx_type_7pykeyvi___pyx_scope_struct_18___init__; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_19_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_20_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_21__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_21__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_21__init_2.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_21__init_2 = &__pyx_type_7pykeyvi___pyx_scope_struct_21__init_2; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_22_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_23_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_24___init__.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_24___init__ = &__pyx_type_7pykeyvi___pyx_scope_struct_24___init__; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_25_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_26_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr; /*--- Type import code ---*/ @@ -27927,122 +28100,192 @@ PyMODINIT_FUNC PyInit_pykeyvi(void) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif - /* "pykeyvi.pyx":33 + /* "pykeyvi.pyx":34 * char * _cast_const_away(char *) * * def JumpConsistentHashString(bytes in_0 , in_1 ): # <<<<<<<<<<<<<< * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7pykeyvi_1JumpConsistentHashString, NULL, __pyx_n_s_pykeyvi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7pykeyvi_1JumpConsistentHashString, NULL, __pyx_n_s_pykeyvi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_JumpConsistentHashString, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_JumpConsistentHashString, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":897 + /* "pykeyvi.pyx":490 + * + * cdef class loading_strategy_types: + * lazy = 0 # <<<<<<<<<<<<<< + * populate = 1 + * populate_key_part = 2 + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":491 + * cdef class loading_strategy_types: + * lazy = 0 + * populate = 1 # <<<<<<<<<<<<<< + * populate_key_part = 2 + * populate_lazy = 3 + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":492 + * lazy = 0 + * populate = 1 + * populate_key_part = 2 # <<<<<<<<<<<<<< + * populate_lazy = 3 + * lazy_no_readahead = 4 + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_key_part, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":493 + * populate = 1 + * populate_key_part = 2 + * populate_lazy = 3 # <<<<<<<<<<<<<< + * lazy_no_readahead = 4 + * lazy_no_readahead_value_part = 5 + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_lazy, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":494 + * populate_key_part = 2 + * populate_lazy = 3 + * lazy_no_readahead = 4 # <<<<<<<<<<<<<< + * lazy_no_readahead_value_part = 5 + * populate_key_part_no_readahead_value_part = 6 + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy_no_readahead, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":495 + * populate_lazy = 3 + * lazy_no_readahead = 4 + * lazy_no_readahead_value_part = 5 # <<<<<<<<<<<<<< + * populate_key_part_no_readahead_value_part = 6 + * + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy_no_readahead_value_part, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":496 + * lazy_no_readahead = 4 + * lazy_no_readahead_value_part = 5 + * populate_key_part_no_readahead_value_part = 6 # <<<<<<<<<<<<<< + * + * cdef class CompletionDictionaryCompiler: + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_key_part_no_readahead_v, __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":907 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< * m=Match() * unserialized = msgpack.loads(serialized_match) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7pykeyvi_5Match_45loads, NULL, __pyx_n_s_pykeyvi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7pykeyvi_5Match_45loads, NULL, __pyx_n_s_pykeyvi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "pykeyvi.pyx":896 + /* "pykeyvi.pyx":906 * self.inst.get().SetRawValue( str) * * @staticmethod # <<<<<<<<<<<<<< * def loads(serialized_match): * m=Match() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_7pykeyvi_Match); - /* "pykeyvi.pyx":897 + /* "pykeyvi.pyx":907 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< * m=Match() * unserialized = msgpack.loads(serialized_match) */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_7pykeyvi_Match, __pyx_n_s_loads); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_7pykeyvi_Match, __pyx_n_s_loads); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "pykeyvi.pyx":896 + /* "pykeyvi.pyx":906 * self.inst.get().SetRawValue( str) * * @staticmethod # <<<<<<<<<<<<<< * def loads(serialized_match): * m=Match() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_7pykeyvi_Match); - /* "pykeyvi.pyx":919 + /* "pykeyvi.pyx":929 * from libc.stdint cimport uint32_t * * import json # <<<<<<<<<<<<<< * import msgpack * import zlib */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":920 + /* "pykeyvi.pyx":930 * * import json * import msgpack # <<<<<<<<<<<<<< * import zlib * import snappy */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_msgpack, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_msgpack, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_msgpack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_msgpack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":921 + /* "pykeyvi.pyx":931 * import json * import msgpack * import zlib # <<<<<<<<<<<<<< * import snappy * */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_zlib, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_zlib, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_zlib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_zlib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":922 + /* "pykeyvi.pyx":932 * import msgpack * import zlib * import snappy # <<<<<<<<<<<<<< * * # same import style as autowrap */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_snappy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_snappy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_snappy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_snappy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pykeyvi.pyx":1 @@ -28745,6 +28988,94 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { return 0; } +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" +#endif + +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { + if (op1 == op2) { + Py_RETURN_TRUE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a == b) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a; + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + if (likely(__Pyx_sst_abs(size) <= 1)) { + a = likely(size) ? digits[0] : 0; + if (size == -1) a = -a; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } + #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 + default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); + #else + default: Py_RETURN_FALSE; + #endif + } + } + if (a == b) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a == (double)b) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } + } + return PyObject_RichCompare(op1, op2, Py_EQ); +} +#endif + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; @@ -29944,23 +30275,19 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, return (target_type) value;\ } -#if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" -#endif - -static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) { - const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(uint32_t) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x)) + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } - return (uint32_t) val; + return (int) val; } } else #endif @@ -29969,32 +30296,32 @@ static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (uint32_t) 0; - case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0]) + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: - if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) { - return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: - if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) { - return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: - if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT) { - return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; @@ -30008,39 +30335,223 @@ static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) { { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) - return (uint32_t) -1; + return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif - if (sizeof(uint32_t) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x)) - } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (uint32_t) 0; - case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, -(sdigit) digits[0]) - case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, +digits[0]) + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: - if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) { - return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: - if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) { - return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); - } + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) { + const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(uint32_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (uint32_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (uint32_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0]) + case 2: + if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) { + return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) { + return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT) { + return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (uint32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(uint32_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (uint32_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, -(sdigit) digits[0]) + case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, +digits[0]) + case -2: + if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) { + return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) { + return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } } break; case -3: @@ -30368,190 +30879,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { } } -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if (sizeof(int) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (int) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (int) 0; - case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { - return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { - return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { - return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if (sizeof(int) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (int) 0; - case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) - case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: - if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: - if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: - if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } -#endif - if (sizeof(int) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - int val; - PyObject *v = __Pyx_PyNumber_Int(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } - #endif - if (likely(v)) { - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - int ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); - Py_DECREF(v); - if (likely(!ret)) - return val; - } -#endif - return (int) -1; - } - } else { - int val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (int) -1; - val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); - return (int) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; -} - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; diff --git a/pykeyvi/src/pykeyvi.pyx b/pykeyvi/src/pykeyvi.pyx index a8ed8ed7..2edd8a7b 100644 --- a/pykeyvi/src/pykeyvi.pyx +++ b/pykeyvi/src/pykeyvi.pyx @@ -11,6 +11,7 @@ from libc.string cimport const_char from cython.operator cimport dereference as deref, preincrement as inc, address as address from cython.operator cimport dereference, preincrement cimport cython.operator as co +from dictionary cimport loading_strategy_types as _loading_strategy_types from cluster cimport JumpConsistentHashString as _JumpConsistentHashString_cluster from dictionary_compiler cimport CompletionDictionaryCompiler as _CompletionDictionaryCompiler from dictionary cimport Dictionary as _Dictionary @@ -279,17 +280,17 @@ cdef class Dictionary: cdef const_char * input_filename = filename self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename)) - def _init_1(self, bytes filename , load_lazy ): + def _init_1(self, bytes filename , int in_1 ): assert isinstance(filename, bytes), 'arg filename wrong type' - assert isinstance(load_lazy, (int, long)), 'arg load_lazy wrong type' + assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' cdef const_char * input_filename = filename - self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (load_lazy))) + self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (<_loading_strategy_types>in_1))) def __init__(self, *args): if (len(args)==1) and (isinstance(args[0], bytes)): self._init_0(*args) - elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): + elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): self._init_1(*args) else: raise Exception('can not handle type of %s' % (args,)) @@ -485,6 +486,15 @@ cdef class ForwardBackwardCompletion: cdef shared_ptr[_Dictionary] input_in_1 = in_1.inst self.inst = shared_ptr[_ForwardBackwardCompletion](new _ForwardBackwardCompletion(input_in_0, input_in_1)) +cdef class loading_strategy_types: + lazy = 0 + populate = 1 + populate_key_part = 2 + populate_lazy = 3 + lazy_no_readahead = 4 + lazy_no_readahead_value_part = 5 + populate_key_part_no_readahead_value_part = 6 + cdef class CompletionDictionaryCompiler: cdef shared_ptr[_CompletionDictionaryCompiler] inst From cd2ba4623ccea4bc28386eca341a98aaf3180813 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Thu, 19 May 2016 16:55:42 +0200 Subject: [PATCH 2/2] implement comments from review, add (noop) implementation for Win32 , add some more loading tests --- keyvi/src/cpp/dictionary/dictionary.h | 6 +- keyvi/src/cpp/dictionary/fsa/automata.h | 15 +- .../fsa/internal/json_value_store.h | 8 +- .../fsa/internal/memory_map_flags.h | 72 +- .../fsa/internal/string_value_store.h | 8 +- .../fsa/internal/memory_map_flags_test.cpp | 16 +- pykeyvi/src/pxds/dictionary.pxd | 1 + pykeyvi/src/pykeyvi.cpp | 2107 +++++++++-------- pykeyvi/src/pykeyvi.pyx | 19 +- pykeyvi/tests/dictionary/loading_test.py | 49 + 10 files changed, 1199 insertions(+), 1102 deletions(-) create mode 100644 pykeyvi/tests/dictionary/loading_test.py diff --git a/keyvi/src/cpp/dictionary/dictionary.h b/keyvi/src/cpp/dictionary/dictionary.h index 74e6e8db..f4923bcd 100644 --- a/keyvi/src/cpp/dictionary/dictionary.h +++ b/keyvi/src/cpp/dictionary/dictionary.h @@ -50,7 +50,7 @@ final { * @param load_lazy whether to load lazy. */ Dictionary(const char* filename, bool load_lazy) - : fsa_(new fsa::Automata(filename, load_lazy)) { + : fsa_(std::make_shared(filename, load_lazy)) { TRACE("Dictionary from file %s", filename); } @@ -60,8 +60,8 @@ final { * @param filename filename to load keyvi file from. * @param loading_strategy optional: Loading strategy to use. */ - Dictionary(const char* filename, loading_strategy_types loading_strategy = loading_strategy_types::lazy) - : fsa_(new fsa::Automata(filename, loading_strategy)) { + explicit Dictionary(const char* filename, loading_strategy_types loading_strategy = loading_strategy_types::lazy) + : fsa_(std::make_shared(filename, loading_strategy)) { TRACE("Dictionary from file %s", filename); } diff --git a/keyvi/src/cpp/dictionary/fsa/automata.h b/keyvi/src/cpp/dictionary/fsa/automata.h index 0628d50a..9c51277a 100644 --- a/keyvi/src/cpp/dictionary/fsa/automata.h +++ b/keyvi/src/cpp/dictionary/fsa/automata.h @@ -53,9 +53,9 @@ final { public: Automata(const char * filename, bool load_lazy): - Automata(filename, load_lazy ? default_loading_strategy : loading_strategy_types::populate) {} + Automata(filename, load_lazy ? loading_strategy_types::default_os : loading_strategy_types::populate) {} - Automata(const char * filename, loading_strategy_types loading_strategy = loading_strategy_types::lazy) { + explicit Automata(const char * filename, loading_strategy_types loading_strategy = loading_strategy_types::lazy) { std::ifstream in_stream(filename, std::ios::binary); if (!in_stream.good()) { @@ -95,7 +95,7 @@ final { throw std::invalid_argument("file is corrupt(truncated)"); } - boost::interprocess::map_options_t map_options = internal::MemoryMapFlags::FSAGetMemoryMapOptions(loading_strategy); + const boost::interprocess::map_options_t map_options = internal::MemoryMapFlags::FSAGetMemoryMapOptions(loading_strategy); TRACE("labels start offset: %d", offset); labels_region_ = new boost::interprocess::mapped_region( @@ -106,12 +106,11 @@ final { *file_mapping_, boost::interprocess::read_only, offset + array_size, bucket_size * array_size, 0, map_options); - auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); + const auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); + + labels_region_->advise(advise); + transitions_region_->advise(advise); - if (advise != -1) { - labels_region_->advise(advise); - transitions_region_->advise(advise); - } TRACE("full file size %zu", offset + array_size + bucket_size * array_size); labels_ = (unsigned char*) labels_region_->get_address(); diff --git a/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h b/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h index ec8945c3..b94cfa91 100644 --- a/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h +++ b/keyvi/src/cpp/dictionary/fsa/internal/json_value_store.h @@ -291,17 +291,15 @@ class JsonValueStoreReader final: public IValueStoreReader { } } - boost::interprocess::map_options_t map_options = boost::interprocess::default_map_options; + const boost::interprocess::map_options_t map_options = internal::MemoryMapFlags::ValuesGetMemoryMapOptions(loading_strategy); strings_region_ = new boost::interprocess::mapped_region( *file_mapping, boost::interprocess::read_only, offset, strings_size, 0, map_options); - auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); + const auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); - if (advise != -1) { - strings_region_->advise(advise); - } + strings_region_->advise(advise); strings_ = (const char*) strings_region_->get_address(); } diff --git a/keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h b/keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h index 4cbc35b3..38dd6b3b 100644 --- a/keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h +++ b/keyvi/src/cpp/dictionary/fsa/internal/memory_map_flags.h @@ -31,16 +31,16 @@ namespace keyvi { namespace dictionary { -typedef enum { lazy, // load data as needed with some read-ahead +enum class loading_strategy_types { + default_os, // no special treatment, use whatever the OS/Boost has as default + lazy, // load data as needed with some read-ahead populate, // immediately load everything in memory (blocks until everything is fully read) populate_key_part, // populate only the key part, load value part lazy populate_lazy, // load data lazy but ask the OS to read ahead if possible (does not block) lazy_no_readahead, // disable any read-ahead (for cases when index > x * main memory) lazy_no_readahead_value_part, // disable read-ahead only for the value part populate_key_part_no_readahead_value_part // populate the key part, but disable read ahead value part - } loading_strategy_types; - -static const loading_strategy_types default_loading_strategy = loading_strategy_types(-1); + }; namespace fsa { namespace internal { @@ -54,7 +54,13 @@ class MemoryMapFlags final{ * @return flags to be used for mmap (via boost). */ static int FSAGetMemoryMapOptions(const loading_strategy_types strategy) { - if (strategy == default_loading_strategy) { +#ifdef _Win32 + + // there is no comparable fine-grained control on windows, so simply use the defaults + return boost::interprocess::default_map_options; +#else // not _Win32 + + if (strategy == loading_strategy_types::default_os) { return boost::interprocess::default_map_options; } @@ -67,9 +73,9 @@ class MemoryMapFlags final{ #endif switch (strategy){ - case populate: - case populate_key_part: - case populate_key_part_no_readahead_value_part: + case loading_strategy_types::populate: + case loading_strategy_types::populate_key_part: + case loading_strategy_types::populate_key_part_no_readahead_value_part: flags |= MAP_POPULATE; break; default: @@ -77,6 +83,7 @@ class MemoryMapFlags final{ } return flags; +#endif // not _Win32 } /** @@ -86,12 +93,17 @@ class MemoryMapFlags final{ * @return flags to be used for mmap (via boost). */ static int ValuesGetMemoryMapOptions(const loading_strategy_types strategy) { - int flags = 0; +#ifdef _Win32 + + // there is no comparable fine-grained control on windows, so simply use the defaults + return boost::interprocess::default_map_options; +#else // not _Win32 - if (strategy == default_loading_strategy) { + if (strategy == loading_strategy_types::default_os) { return boost::interprocess::default_map_options; } + int flags = 0; flags |= MAP_SHARED; #ifdef MAP_NOSYNC @@ -99,7 +111,7 @@ class MemoryMapFlags final{ #endif switch (strategy){ - case populate: + case loading_strategy_types::populate: flags |= MAP_POPULATE; break; default: @@ -107,49 +119,63 @@ class MemoryMapFlags final{ } return flags; +#endif // not _Win32 } + /** * Translates the loading strategy into the according options for madvise. To be used for loading the FSA part. * * @param strategy load strategy - * @return advise to be used for madvise (via boost). + * @return advise to be used for madvise (via boost) */ static boost::interprocess::mapped_region::advice_types FSAGetMemoryMapAdvices(const loading_strategy_types strategy) { +#ifdef _Win32 + + // there is no madvise on windows, so simply use the default + return boost::interprocess::mapped_region::advice_types::advice_normal; +#else // _Win32 switch (strategy){ - case lazy_no_readahead: + case loading_strategy_types::lazy_no_readahead: return boost::interprocess::mapped_region::advice_types::advice_random; - case lazy_no_readahead_value_part: - case populate_key_part_no_readahead_value_part: + case loading_strategy_types::lazy_no_readahead_value_part: + case loading_strategy_types::populate_key_part_no_readahead_value_part: break; - case populate_lazy: + case loading_strategy_types::populate_lazy: return boost::interprocess::mapped_region::advice_types::advice_willneed; default: break; } - return (boost::interprocess::mapped_region::advice_types) -1; + return boost::interprocess::mapped_region::advice_types::advice_normal; +#endif } /** * Translates the loading strategy into the according options for madvise. To be used for loading the Values part. * * @param strategy load strategy - * @return advise to be used for madvise (via boost). + * @return advise to be used for madvise (via boost) */ static boost::interprocess::mapped_region::advice_types ValuesGetMemoryMapAdvices(const loading_strategy_types strategy) { +#ifdef _Win32 + + // there is no madvise on windows, so simply use the default + return boost::interprocess::mapped_region::advice_types::advice_normal; +#else // _Win32 switch (strategy){ - case lazy_no_readahead: - case lazy_no_readahead_value_part: - case populate_key_part_no_readahead_value_part: + case loading_strategy_types::lazy_no_readahead: + case loading_strategy_types::lazy_no_readahead_value_part: + case loading_strategy_types::populate_key_part_no_readahead_value_part: return boost::interprocess::mapped_region::advice_types::advice_random; - case populate_lazy: + case loading_strategy_types::populate_lazy: return boost::interprocess::mapped_region::advice_types::advice_willneed; default: break; } - return (boost::interprocess::mapped_region::advice_types) -1; + return boost::interprocess::mapped_region::advice_types::advice_normal; +#endif } }; diff --git a/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h b/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h index 7d4fba54..8a7db085 100644 --- a/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h +++ b/keyvi/src/cpp/dictionary/fsa/internal/string_value_store.h @@ -265,17 +265,15 @@ class StringValueStore final : public IValueStoreWriter { } } - boost::interprocess::map_options_t map_options = boost::interprocess::default_map_options; + const boost::interprocess::map_options_t map_options = internal::MemoryMapFlags::ValuesGetMemoryMapOptions(loading_strategy); strings_region_ = new boost::interprocess::mapped_region( *file_mapping, boost::interprocess::read_only, offset, strings_size, 0, map_options); - auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); + const auto advise = internal::MemoryMapFlags::ValuesGetMemoryMapAdvices(loading_strategy); - if (advise != -1) { - strings_region_->advise(advise); - } + strings_region_->advise(advise); strings_ = (const char*) strings_region_->get_address(); } diff --git a/keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp b/keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp index 99d57418..8e8b7890 100644 --- a/keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp +++ b/keyvi/tests/cpp/dictionary/fsa/internal/memory_map_flags_test.cpp @@ -46,8 +46,8 @@ BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestLazy ) { BOOST_CHECK((key_flags & MAP_POPULATE) == 0); BOOST_CHECK((value_flags & MAP_POPULATE) == 0); - BOOST_CHECK(key_advise_flags == -1); - BOOST_CHECK(value_advise_flags == -1); + BOOST_CHECK(key_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); + BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); } BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate ) { @@ -61,8 +61,8 @@ BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate ) { BOOST_CHECK((key_flags & MAP_POPULATE)); BOOST_CHECK((value_flags & MAP_POPULATE)); - BOOST_CHECK(key_advise_flags == -1); - BOOST_CHECK(value_advise_flags == -1); + BOOST_CHECK(key_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); + BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); } BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate_key_part ) { @@ -76,8 +76,8 @@ BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate_key_part ) { BOOST_CHECK((key_flags & MAP_POPULATE)); BOOST_CHECK((value_flags & MAP_POPULATE) == 0); - BOOST_CHECK(key_advise_flags == -1); - BOOST_CHECK(value_advise_flags == -1); + BOOST_CHECK(key_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); + BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); } BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestPopulate_lazy ) { @@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestlazy_no_readahead_value_part ) { BOOST_CHECK((key_flags & MAP_POPULATE) == 0); BOOST_CHECK((value_flags & MAP_POPULATE) == 0); - BOOST_CHECK(key_advise_flags == -1); + BOOST_CHECK(key_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_random); } @@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE( MemoryMapFlagsTestpopulate_key_part_no_readahead_value_par BOOST_CHECK((key_flags & MAP_POPULATE)); BOOST_CHECK((value_flags & MAP_POPULATE) == 0); - BOOST_CHECK(key_advise_flags == -1); + BOOST_CHECK(key_advise_flags == boost::interprocess::mapped_region::advice_types::advice_normal); BOOST_CHECK(value_advise_flags == boost::interprocess::mapped_region::advice_types::advice_random); } diff --git a/pykeyvi/src/pxds/dictionary.pxd b/pykeyvi/src/pxds/dictionary.pxd index e1231334..8bc0cd3a 100644 --- a/pykeyvi/src/pxds/dictionary.pxd +++ b/pykeyvi/src/pxds/dictionary.pxd @@ -7,6 +7,7 @@ from match_iterator cimport MatchIteratorPair as _MatchIteratorPair cdef extern from "dictionary/dictionary.h" namespace "keyvi::dictionary": ctypedef enum loading_strategy_types: + default_os, # no special treatment, use whatever the OS/Boost has as default lazy, # load data as needed with some read-ahead populate, # immediately load everything in memory (blocks until everything is fully read) populate_key_part, # populate only the key part, load value part lazy diff --git a/pykeyvi/src/pykeyvi.cpp b/pykeyvi/src/pykeyvi.cpp index 95901897..ae2cbf2d 100644 --- a/pykeyvi/src/pykeyvi.cpp +++ b/pykeyvi/src/pykeyvi.cpp @@ -639,16 +639,16 @@ struct __pyx_obj_7pykeyvi_ForwardBackwardCompletion { * self.inst = shared_ptr[_ForwardBackwardCompletion](new _ForwardBackwardCompletion(input_in_0, input_in_1)) * * cdef class loading_strategy_types: # <<<<<<<<<<<<<< - * lazy = 0 - * populate = 1 + * default_os = 0 + * lazy = 1 */ struct __pyx_obj_7pykeyvi_loading_strategy_types { PyObject_HEAD }; -/* "pykeyvi.pyx":498 - * populate_key_part_no_readahead_value_part = 6 +/* "pykeyvi.pyx":499 + * populate_key_part_no_readahead_value_part = 7 * * cdef class CompletionDictionaryCompiler: # <<<<<<<<<<<<<< * @@ -660,7 +660,7 @@ struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler { }; -/* "pykeyvi.pyx":581 +/* "pykeyvi.pyx":582 * (py_callback)(a, b) * * cdef class MultiWordCompletion: # <<<<<<<<<<<<<< @@ -673,7 +673,7 @@ struct __pyx_obj_7pykeyvi_MultiWordCompletion { }; -/* "pykeyvi.pyx":622 +/* "pykeyvi.pyx":623 * raise Exception('can not handle type of %s' % (args,)) * * cdef class PredictiveCompression: # <<<<<<<<<<<<<< @@ -686,7 +686,7 @@ struct __pyx_obj_7pykeyvi_PredictiveCompression { }; -/* "pykeyvi.pyx":649 +/* "pykeyvi.pyx":650 * return py_result * * cdef class KeyOnlyDictionaryGenerator: # <<<<<<<<<<<<<< @@ -699,7 +699,7 @@ struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryGenerator { }; -/* "pykeyvi.pyx":673 +/* "pykeyvi.pyx":674 * self.inst.get().WriteToFile(input_in_0) * * cdef class KeyOnlyDictionaryCompiler: # <<<<<<<<<<<<<< @@ -712,7 +712,7 @@ struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler { }; -/* "pykeyvi.pyx":742 +/* "pykeyvi.pyx":743 * self.inst.get().SetManifestFromString(m) * * cdef class Match: # <<<<<<<<<<<<<< @@ -725,7 +725,7 @@ struct __pyx_obj_7pykeyvi_Match { }; -/* "pykeyvi.pyx":938 +/* "pykeyvi.pyx":939 * from match_iterator cimport MatchIterator as _MatchIterator * * cdef class MatchIterator: # <<<<<<<<<<<<<< @@ -925,7 +925,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper { }; -/* "pykeyvi.pyx":528 +/* "pykeyvi.pyx":529 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -938,7 +938,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_15__init_2 { }; -/* "pykeyvi.pyx":530 +/* "pykeyvi.pyx":531 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -958,7 +958,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_17_genexpr { }; -/* "pykeyvi.pyx":538 +/* "pykeyvi.pyx":539 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -971,7 +971,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_18___init__ { }; -/* "pykeyvi.pyx":543 +/* "pykeyvi.pyx":544 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -991,7 +991,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_20_genexpr { }; -/* "pykeyvi.pyx":689 +/* "pykeyvi.pyx":690 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -1004,7 +1004,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_21__init_2 { }; -/* "pykeyvi.pyx":691 +/* "pykeyvi.pyx":692 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -1024,7 +1024,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_23_genexpr { }; -/* "pykeyvi.pyx":699 +/* "pykeyvi.pyx":700 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -1037,7 +1037,7 @@ struct __pyx_obj_7pykeyvi___pyx_scope_struct_24___init__ { }; -/* "pykeyvi.pyx":704 +/* "pykeyvi.pyx":705 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -1658,6 +1658,7 @@ static char __pyx_k_GetNear_1[] = "_GetNear_1"; static char __pyx_k_py_result[] = "py_result"; static char __pyx_k_traceback[] = "traceback"; static char __pyx_k_decompress[] = "decompress"; +static char __pyx_k_default_os[] = "default_os"; static char __pyx_k_input_in_0[] = "input_in_0"; static char __pyx_k_SetRawValue[] = "__SetRawValue"; static char __pyx_k_memory_limit[] = "memory_limit"; @@ -1749,6 +1750,7 @@ static PyObject *__pyx_kp_s_can_not_handle_type_of_s; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_decompress; static PyObject *__pyx_n_s_default; +static PyObject *__pyx_n_s_default_os; static PyObject *__pyx_n_s_dumps; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_filename; @@ -2000,6 +2002,7 @@ static PyObject *__pyx_int_3; static PyObject *__pyx_int_4; static PyObject *__pyx_int_5; static PyObject *__pyx_int_6; +static PyObject *__pyx_int_7; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; @@ -8493,7 +8496,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_12_init_0(struct __pyx_obj_7pyke * * def _init_1(self, bytes filename , int in_1 ): # <<<<<<<<<<<<<< * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6, 7], 'arg in_1 wrong type' */ /* Python wrapper */ @@ -8578,7 +8581,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pyke * * def _init_1(self, bytes filename , int in_1 ): * assert isinstance(filename, bytes), 'arg filename wrong type' # <<<<<<<<<<<<<< - * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6, 7], 'arg in_1 wrong type' * cdef const_char * input_filename = filename */ #ifndef CYTHON_WITHOUT_ASSERTIONS @@ -8594,7 +8597,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pyke /* "pykeyvi.pyx":285 * def _init_1(self, bytes filename , int in_1 ): * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' # <<<<<<<<<<<<<< + * assert in_1 in [0, 1, 2, 3, 4, 5, 6, 7], 'arg in_1 wrong type' # <<<<<<<<<<<<<< * cdef const_char * input_filename = filename * */ @@ -8608,6 +8611,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pyke case 4: case 5: case 6: + case 7: __pyx_t_1 = 1; break; default: @@ -8623,7 +8627,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pyke /* "pykeyvi.pyx":286 * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6, 7], 'arg in_1 wrong type' * cdef const_char * input_filename = filename # <<<<<<<<<<<<<< * * self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (<_loading_strategy_types>in_1))) @@ -8651,7 +8655,7 @@ static PyObject *__pyx_pf_7pykeyvi_10Dictionary_14_init_1(struct __pyx_obj_7pyke * * def _init_1(self, bytes filename , int in_1 ): # <<<<<<<<<<<<<< * assert isinstance(filename, bytes), 'arg filename wrong type' - * assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' + * assert in_1 in [0, 1, 2, 3, 4, 5, 6, 7], 'arg in_1 wrong type' */ /* function exit code */ @@ -8711,7 +8715,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D * def __init__(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6, 7]): */ __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_2 == 1) != 0); @@ -8733,7 +8737,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D * def __init__(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): * self._init_0(*args) # <<<<<<<<<<<<<< - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6, 7]): * self._init_1(*args) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -8748,7 +8752,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D * def __init__(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6, 7]): */ goto __pyx_L3; } @@ -8756,7 +8760,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D /* "pykeyvi.pyx":293 * if (len(args)==1) and (isinstance(args[0], bytes)): * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): # <<<<<<<<<<<<<< + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6, 7]): # <<<<<<<<<<<<<< * self._init_1(*args) * else: */ @@ -8837,6 +8841,15 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_7, 7, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L9_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -8847,7 +8860,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D /* "pykeyvi.pyx":294 * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6, 7]): * self._init_1(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) @@ -8862,7 +8875,7 @@ static int __pyx_pf_7pykeyvi_10Dictionary_16__init__(struct __pyx_obj_7pykeyvi_D /* "pykeyvi.pyx":293 * if (len(args)==1) and (isinstance(args[0], bytes)): * self._init_0(*args) - * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): # <<<<<<<<<<<<<< + * elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6, 7]): # <<<<<<<<<<<<<< * self._init_1(*args) * else: */ @@ -12976,7 +12989,7 @@ static int __pyx_pf_7pykeyvi_25ForwardBackwardCompletion_8__init__(struct __pyx_ return __pyx_r; } -/* "pykeyvi.pyx":502 +/* "pykeyvi.pyx":503 * cdef shared_ptr[_CompletionDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -12999,7 +13012,7 @@ static void __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler___dealloc__(struct __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":503 + /* "pykeyvi.pyx":504 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -13008,7 +13021,7 @@ static void __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler___dealloc__(struct */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":502 + /* "pykeyvi.pyx":503 * cdef shared_ptr[_CompletionDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -13020,7 +13033,7 @@ static void __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler___dealloc__(struct __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":506 +/* "pykeyvi.pyx":507 * * * def __setitem__(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -13037,7 +13050,7 @@ static int __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_3__setitem__(PyObjec int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0), ((PyObject *)__pyx_v_in_1)); /* function exit code */ @@ -13063,7 +13076,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "pykeyvi.pyx":507 + /* "pykeyvi.pyx":508 * * def __setitem__(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -13075,12 +13088,12 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":508 + /* "pykeyvi.pyx":509 * def __setitem__(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -13102,37 +13115,37 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":509 + /* "pykeyvi.pyx":510 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * self.inst.get().__setitem__(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":511 + /* "pykeyvi.pyx":512 * cdef const_char * input_in_0 = in_0 * * self.inst.get().__setitem__(input_in_0, (in_1)) # <<<<<<<<<<<<<< * * def Add(self, bytes in_0 , in_1 ): */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->__setitem__(__pyx_v_input_in_0, ((int)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":506 + /* "pykeyvi.pyx":507 * * * def __setitem__(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -13151,7 +13164,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_2__setitem__(struct return __pyx_r; } -/* "pykeyvi.pyx":513 +/* "pykeyvi.pyx":514 * self.inst.get().__setitem__(input_in_0, (in_1)) * * def Add(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -13190,11 +13203,11 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_5Add(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -13207,13 +13220,13 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_5Add(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.CompletionDictionaryCompiler.Add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -13239,7 +13252,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":514 + /* "pykeyvi.pyx":515 * * def Add(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -13251,12 +13264,12 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":515 + /* "pykeyvi.pyx":516 * def Add(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -13278,37 +13291,37 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":516 + /* "pykeyvi.pyx":517 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * self.inst.get().Add(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":518 + /* "pykeyvi.pyx":519 * cdef const_char * input_in_0 = in_0 * * self.inst.get().Add(input_in_0, (in_1)) # <<<<<<<<<<<<<< * * def _init_0(self): */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0, ((int)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":513 + /* "pykeyvi.pyx":514 * self.inst.get().__setitem__(input_in_0, (in_1)) * * def Add(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -13328,7 +13341,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_4Add(struct __ return __pyx_r; } -/* "pykeyvi.pyx":520 +/* "pykeyvi.pyx":521 * self.inst.get().Add(input_in_0, (in_1)) * * def _init_0(self): # <<<<<<<<<<<<<< @@ -13358,7 +13371,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_6_init_0(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":521 + /* "pykeyvi.pyx":522 * * def _init_0(self): * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler()) # <<<<<<<<<<<<<< @@ -13369,11 +13382,11 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_6_init_0(struc __pyx_t_1 = new keyvi::dictionary::CompletionDictionaryCompiler(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":520 + /* "pykeyvi.pyx":521 * self.inst.get().Add(input_in_0, (in_1)) * * def _init_0(self): # <<<<<<<<<<<<<< @@ -13393,7 +13406,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_6_init_0(struc return __pyx_r; } -/* "pykeyvi.pyx":523 +/* "pykeyvi.pyx":524 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -13427,7 +13440,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8_init_1(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":524 + /* "pykeyvi.pyx":525 * * def _init_1(self, memory_limit ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -13449,28 +13462,28 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8_init_1(struc __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":526 + /* "pykeyvi.pyx":527 * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) # <<<<<<<<<<<<<< * * def _init_2(self, memory_limit , dict value_store_params ): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_5 = new keyvi::dictionary::CompletionDictionaryCompiler(((size_t)__pyx_t_4)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_5); - /* "pykeyvi.pyx":523 + /* "pykeyvi.pyx":524 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -13490,7 +13503,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8_init_1(struc return __pyx_r; } -/* "pykeyvi.pyx":528 +/* "pykeyvi.pyx":529 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -13529,11 +13542,11 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_11_init_2(PyOb case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_store_params)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -13546,13 +13559,13 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_11_init_2(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.CompletionDictionaryCompiler._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), __pyx_v_memory_limit, __pyx_v_value_store_params); /* function exit code */ @@ -13565,7 +13578,7 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_11_init_2(PyOb } static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":530 +/* "pykeyvi.pyx":531 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -13591,7 +13604,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_genex __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13629,21 +13642,21 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2gene return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -13651,17 +13664,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2gene if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -13671,7 +13684,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_2gene PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -13733,7 +13746,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_3gene __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13771,21 +13784,21 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -13793,17 +13806,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -13813,7 +13826,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -13856,7 +13869,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_5gene return __pyx_r; } -/* "pykeyvi.pyx":528 +/* "pykeyvi.pyx":529 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -13901,7 +13914,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_store_params); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_store_params); - /* "pykeyvi.pyx":529 + /* "pykeyvi.pyx":530 * * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -13923,12 +13936,12 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":530 + /* "pykeyvi.pyx":531 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -13947,35 +13960,35 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_value_store_params_wrong_typ); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":532 + /* "pykeyvi.pyx":533 * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() # <<<<<<<<<<<<<< @@ -13986,11 +13999,11 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __pyx_t_6 = new std::map (); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v1 = __pyx_t_6; - /* "pykeyvi.pyx":533 + /* "pykeyvi.pyx":534 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -13999,17 +14012,17 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru */ if (unlikely(__pyx_cur_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -14017,17 +14030,17 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -14037,7 +14050,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -14053,7 +14066,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -14066,15 +14079,15 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -14082,7 +14095,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -14090,7 +14103,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9); @@ -14098,18 +14111,18 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "pykeyvi.pyx":534 + /* "pykeyvi.pyx":535 * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): * deref(v1)[ key ] = value # <<<<<<<<<<<<<< * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit), deref(v1))) * del v1 */ - __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((*__pyx_v_v1)[((std::string)__pyx_t_14)]) = ((std::string)__pyx_t_13); - /* "pykeyvi.pyx":533 + /* "pykeyvi.pyx":534 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -14119,23 +14132,23 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pykeyvi.pyx":535 + /* "pykeyvi.pyx":536 * for key, value in value_store_params.items(): * deref(v1)[ key ] = value * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit), deref(v1))) # <<<<<<<<<<<<<< * del v1 * */ - __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_16 = new keyvi::dictionary::CompletionDictionaryCompiler(((size_t)__pyx_t_15), (*__pyx_v_v1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_16); - /* "pykeyvi.pyx":536 + /* "pykeyvi.pyx":537 * deref(v1)[ key ] = value * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit), deref(v1))) * del v1 # <<<<<<<<<<<<<< @@ -14144,7 +14157,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru */ delete __pyx_v_v1; - /* "pykeyvi.pyx":528 + /* "pykeyvi.pyx":529 * self.inst = shared_ptr[_CompletionDictionaryCompiler](new _CompletionDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -14172,7 +14185,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_10_init_2(stru return __pyx_r; } -/* "pykeyvi.pyx":538 +/* "pykeyvi.pyx":539 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -14199,7 +14212,7 @@ static int __pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_13__init__(PyObject } static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":543 +/* "pykeyvi.pyx":544 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -14225,7 +14238,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___gene __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -14264,13 +14277,13 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -14283,10 +14296,10 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -14294,9 +14307,9 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14304,17 +14317,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14324,7 +14337,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___2gen PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -14387,7 +14400,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___3gen __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5generator14, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5generator14, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -14426,13 +14439,13 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -14445,10 +14458,10 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -14456,9 +14469,9 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14466,17 +14479,17 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14486,7 +14499,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -14530,7 +14543,7 @@ static PyObject *__pyx_gb_7pykeyvi_28CompletionDictionaryCompiler_8__init___5gen return __pyx_r; } -/* "pykeyvi.pyx":538 +/* "pykeyvi.pyx":539 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -14563,7 +14576,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); - /* "pykeyvi.pyx":539 + /* "pykeyvi.pyx":540 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -14574,21 +14587,21 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":540 + /* "pykeyvi.pyx":541 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":539 + /* "pykeyvi.pyx":540 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -14598,7 +14611,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ goto __pyx_L3; } - /* "pykeyvi.pyx":541 + /* "pykeyvi.pyx":542 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -14609,9 +14622,9 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { @@ -14641,21 +14654,21 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":542 + /* "pykeyvi.pyx":543 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) # <<<<<<<<<<<<<< * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":541 + /* "pykeyvi.pyx":542 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -14665,7 +14678,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ goto __pyx_L3; } - /* "pykeyvi.pyx":543 + /* "pykeyvi.pyx":544 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -14676,9 +14689,9 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((__pyx_t_5 == 2) != 0); if (__pyx_t_6) { @@ -14719,44 +14732,44 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":544 + /* "pykeyvi.pyx":545 * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":543 + /* "pykeyvi.pyx":544 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -14766,7 +14779,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ goto __pyx_L3; } - /* "pykeyvi.pyx":546 + /* "pykeyvi.pyx":547 * self._init_2(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -14774,29 +14787,29 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ * def WriteToFile(self, bytes in_0 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_args); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":538 + /* "pykeyvi.pyx":539 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -14818,7 +14831,7 @@ static int __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_12__init__(struct __ return __pyx_r; } -/* "pykeyvi.pyx":548 +/* "pykeyvi.pyx":549 * raise Exception('can not handle type of %s' % (args,)) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -14835,7 +14848,7 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_15WriteToFile( PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile(((struct __pyx_obj_7pykeyvi_CompletionDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -14858,7 +14871,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":549 + /* "pykeyvi.pyx":550 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -14870,22 +14883,22 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":550 + /* "pykeyvi.pyx":551 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":551 + /* "pykeyvi.pyx":552 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -14894,7 +14907,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":548 + /* "pykeyvi.pyx":549 * raise Exception('can not handle type of %s' % (args,)) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -14914,7 +14927,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_14WriteToFile( return __pyx_r; } -/* "pykeyvi.pyx":553 +/* "pykeyvi.pyx":554 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -14940,7 +14953,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_16__enter__(st __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "pykeyvi.pyx":554 + /* "pykeyvi.pyx":555 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -14952,7 +14965,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_16__enter__(st __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":553 + /* "pykeyvi.pyx":554 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -14967,7 +14980,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_16__enter__(st return __pyx_r; } -/* "pykeyvi.pyx":557 +/* "pykeyvi.pyx":558 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -15008,16 +15021,16 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_19__exit__(PyO case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -15032,7 +15045,7 @@ static PyObject *__pyx_pw_7pykeyvi_28CompletionDictionaryCompiler_19__exit__(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.CompletionDictionaryCompiler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15056,14 +15069,14 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_18__exit__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "pykeyvi.pyx":558 + /* "pykeyvi.pyx":559 * * def __exit__(self, type, value, traceback): * self.Compile() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -15076,16 +15089,16 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_18__exit__(str } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":557 + /* "pykeyvi.pyx":558 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -15108,7 +15121,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_18__exit__(str return __pyx_r; } -/* "pykeyvi.pyx":561 +/* "pykeyvi.pyx":562 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -15142,7 +15155,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru int __pyx_t_2; __Pyx_RefNannySetupContext("Compile", 0); - /* "pykeyvi.pyx":562 + /* "pykeyvi.pyx":563 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -15153,7 +15166,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":563 + /* "pykeyvi.pyx":564 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -15167,7 +15180,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru #endif /*try:*/ { - /* "pykeyvi.pyx":564 + /* "pykeyvi.pyx":565 * if not args: * with nogil: * self.inst.get().Compile() # <<<<<<<<<<<<<< @@ -15177,7 +15190,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_v_self->inst.get()->Compile(); } - /* "pykeyvi.pyx":563 + /* "pykeyvi.pyx":564 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -15195,7 +15208,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru } } - /* "pykeyvi.pyx":565 + /* "pykeyvi.pyx":566 * with nogil: * self.inst.get().Compile() * return # <<<<<<<<<<<<<< @@ -15206,7 +15219,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pykeyvi.pyx":562 + /* "pykeyvi.pyx":563 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -15215,7 +15228,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru */ } - /* "pykeyvi.pyx":567 + /* "pykeyvi.pyx":568 * return * * cdef void* callback = args[0] # <<<<<<<<<<<<<< @@ -15224,7 +15237,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru */ __pyx_v_callback = ((void *)PyTuple_GET_ITEM(__pyx_v_args, 0)); - /* "pykeyvi.pyx":568 + /* "pykeyvi.pyx":569 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -15238,7 +15251,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru #endif /*try:*/ { - /* "pykeyvi.pyx":569 + /* "pykeyvi.pyx":570 * cdef void* callback = args[0] * with nogil: * self.inst.get().Compile(callback_wrapper, callback) # <<<<<<<<<<<<<< @@ -15248,7 +15261,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru __pyx_v_self->inst.get()->Compile(__pyx_f_7pykeyvi_callback_wrapper, __pyx_v_callback); } - /* "pykeyvi.pyx":568 + /* "pykeyvi.pyx":569 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -15266,7 +15279,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru } } - /* "pykeyvi.pyx":561 + /* "pykeyvi.pyx":562 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -15282,7 +15295,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_20Compile(stru return __pyx_r; } -/* "pykeyvi.pyx":572 +/* "pykeyvi.pyx":573 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -15317,16 +15330,16 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetManifest", 0); - /* "pykeyvi.pyx":573 + /* "pykeyvi.pyx":574 * * def SetManifest(self, manifest): * m = json.dumps(manifest) # <<<<<<<<<<<<<< * self.inst.get().SetManifestFromString(m) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -15340,16 +15353,16 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_manifest); __Pyx_GIVEREF(__pyx_v_manifest); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_manifest); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -15357,17 +15370,17 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( __pyx_v_m = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":574 + /* "pykeyvi.pyx":575 * def SetManifest(self, manifest): * m = json.dumps(manifest) * self.inst.get().SetManifestFromString(m) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetManifestFromString(__pyx_t_5); - /* "pykeyvi.pyx":572 + /* "pykeyvi.pyx":573 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -15392,7 +15405,7 @@ static PyObject *__pyx_pf_7pykeyvi_28CompletionDictionaryCompiler_22SetManifest( return __pyx_r; } -/* "pykeyvi.pyx":578 +/* "pykeyvi.pyx":579 * * # definition for all compilers * cdef void callback_wrapper(size_t a, size_t b, void* py_callback) with gil: # <<<<<<<<<<<<<< @@ -15417,16 +15430,16 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b #endif __Pyx_RefNannySetupContext("callback_wrapper", 0); - /* "pykeyvi.pyx":579 + /* "pykeyvi.pyx":580 * # definition for all compilers * cdef void callback_wrapper(size_t a, size_t b, void* py_callback) with gil: * (py_callback)(a, b) # <<<<<<<<<<<<<< * * cdef class MultiWordCompletion: */ - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_b); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_b); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_py_callback)); __pyx_t_4 = ((PyObject *)__pyx_v_py_callback); __pyx_t_5 = NULL; @@ -15441,7 +15454,7 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b __pyx_t_6 = 1; } } - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __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; @@ -15452,13 +15465,13 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":578 + /* "pykeyvi.pyx":579 * * # definition for all compilers * cdef void callback_wrapper(size_t a, size_t b, void* py_callback) with gil: # <<<<<<<<<<<<<< @@ -15483,7 +15496,7 @@ static void __pyx_f_7pykeyvi_callback_wrapper(size_t __pyx_v_a, size_t __pyx_v_b #endif } -/* "pykeyvi.pyx":585 +/* "pykeyvi.pyx":586 * cdef shared_ptr[_MultiWordCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -15506,7 +15519,7 @@ static void __pyx_pf_7pykeyvi_19MultiWordCompletion___dealloc__(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":586 + /* "pykeyvi.pyx":587 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -15515,7 +15528,7 @@ static void __pyx_pf_7pykeyvi_19MultiWordCompletion___dealloc__(struct __pyx_obj */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":585 + /* "pykeyvi.pyx":586 * cdef shared_ptr[_MultiWordCompletion] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -15527,7 +15540,7 @@ static void __pyx_pf_7pykeyvi_19MultiWordCompletion___dealloc__(struct __pyx_obj __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":589 +/* "pykeyvi.pyx":590 * * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -15563,7 +15576,7 @@ static int __pyx_pw_7pykeyvi_19MultiWordCompletion_3__init__(PyObject *__pyx_v_s 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_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -15574,13 +15587,13 @@ static int __pyx_pw_7pykeyvi_19MultiWordCompletion_3__init__(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.MultiWordCompletion.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary, 1, "in_0", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(((struct __pyx_obj_7pykeyvi_MultiWordCompletion *)__pyx_v_self), __pyx_v_in_0); /* function exit code */ @@ -15604,7 +15617,7 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":590 + /* "pykeyvi.pyx":591 * * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -15616,12 +15629,12 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_0), __pyx_ptype_7pykeyvi_Dictionary); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":591 + /* "pykeyvi.pyx":592 * def __init__(self, Dictionary in_0 ): * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst # <<<<<<<<<<<<<< @@ -15631,7 +15644,7 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p __pyx_t_2 = __pyx_v_in_0->inst; __pyx_v_input_in_0 = __pyx_t_2; - /* "pykeyvi.pyx":592 + /* "pykeyvi.pyx":593 * assert isinstance(in_0, Dictionary), 'arg in_0 wrong type' * cdef shared_ptr[_Dictionary] input_in_0 = in_0.inst * self.inst = shared_ptr[_MultiWordCompletion](new _MultiWordCompletion(input_in_0)) # <<<<<<<<<<<<<< @@ -15642,11 +15655,11 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p __pyx_t_3 = new keyvi::dictionary::completion::MultiWordCompletion(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":589 + /* "pykeyvi.pyx":590 * * * def __init__(self, Dictionary in_0 ): # <<<<<<<<<<<<<< @@ -15665,7 +15678,7 @@ static int __pyx_pf_7pykeyvi_19MultiWordCompletion_2__init__(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":594 +/* "pykeyvi.pyx":595 * self.inst = shared_ptr[_MultiWordCompletion](new _MultiWordCompletion(input_in_0)) * * def _GetCompletions_0(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -15682,7 +15695,7 @@ static PyObject *__pyx_pw_7pykeyvi_19MultiWordCompletion_5_GetCompletions_0(PyOb PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_GetCompletions_0 (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(((struct __pyx_obj_7pykeyvi_MultiWordCompletion *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -15708,7 +15721,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetCompletions_0", 0); - /* "pykeyvi.pyx":595 + /* "pykeyvi.pyx":596 * * def _GetCompletions_0(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -15720,22 +15733,22 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":596 + /* "pykeyvi.pyx":597 * def _GetCompletions_0(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":597 + /* "pykeyvi.pyx":598 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) # <<<<<<<<<<<<<< @@ -15744,20 +15757,20 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru */ __pyx_v__r = __pyx_v_self->inst.get()->GetCompletions(__pyx_v_input_in_0); - /* "pykeyvi.pyx":598 + /* "pykeyvi.pyx":599 * cdef const_char * input_in_0 = in_0 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":599 + /* "pykeyvi.pyx":600 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -15766,7 +15779,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":600 + /* "pykeyvi.pyx":601 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -15775,7 +15788,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":601 + /* "pykeyvi.pyx":602 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -15787,7 +15800,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":594 + /* "pykeyvi.pyx":595 * self.inst = shared_ptr[_MultiWordCompletion](new _MultiWordCompletion(input_in_0)) * * def _GetCompletions_0(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -15807,7 +15820,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_4_GetCompletions_0(stru return __pyx_r; } -/* "pykeyvi.pyx":603 +/* "pykeyvi.pyx":604 * return py_result * * def _GetCompletions_1(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -15846,11 +15859,11 @@ static PyObject *__pyx_pw_7pykeyvi_19MultiWordCompletion_7_GetCompletions_1(PyOb case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetCompletions_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_GetCompletions_1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -15863,13 +15876,13 @@ static PyObject *__pyx_pw_7pykeyvi_19MultiWordCompletion_7_GetCompletions_1(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_GetCompletions_1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.MultiWordCompletion._GetCompletions_1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(((struct __pyx_obj_7pykeyvi_MultiWordCompletion *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1); /* function exit code */ @@ -15898,7 +15911,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_GetCompletions_1", 0); - /* "pykeyvi.pyx":604 + /* "pykeyvi.pyx":605 * * def _GetCompletions_1(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -15910,12 +15923,12 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":605 + /* "pykeyvi.pyx":606 * def _GetCompletions_1(self, bytes in_0 , in_1 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' # <<<<<<<<<<<<<< @@ -15937,45 +15950,45 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_1_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":606 + /* "pykeyvi.pyx":607 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * assert isinstance(in_1, (int, long)), 'arg in_1 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_4); - /* "pykeyvi.pyx":608 + /* "pykeyvi.pyx":609 * cdef const_char * input_in_0 = in_0 * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) # <<<<<<<<<<<<<< * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->GetCompletions(__pyx_v_input_in_0, ((int)__pyx_t_5)); - /* "pykeyvi.pyx":609 + /* "pykeyvi.pyx":610 * * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) # <<<<<<<<<<<<<< * py_result.it = _r.begin() * py_result.end = _r.end() */ - __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_tp_new_7pykeyvi_MatchIterator(((PyTypeObject *)__pyx_ptype_7pykeyvi_MatchIterator), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7pykeyvi_MatchIterator)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_MatchIterator *)__pyx_t_6); __pyx_t_6 = 0; - /* "pykeyvi.pyx":610 + /* "pykeyvi.pyx":611 * cdef _MatchIteratorPair _r = self.inst.get().GetCompletions(input_in_0, (in_1)) * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() # <<<<<<<<<<<<<< @@ -15984,7 +15997,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru */ __pyx_v_py_result->it = __pyx_v__r.begin(); - /* "pykeyvi.pyx":611 + /* "pykeyvi.pyx":612 * cdef MatchIterator py_result = MatchIterator.__new__(MatchIterator) * py_result.it = _r.begin() * py_result.end = _r.end() # <<<<<<<<<<<<<< @@ -15993,7 +16006,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru */ __pyx_v_py_result->end = __pyx_v__r.end(); - /* "pykeyvi.pyx":612 + /* "pykeyvi.pyx":613 * py_result.it = _r.begin() * py_result.end = _r.end() * return py_result # <<<<<<<<<<<<<< @@ -16005,7 +16018,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":603 + /* "pykeyvi.pyx":604 * return py_result * * def _GetCompletions_1(self, bytes in_0 , in_1 ): # <<<<<<<<<<<<<< @@ -16025,7 +16038,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_6_GetCompletions_1(stru return __pyx_r; } -/* "pykeyvi.pyx":614 +/* "pykeyvi.pyx":615 * return py_result * * def GetCompletions(self, *args): # <<<<<<<<<<<<<< @@ -16066,14 +16079,14 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetCompletions", 0); - /* "pykeyvi.pyx":615 + /* "pykeyvi.pyx":616 * * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_2 == 1) != 0); if (__pyx_t_3) { } else { @@ -16089,7 +16102,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":616 + /* "pykeyvi.pyx":617 * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) # <<<<<<<<<<<<<< @@ -16097,16 +16110,16 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct * return self._GetCompletions_1(*args) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":615 + /* "pykeyvi.pyx":616 * * def GetCompletions(self, *args): * if (len(args)==1) and (isinstance(args[0], bytes)): # <<<<<<<<<<<<<< @@ -16115,14 +16128,14 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct */ } - /* "pykeyvi.pyx":617 + /* "pykeyvi.pyx":618 * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< * return self._GetCompletions_1(*args) * else: */ - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_2 == 2) != 0); if (__pyx_t_5) { } else { @@ -16161,7 +16174,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "pykeyvi.pyx":618 + /* "pykeyvi.pyx":619 * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): * return self._GetCompletions_1(*args) # <<<<<<<<<<<<<< @@ -16169,16 +16182,16 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct * raise Exception('can not handle type of %s' % (args,)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_GetCompletions_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":617 + /* "pykeyvi.pyx":618 * if (len(args)==1) and (isinstance(args[0], bytes)): * return self._GetCompletions_0(*args) * elif (len(args)==2) and (isinstance(args[0], bytes)) and (isinstance(args[1], (int, long))): # <<<<<<<<<<<<<< @@ -16187,7 +16200,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct */ } - /* "pykeyvi.pyx":620 + /* "pykeyvi.pyx":621 * return self._GetCompletions_1(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -16195,28 +16208,28 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct * cdef class PredictiveCompression: */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_args); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":614 + /* "pykeyvi.pyx":615 * return py_result * * def GetCompletions(self, *args): # <<<<<<<<<<<<<< @@ -16236,7 +16249,7 @@ static PyObject *__pyx_pf_7pykeyvi_19MultiWordCompletion_8GetCompletions(struct return __pyx_r; } -/* "pykeyvi.pyx":626 +/* "pykeyvi.pyx":627 * cdef shared_ptr[_PredictiveCompression] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16259,7 +16272,7 @@ static void __pyx_pf_7pykeyvi_21PredictiveCompression___dealloc__(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":627 + /* "pykeyvi.pyx":628 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -16268,7 +16281,7 @@ static void __pyx_pf_7pykeyvi_21PredictiveCompression___dealloc__(struct __pyx_o */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":626 + /* "pykeyvi.pyx":627 * cdef shared_ptr[_PredictiveCompression] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16280,7 +16293,7 @@ static void __pyx_pf_7pykeyvi_21PredictiveCompression___dealloc__(struct __pyx_o __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":630 +/* "pykeyvi.pyx":631 * * * def Compress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16297,7 +16310,7 @@ static PyObject *__pyx_pw_7pykeyvi_21PredictiveCompression_3Compress(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Compress (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(((struct __pyx_obj_7pykeyvi_PredictiveCompression *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16322,7 +16335,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Compress", 0); - /* "pykeyvi.pyx":631 + /* "pykeyvi.pyx":632 * * def Compress(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16334,22 +16347,22 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":633 + /* "pykeyvi.pyx":634 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * cdef libcpp_string _r = self.inst.get().Compress((in_0)) # <<<<<<<<<<<<<< * py_result = _r * return py_result */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->Compress(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":634 + /* "pykeyvi.pyx":635 * * cdef libcpp_string _r = self.inst.get().Compress((in_0)) * py_result = _r # <<<<<<<<<<<<<< @@ -16358,7 +16371,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":635 + /* "pykeyvi.pyx":636 * cdef libcpp_string _r = self.inst.get().Compress((in_0)) * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -16366,13 +16379,13 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py * def __init__(self, bytes in_0 ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":630 + /* "pykeyvi.pyx":631 * * * def Compress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16391,7 +16404,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_2Compress(struct __py return __pyx_r; } -/* "pykeyvi.pyx":637 +/* "pykeyvi.pyx":638 * return py_result * * def __init__(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16427,7 +16440,7 @@ static int __pyx_pw_7pykeyvi_21PredictiveCompression_5__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_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -16438,13 +16451,13 @@ static int __pyx_pw_7pykeyvi_21PredictiveCompression_5__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_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.PredictiveCompression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(((struct __pyx_obj_7pykeyvi_PredictiveCompression *)__pyx_v_self), __pyx_v_in_0); /* function exit code */ @@ -16467,7 +16480,7 @@ static int __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":638 + /* "pykeyvi.pyx":639 * * def __init__(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16479,28 +16492,28 @@ static int __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(struct __pyx_obj_ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":640 + /* "pykeyvi.pyx":641 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * self.inst = shared_ptr[_PredictiveCompression](new _PredictiveCompression((in_0))) # <<<<<<<<<<<<<< * * def Uncompress(self, bytes in_0 ): */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_3 = new keyvi::compression::PredictiveCompression(((std::string)__pyx_t_2)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_3); - /* "pykeyvi.pyx":637 + /* "pykeyvi.pyx":638 * return py_result * * def __init__(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16519,7 +16532,7 @@ static int __pyx_pf_7pykeyvi_21PredictiveCompression_4__init__(struct __pyx_obj_ return __pyx_r; } -/* "pykeyvi.pyx":642 +/* "pykeyvi.pyx":643 * self.inst = shared_ptr[_PredictiveCompression](new _PredictiveCompression((in_0))) * * def Uncompress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16536,7 +16549,7 @@ static PyObject *__pyx_pw_7pykeyvi_21PredictiveCompression_7Uncompress(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Uncompress (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(((struct __pyx_obj_7pykeyvi_PredictiveCompression *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16561,7 +16574,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Uncompress", 0); - /* "pykeyvi.pyx":643 + /* "pykeyvi.pyx":644 * * def Uncompress(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16573,22 +16586,22 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":645 + /* "pykeyvi.pyx":646 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * * cdef libcpp_string _r = self.inst.get().Uncompress((in_0)) # <<<<<<<<<<<<<< * py_result = _r * return py_result */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_in_0); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v__r = __pyx_v_self->inst.get()->Uncompress(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":646 + /* "pykeyvi.pyx":647 * * cdef libcpp_string _r = self.inst.get().Uncompress((in_0)) * py_result = _r # <<<<<<<<<<<<<< @@ -16597,7 +16610,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":647 + /* "pykeyvi.pyx":648 * cdef libcpp_string _r = self.inst.get().Uncompress((in_0)) * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -16605,13 +16618,13 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ * cdef class KeyOnlyDictionaryGenerator: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":642 + /* "pykeyvi.pyx":643 * self.inst = shared_ptr[_PredictiveCompression](new _PredictiveCompression((in_0))) * * def Uncompress(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16630,7 +16643,7 @@ static PyObject *__pyx_pf_7pykeyvi_21PredictiveCompression_6Uncompress(struct __ return __pyx_r; } -/* "pykeyvi.pyx":653 +/* "pykeyvi.pyx":654 * cdef shared_ptr[_KeyOnlyDictionaryGenerator] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16653,7 +16666,7 @@ static void __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator___dealloc__(struct __ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":654 + /* "pykeyvi.pyx":655 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -16662,7 +16675,7 @@ static void __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator___dealloc__(struct __ */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":653 + /* "pykeyvi.pyx":654 * cdef shared_ptr[_KeyOnlyDictionaryGenerator] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16674,7 +16687,7 @@ static void __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator___dealloc__(struct __ __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":657 +/* "pykeyvi.pyx":658 * * * def __init__(self): # <<<<<<<<<<<<<< @@ -16707,7 +16720,7 @@ static int __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_2__init__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":658 + /* "pykeyvi.pyx":659 * * def __init__(self): * self.inst = shared_ptr[_KeyOnlyDictionaryGenerator](new _KeyOnlyDictionaryGenerator()) # <<<<<<<<<<<<<< @@ -16718,11 +16731,11 @@ static int __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_2__init__(struct __pyx __pyx_t_1 = new keyvi::dictionary::KeyOnlyDictionaryGenerator(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":657 + /* "pykeyvi.pyx":658 * * * def __init__(self): # <<<<<<<<<<<<<< @@ -16741,7 +16754,7 @@ static int __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_2__init__(struct __pyx return __pyx_r; } -/* "pykeyvi.pyx":660 +/* "pykeyvi.pyx":661 * self.inst = shared_ptr[_KeyOnlyDictionaryGenerator](new _KeyOnlyDictionaryGenerator()) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16758,7 +16771,7 @@ static PyObject *__pyx_pw_7pykeyvi_26KeyOnlyDictionaryGenerator_5Add(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryGenerator *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16781,7 +16794,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":661 + /* "pykeyvi.pyx":662 * * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16793,22 +16806,22 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":662 + /* "pykeyvi.pyx":663 * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().Add(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":663 + /* "pykeyvi.pyx":664 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().Add(input_in_0) # <<<<<<<<<<<<<< @@ -16819,10 +16832,10 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":660 + /* "pykeyvi.pyx":661 * self.inst = shared_ptr[_KeyOnlyDictionaryGenerator](new _KeyOnlyDictionaryGenerator()) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16842,7 +16855,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_4Add(struct __py return __pyx_r; } -/* "pykeyvi.pyx":665 +/* "pykeyvi.pyx":666 * self.inst.get().Add(input_in_0) * * def CloseFeeding(self): # <<<<<<<<<<<<<< @@ -16868,7 +16881,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_6CloseFeeding(st __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("CloseFeeding", 0); - /* "pykeyvi.pyx":666 + /* "pykeyvi.pyx":667 * * def CloseFeeding(self): * self.inst.get().CloseFeeding() # <<<<<<<<<<<<<< @@ -16877,7 +16890,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_6CloseFeeding(st */ __pyx_v_self->inst.get()->CloseFeeding(); - /* "pykeyvi.pyx":665 + /* "pykeyvi.pyx":666 * self.inst.get().Add(input_in_0) * * def CloseFeeding(self): # <<<<<<<<<<<<<< @@ -16892,7 +16905,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_6CloseFeeding(st return __pyx_r; } -/* "pykeyvi.pyx":668 +/* "pykeyvi.pyx":669 * self.inst.get().CloseFeeding() * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16909,7 +16922,7 @@ static PyObject *__pyx_pw_7pykeyvi_26KeyOnlyDictionaryGenerator_9WriteToFile(PyO PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryGenerator *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -16932,7 +16945,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":669 + /* "pykeyvi.pyx":670 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -16944,22 +16957,22 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":670 + /* "pykeyvi.pyx":671 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":671 + /* "pykeyvi.pyx":672 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -16968,7 +16981,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":668 + /* "pykeyvi.pyx":669 * self.inst.get().CloseFeeding() * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -16988,7 +17001,7 @@ static PyObject *__pyx_pf_7pykeyvi_26KeyOnlyDictionaryGenerator_8WriteToFile(str return __pyx_r; } -/* "pykeyvi.pyx":677 +/* "pykeyvi.pyx":678 * cdef shared_ptr[_KeyOnlyDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -17011,7 +17024,7 @@ static void __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler___dealloc__(struct __p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":678 + /* "pykeyvi.pyx":679 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -17020,7 +17033,7 @@ static void __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler___dealloc__(struct __p */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":677 + /* "pykeyvi.pyx":678 * cdef shared_ptr[_KeyOnlyDictionaryCompiler] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -17032,7 +17045,7 @@ static void __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler___dealloc__(struct __p __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":681 +/* "pykeyvi.pyx":682 * * * def _init_0(self): # <<<<<<<<<<<<<< @@ -17062,7 +17075,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_2_init_0(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":682 + /* "pykeyvi.pyx":683 * * def _init_0(self): * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler()) # <<<<<<<<<<<<<< @@ -17073,11 +17086,11 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_2_init_0(struct _ __pyx_t_1 = new keyvi::dictionary::KeyOnlyDictionaryCompiler(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_1); - /* "pykeyvi.pyx":681 + /* "pykeyvi.pyx":682 * * * def _init_0(self): # <<<<<<<<<<<<<< @@ -17097,7 +17110,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_2_init_0(struct _ return __pyx_r; } -/* "pykeyvi.pyx":684 +/* "pykeyvi.pyx":685 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -17131,7 +17144,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_4_init_1(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":685 + /* "pykeyvi.pyx":686 * * def _init_1(self, memory_limit ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -17153,28 +17166,28 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_4_init_1(struct _ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":687 + /* "pykeyvi.pyx":688 * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) # <<<<<<<<<<<<<< * * def _init_2(self, memory_limit , dict value_store_params ): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_5 = new keyvi::dictionary::KeyOnlyDictionaryCompiler(((size_t)__pyx_t_4)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_5); - /* "pykeyvi.pyx":684 + /* "pykeyvi.pyx":685 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler()) * * def _init_1(self, memory_limit ): # <<<<<<<<<<<<<< @@ -17194,7 +17207,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_4_init_1(struct _ return __pyx_r; } -/* "pykeyvi.pyx":689 +/* "pykeyvi.pyx":690 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -17233,11 +17246,11 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_store_params)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17250,13 +17263,13 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("_init_2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.KeyOnlyDictionaryCompiler._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value_store_params), (&PyDict_Type), 1, "value_store_params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler *)__pyx_v_self), __pyx_v_memory_limit, __pyx_v_value_store_params); /* function exit code */ @@ -17269,7 +17282,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2(PyObject } static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generator15(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":691 +/* "pykeyvi.pyx":692 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -17295,7 +17308,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_genexpr( __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generator15, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generator15, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17333,21 +17346,21 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generat return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -17355,17 +17368,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generat if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -17375,7 +17388,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_2generat PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -17437,7 +17450,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_3genexpr __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generator16, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generator16, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init_2_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17475,21 +17488,21 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params)) { __Pyx_RaiseClosureNameError("value_store_params"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -17497,17 +17510,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -17517,7 +17530,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -17560,7 +17573,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_5generat return __pyx_r; } -/* "pykeyvi.pyx":689 +/* "pykeyvi.pyx":690 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -17605,7 +17618,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_store_params); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_store_params); - /* "pykeyvi.pyx":690 + /* "pykeyvi.pyx":691 * * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' # <<<<<<<<<<<<<< @@ -17627,12 +17640,12 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_memory_limit_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":691 + /* "pykeyvi.pyx":692 * def _init_2(self, memory_limit , dict value_store_params ): * assert isinstance(memory_limit, (int, long)), 'arg memory_limit wrong type' * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' # <<<<<<<<<<<<<< @@ -17651,35 +17664,35 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_7_init_2_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (unlikely(!__pyx_t_1)) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_value_store_params_wrong_typ); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":693 + /* "pykeyvi.pyx":694 * assert isinstance(value_store_params, dict) and all(isinstance(k, bytes) for k in value_store_params.keys()) and all(isinstance(v, bytes) for v in value_store_params.values()), 'arg value_store_params wrong type' * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() # <<<<<<<<<<<<<< @@ -17690,11 +17703,11 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __pyx_t_6 = new std::map (); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_v1 = __pyx_t_6; - /* "pykeyvi.pyx":694 + /* "pykeyvi.pyx":695 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -17703,17 +17716,17 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ */ if (unlikely(__pyx_cur_scope->__pyx_v_value_store_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_value_store_params); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -17721,17 +17734,17 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } @@ -17741,7 +17754,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -17757,7 +17770,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -17770,15 +17783,15 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -17786,7 +17799,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -17794,7 +17807,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9); @@ -17802,18 +17815,18 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "pykeyvi.pyx":695 + /* "pykeyvi.pyx":696 * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): * deref(v1)[ key ] = value # <<<<<<<<<<<<<< * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit), deref(v1))) * del v1 */ - __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((*__pyx_v_v1)[((std::string)__pyx_t_14)]) = ((std::string)__pyx_t_13); - /* "pykeyvi.pyx":694 + /* "pykeyvi.pyx":695 * * cdef libcpp_map[libcpp_string, libcpp_string] * v1 = new libcpp_map[libcpp_string, libcpp_string]() * for key, value in value_store_params.items(): # <<<<<<<<<<<<<< @@ -17823,23 +17836,23 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pykeyvi.pyx":696 + /* "pykeyvi.pyx":697 * for key, value in value_store_params.items(): * deref(v1)[ key ] = value * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit), deref(v1))) # <<<<<<<<<<<<<< * del v1 * */ - __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_memory_limit); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_16 = new keyvi::dictionary::KeyOnlyDictionaryCompiler(((size_t)__pyx_t_15), (*__pyx_v_v1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->inst = boost::shared_ptr (__pyx_t_16); - /* "pykeyvi.pyx":697 + /* "pykeyvi.pyx":698 * deref(v1)[ key ] = value * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit), deref(v1))) * del v1 # <<<<<<<<<<<<<< @@ -17848,7 +17861,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ */ delete __pyx_v_v1; - /* "pykeyvi.pyx":689 + /* "pykeyvi.pyx":690 * self.inst = shared_ptr[_KeyOnlyDictionaryCompiler](new _KeyOnlyDictionaryCompiler((memory_limit))) * * def _init_2(self, memory_limit , dict value_store_params ): # <<<<<<<<<<<<<< @@ -17876,7 +17889,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_6_init_2(struct _ return __pyx_r; } -/* "pykeyvi.pyx":699 +/* "pykeyvi.pyx":700 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -17903,7 +17916,7 @@ static int __pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_9__init__(PyObject *__p } static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2generator17(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "pykeyvi.pyx":704 +/* "pykeyvi.pyx":705 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -17929,7 +17942,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___genexpr __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2generator17, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2generator17, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17968,13 +17981,13 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -17987,10 +18000,10 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -17998,9 +18011,9 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -18008,17 +18021,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -18028,7 +18041,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___2genera PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -18091,7 +18104,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___3genexp __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5generator18, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5generator18, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -18130,13 +18143,13 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args, 1), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -18149,10 +18162,10 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -18160,9 +18173,9 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -18170,17 +18183,17 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } @@ -18190,7 +18203,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -18234,7 +18247,7 @@ static PyObject *__pyx_gb_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___5genera return __pyx_r; } -/* "pykeyvi.pyx":699 +/* "pykeyvi.pyx":700 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -18267,7 +18280,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); - /* "pykeyvi.pyx":700 + /* "pykeyvi.pyx":701 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -18278,21 +18291,21 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":701 + /* "pykeyvi.pyx":702 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":700 + /* "pykeyvi.pyx":701 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -18302,7 +18315,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ goto __pyx_L3; } - /* "pykeyvi.pyx":702 + /* "pykeyvi.pyx":703 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -18313,9 +18326,9 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { @@ -18345,21 +18358,21 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":703 + /* "pykeyvi.pyx":704 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) # <<<<<<<<<<<<<< * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":702 + /* "pykeyvi.pyx":703 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], (int, long))): # <<<<<<<<<<<<<< @@ -18369,7 +18382,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ goto __pyx_L3; } - /* "pykeyvi.pyx":704 + /* "pykeyvi.pyx":705 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -18380,9 +18393,9 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((__pyx_t_5 == 2) != 0); if (__pyx_t_6) { @@ -18423,44 +18436,44 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":705 + /* "pykeyvi.pyx":706 * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): * self._init_2(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":704 + /* "pykeyvi.pyx":705 * elif (len(args)==1) and (isinstance(args[0], (int, long))): * self._init_1(*args) * elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], dict) and all(isinstance(k, bytes) for k in args[1].keys()) and all(isinstance(v, bytes) for v in args[1].values())): # <<<<<<<<<<<<<< @@ -18470,7 +18483,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ goto __pyx_L3; } - /* "pykeyvi.pyx":707 + /* "pykeyvi.pyx":708 * self._init_2(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -18478,29 +18491,29 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ * def Add(self, bytes in_0 ): */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_args); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":699 + /* "pykeyvi.pyx":700 * del v1 * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -18522,7 +18535,7 @@ static int __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_8__init__(struct __pyx_ return __pyx_r; } -/* "pykeyvi.pyx":709 +/* "pykeyvi.pyx":710 * raise Exception('can not handle type of %s' % (args,)) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18539,7 +18552,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_11Add(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -18562,7 +18575,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Add", 0); - /* "pykeyvi.pyx":710 + /* "pykeyvi.pyx":711 * * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -18574,22 +18587,22 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":711 + /* "pykeyvi.pyx":712 * def Add(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().Add(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":712 + /* "pykeyvi.pyx":713 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().Add(input_in_0) # <<<<<<<<<<<<<< @@ -18600,10 +18613,10 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py __pyx_v_self->inst.get()->Add(__pyx_v_input_in_0); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":709 + /* "pykeyvi.pyx":710 * raise Exception('can not handle type of %s' % (args,)) * * def Add(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18623,7 +18636,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_10Add(struct __py return __pyx_r; } -/* "pykeyvi.pyx":714 +/* "pykeyvi.pyx":715 * self.inst.get().Add(input_in_0) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18640,7 +18653,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_13WriteToFile(PyO PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("WriteToFile (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), (&PyBytes_Type), 1, "in_0", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(((struct __pyx_obj_7pykeyvi_KeyOnlyDictionaryCompiler *)__pyx_v_self), ((PyObject*)__pyx_v_in_0)); /* function exit code */ @@ -18663,7 +18676,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("WriteToFile", 0); - /* "pykeyvi.pyx":715 + /* "pykeyvi.pyx":716 * * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' # <<<<<<<<<<<<<< @@ -18675,22 +18688,22 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str __pyx_t_1 = PyBytes_Check(__pyx_v_in_0); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_in_0_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":716 + /* "pykeyvi.pyx":717 * def WriteToFile(self, bytes in_0 ): * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 # <<<<<<<<<<<<<< * self.inst.get().WriteToFile(input_in_0) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_in_0); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_in_0 = ((const char *)__pyx_t_2); - /* "pykeyvi.pyx":717 + /* "pykeyvi.pyx":718 * assert isinstance(in_0, bytes), 'arg in_0 wrong type' * cdef const_char * input_in_0 = in_0 * self.inst.get().WriteToFile(input_in_0) # <<<<<<<<<<<<<< @@ -18699,7 +18712,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str */ __pyx_v_self->inst.get()->WriteToFile(__pyx_v_input_in_0); - /* "pykeyvi.pyx":714 + /* "pykeyvi.pyx":715 * self.inst.get().Add(input_in_0) * * def WriteToFile(self, bytes in_0 ): # <<<<<<<<<<<<<< @@ -18719,7 +18732,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_12WriteToFile(str return __pyx_r; } -/* "pykeyvi.pyx":719 +/* "pykeyvi.pyx":720 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -18745,7 +18758,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_14__enter__(struc __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "pykeyvi.pyx":720 + /* "pykeyvi.pyx":721 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -18757,7 +18770,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_14__enter__(struc __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":719 + /* "pykeyvi.pyx":720 * self.inst.get().WriteToFile(input_in_0) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -18772,7 +18785,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_14__enter__(struc return __pyx_r; } -/* "pykeyvi.pyx":723 +/* "pykeyvi.pyx":724 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -18813,16 +18826,16 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_17__exit__(PyObje case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -18837,7 +18850,7 @@ static PyObject *__pyx_pw_7pykeyvi_25KeyOnlyDictionaryCompiler_17__exit__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.KeyOnlyDictionaryCompiler.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18861,14 +18874,14 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_16__exit__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "pykeyvi.pyx":724 + /* "pykeyvi.pyx":725 * * def __exit__(self, type, value, traceback): * self.Compile() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -18881,16 +18894,16 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_16__exit__(struct } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":723 + /* "pykeyvi.pyx":724 * * * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< @@ -18913,7 +18926,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_16__exit__(struct return __pyx_r; } -/* "pykeyvi.pyx":727 +/* "pykeyvi.pyx":728 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -18947,7 +18960,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct int __pyx_t_2; __Pyx_RefNannySetupContext("Compile", 0); - /* "pykeyvi.pyx":728 + /* "pykeyvi.pyx":729 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -18958,7 +18971,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":729 + /* "pykeyvi.pyx":730 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -18972,7 +18985,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct #endif /*try:*/ { - /* "pykeyvi.pyx":730 + /* "pykeyvi.pyx":731 * if not args: * with nogil: * self.inst.get().Compile() # <<<<<<<<<<<<<< @@ -18982,7 +18995,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_v_self->inst.get()->Compile(); } - /* "pykeyvi.pyx":729 + /* "pykeyvi.pyx":730 * def Compile(self, *args): * if not args: * with nogil: # <<<<<<<<<<<<<< @@ -19000,7 +19013,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct } } - /* "pykeyvi.pyx":731 + /* "pykeyvi.pyx":732 * with nogil: * self.inst.get().Compile() * return # <<<<<<<<<<<<<< @@ -19011,7 +19024,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pykeyvi.pyx":728 + /* "pykeyvi.pyx":729 * * def Compile(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -19020,7 +19033,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct */ } - /* "pykeyvi.pyx":733 + /* "pykeyvi.pyx":734 * return * * cdef void* callback = args[0] # <<<<<<<<<<<<<< @@ -19029,7 +19042,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct */ __pyx_v_callback = ((void *)PyTuple_GET_ITEM(__pyx_v_args, 0)); - /* "pykeyvi.pyx":734 + /* "pykeyvi.pyx":735 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -19043,7 +19056,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct #endif /*try:*/ { - /* "pykeyvi.pyx":735 + /* "pykeyvi.pyx":736 * cdef void* callback = args[0] * with nogil: * self.inst.get().Compile(callback_wrapper, callback) # <<<<<<<<<<<<<< @@ -19053,7 +19066,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct __pyx_v_self->inst.get()->Compile(__pyx_f_7pykeyvi_callback_wrapper, __pyx_v_callback); } - /* "pykeyvi.pyx":734 + /* "pykeyvi.pyx":735 * * cdef void* callback = args[0] * with nogil: # <<<<<<<<<<<<<< @@ -19071,7 +19084,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct } } - /* "pykeyvi.pyx":727 + /* "pykeyvi.pyx":728 * * * def Compile(self, *args): # <<<<<<<<<<<<<< @@ -19087,7 +19100,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_18Compile(struct return __pyx_r; } -/* "pykeyvi.pyx":738 +/* "pykeyvi.pyx":739 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -19122,16 +19135,16 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetManifest", 0); - /* "pykeyvi.pyx":739 + /* "pykeyvi.pyx":740 * * def SetManifest(self, manifest): * m = json.dumps(manifest) # <<<<<<<<<<<<<< * self.inst.get().SetManifestFromString(m) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -19145,16 +19158,16 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_manifest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_manifest); __Pyx_GIVEREF(__pyx_v_manifest); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_manifest); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -19162,17 +19175,17 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str __pyx_v_m = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":740 + /* "pykeyvi.pyx":741 * def SetManifest(self, manifest): * m = json.dumps(manifest) * self.inst.get().SetManifestFromString(m) # <<<<<<<<<<<<<< * * cdef class Match: */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_m); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetManifestFromString(__pyx_t_5); - /* "pykeyvi.pyx":738 + /* "pykeyvi.pyx":739 * * * def SetManifest(self, manifest): # <<<<<<<<<<<<<< @@ -19197,7 +19210,7 @@ static PyObject *__pyx_pf_7pykeyvi_25KeyOnlyDictionaryCompiler_20SetManifest(str return __pyx_r; } -/* "pykeyvi.pyx":746 +/* "pykeyvi.pyx":747 * cdef shared_ptr[_Match] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -19220,7 +19233,7 @@ static void __pyx_pf_7pykeyvi_5Match___dealloc__(struct __pyx_obj_7pykeyvi_Match __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pykeyvi.pyx":747 + /* "pykeyvi.pyx":748 * * def __dealloc__(self): * self.inst.reset() # <<<<<<<<<<<<<< @@ -19229,7 +19242,7 @@ static void __pyx_pf_7pykeyvi_5Match___dealloc__(struct __pyx_obj_7pykeyvi_Match */ __pyx_v_self->inst.reset(); - /* "pykeyvi.pyx":746 + /* "pykeyvi.pyx":747 * cdef shared_ptr[_Match] inst * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -19241,7 +19254,7 @@ static void __pyx_pf_7pykeyvi_5Match___dealloc__(struct __pyx_obj_7pykeyvi_Match __Pyx_RefNannyFinishContext(); } -/* "pykeyvi.pyx":750 +/* "pykeyvi.pyx":751 * * * def SetEnd(self, end ): # <<<<<<<<<<<<<< @@ -19274,7 +19287,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_2SetEnd(struct __pyx_obj_7pykeyvi_Matc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetEnd", 0); - /* "pykeyvi.pyx":751 + /* "pykeyvi.pyx":752 * * def SetEnd(self, end ): * assert isinstance(end, (int, long)), 'arg end wrong type' # <<<<<<<<<<<<<< @@ -19296,22 +19309,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_2SetEnd(struct __pyx_obj_7pykeyvi_Matc __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_end_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":753 + /* "pykeyvi.pyx":754 * assert isinstance(end, (int, long)), 'arg end wrong type' * * self.inst.get().SetEnd((end)) # <<<<<<<<<<<<<< * * def GetStart(self): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_end); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_end); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetEnd(((size_t)__pyx_t_4)); - /* "pykeyvi.pyx":750 + /* "pykeyvi.pyx":751 * * * def SetEnd(self, end ): # <<<<<<<<<<<<<< @@ -19331,7 +19344,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_2SetEnd(struct __pyx_obj_7pykeyvi_Matc return __pyx_r; } -/* "pykeyvi.pyx":755 +/* "pykeyvi.pyx":756 * self.inst.get().SetEnd((end)) * * def GetStart(self): # <<<<<<<<<<<<<< @@ -19363,7 +19376,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetStart", 0); - /* "pykeyvi.pyx":756 + /* "pykeyvi.pyx":757 * * def GetStart(self): * cdef size_t _r = self.inst.get().GetStart() # <<<<<<<<<<<<<< @@ -19372,7 +19385,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v__r = __pyx_v_self->inst.get()->GetStart(); - /* "pykeyvi.pyx":757 + /* "pykeyvi.pyx":758 * def GetStart(self): * cdef size_t _r = self.inst.get().GetStart() * py_result = _r # <<<<<<<<<<<<<< @@ -19381,7 +19394,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_py_result = ((size_t)__pyx_v__r); - /* "pykeyvi.pyx":758 + /* "pykeyvi.pyx":759 * cdef size_t _r = self.inst.get().GetStart() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19389,13 +19402,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma * def GetScore(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":755 + /* "pykeyvi.pyx":756 * self.inst.get().SetEnd((end)) * * def GetStart(self): # <<<<<<<<<<<<<< @@ -19414,7 +19427,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_4GetStart(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":760 +/* "pykeyvi.pyx":761 * return py_result * * def GetScore(self): # <<<<<<<<<<<<<< @@ -19446,7 +19459,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetScore", 0); - /* "pykeyvi.pyx":761 + /* "pykeyvi.pyx":762 * * def GetScore(self): * cdef float _r = self.inst.get().GetScore() # <<<<<<<<<<<<<< @@ -19455,19 +19468,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v__r = __pyx_v_self->inst.get()->GetScore(); - /* "pykeyvi.pyx":762 + /* "pykeyvi.pyx":763 * def GetScore(self): * cdef float _r = self.inst.get().GetScore() * py_result = _r # <<<<<<<<<<<<<< * return py_result * */ - __pyx_t_1 = PyFloat_FromDouble(((float)__pyx_v__r)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(((float)__pyx_v__r)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_py_result = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":763 + /* "pykeyvi.pyx":764 * cdef float _r = self.inst.get().GetScore() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19479,7 +19492,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma __pyx_r = __pyx_v_py_result; goto __pyx_L0; - /* "pykeyvi.pyx":760 + /* "pykeyvi.pyx":761 * return py_result * * def GetScore(self): # <<<<<<<<<<<<<< @@ -19499,7 +19512,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_6GetScore(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":765 +/* "pykeyvi.pyx":766 * return py_result * * def SetMatchedString(self, bytes matched_string ): # <<<<<<<<<<<<<< @@ -19516,7 +19529,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_9SetMatchedString(PyObject *__pyx_v_se PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SetMatchedString (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matched_string), (&PyBytes_Type), 1, "matched_string", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matched_string), (&PyBytes_Type), 1, "matched_string", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_5Match_8SetMatchedString(((struct __pyx_obj_7pykeyvi_Match *)__pyx_v_self), ((PyObject*)__pyx_v_matched_string)); /* function exit code */ @@ -19538,7 +19551,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_8SetMatchedString(struct __pyx_obj_7py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetMatchedString", 0); - /* "pykeyvi.pyx":766 + /* "pykeyvi.pyx":767 * * def SetMatchedString(self, bytes matched_string ): * assert isinstance(matched_string, bytes), 'arg matched_string wrong type' # <<<<<<<<<<<<<< @@ -19550,22 +19563,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_8SetMatchedString(struct __pyx_obj_7py __pyx_t_1 = PyBytes_Check(__pyx_v_matched_string); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_matched_string_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":768 + /* "pykeyvi.pyx":769 * assert isinstance(matched_string, bytes), 'arg matched_string wrong type' * * self.inst.get().SetMatchedString((matched_string)) # <<<<<<<<<<<<<< * * def GetValueAsString(self): */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_matched_string); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_matched_string); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetMatchedString(((std::string)__pyx_t_2)); - /* "pykeyvi.pyx":765 + /* "pykeyvi.pyx":766 * return py_result * * def SetMatchedString(self, bytes matched_string ): # <<<<<<<<<<<<<< @@ -19585,7 +19598,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_8SetMatchedString(struct __pyx_obj_7py return __pyx_r; } -/* "pykeyvi.pyx":770 +/* "pykeyvi.pyx":771 * self.inst.get().SetMatchedString((matched_string)) * * def GetValueAsString(self): # <<<<<<<<<<<<<< @@ -19618,7 +19631,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetValueAsString", 0); - /* "pykeyvi.pyx":771 + /* "pykeyvi.pyx":772 * * def GetValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetValueAsString() # <<<<<<<<<<<<<< @@ -19629,11 +19642,11 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p __pyx_t_1 = __pyx_v_self->inst.get()->GetValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v__r = __pyx_t_1; - /* "pykeyvi.pyx":772 + /* "pykeyvi.pyx":773 * def GetValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetValueAsString() * py_result = _r # <<<<<<<<<<<<<< @@ -19642,7 +19655,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":773 + /* "pykeyvi.pyx":774 * cdef libcpp_string _r = self.inst.get().GetValueAsString() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19650,13 +19663,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p * def IsEmpty(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":770 + /* "pykeyvi.pyx":771 * self.inst.get().SetMatchedString((matched_string)) * * def GetValueAsString(self): # <<<<<<<<<<<<<< @@ -19675,7 +19688,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_10GetValueAsString(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":775 +/* "pykeyvi.pyx":776 * return py_result * * def IsEmpty(self): # <<<<<<<<<<<<<< @@ -19707,7 +19720,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("IsEmpty", 0); - /* "pykeyvi.pyx":776 + /* "pykeyvi.pyx":777 * * def IsEmpty(self): * cdef bool _r = self.inst.get().IsEmpty() # <<<<<<<<<<<<<< @@ -19716,7 +19729,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v__r = __pyx_v_self->inst.get()->IsEmpty(); - /* "pykeyvi.pyx":777 + /* "pykeyvi.pyx":778 * def IsEmpty(self): * cdef bool _r = self.inst.get().IsEmpty() * py_result = _r # <<<<<<<<<<<<<< @@ -19725,7 +19738,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_py_result = ((bool)__pyx_v__r); - /* "pykeyvi.pyx":778 + /* "pykeyvi.pyx":779 * cdef bool _r = self.inst.get().IsEmpty() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19733,13 +19746,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma * def SetScore(self, float score ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":775 + /* "pykeyvi.pyx":776 * return py_result * * def IsEmpty(self): # <<<<<<<<<<<<<< @@ -19758,7 +19771,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_12IsEmpty(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":780 +/* "pykeyvi.pyx":781 * return py_result * * def SetScore(self, float score ): # <<<<<<<<<<<<<< @@ -19777,7 +19790,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_15SetScore(PyObject *__pyx_v_self, PyO __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("SetScore (wrapper)", 0); assert(__pyx_arg_score); { - __pyx_v_score = __pyx_PyFloat_AsFloat(__pyx_arg_score); if (unlikely((__pyx_v_score == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_score = __pyx_PyFloat_AsFloat(__pyx_arg_score); if (unlikely((__pyx_v_score == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19802,7 +19815,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetScore", 0); - /* "pykeyvi.pyx":781 + /* "pykeyvi.pyx":782 * * def SetScore(self, float score ): * assert isinstance(score, float), 'arg score wrong type' # <<<<<<<<<<<<<< @@ -19811,18 +19824,18 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_Check(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_score_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":783 + /* "pykeyvi.pyx":784 * assert isinstance(score, float), 'arg score wrong type' * * self.inst.get().SetScore((score)) # <<<<<<<<<<<<<< @@ -19831,7 +19844,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M */ __pyx_v_self->inst.get()->SetScore(((float)__pyx_v_score)); - /* "pykeyvi.pyx":780 + /* "pykeyvi.pyx":781 * return py_result * * def SetScore(self, float score ): # <<<<<<<<<<<<<< @@ -19852,7 +19865,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_14SetScore(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":785 +/* "pykeyvi.pyx":786 * self.inst.get().SetScore((score)) * * def GetRawValueAsString(self): # <<<<<<<<<<<<<< @@ -19885,7 +19898,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetRawValueAsString", 0); - /* "pykeyvi.pyx":786 + /* "pykeyvi.pyx":787 * * def GetRawValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetRawValueAsString() # <<<<<<<<<<<<<< @@ -19896,11 +19909,11 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj __pyx_t_1 = __pyx_v_self->inst.get()->GetRawValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v__r = __pyx_t_1; - /* "pykeyvi.pyx":787 + /* "pykeyvi.pyx":788 * def GetRawValueAsString(self): * cdef libcpp_string _r = self.inst.get().GetRawValueAsString() * py_result = _r # <<<<<<<<<<<<<< @@ -19909,7 +19922,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":788 + /* "pykeyvi.pyx":789 * cdef libcpp_string _r = self.inst.get().GetRawValueAsString() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -19917,13 +19930,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj * def SetStart(self, start ): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":785 + /* "pykeyvi.pyx":786 * self.inst.get().SetScore((score)) * * def GetRawValueAsString(self): # <<<<<<<<<<<<<< @@ -19942,7 +19955,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_16GetRawValueAsString(struct __pyx_obj return __pyx_r; } -/* "pykeyvi.pyx":790 +/* "pykeyvi.pyx":791 * return py_result * * def SetStart(self, start ): # <<<<<<<<<<<<<< @@ -19975,7 +19988,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_18SetStart(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("SetStart", 0); - /* "pykeyvi.pyx":791 + /* "pykeyvi.pyx":792 * * def SetStart(self, start ): * assert isinstance(start, (int, long)), 'arg start wrong type' # <<<<<<<<<<<<<< @@ -19997,22 +20010,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_18SetStart(struct __pyx_obj_7pykeyvi_M __pyx_L3_bool_binop_done:; if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_start_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":793 + /* "pykeyvi.pyx":794 * assert isinstance(start, (int, long)), 'arg start wrong type' * * self.inst.get().SetStart((start)) # <<<<<<<<<<<<<< * * def GetEnd(self): */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_start); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_start); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->inst.get()->SetStart(((size_t)__pyx_t_4)); - /* "pykeyvi.pyx":790 + /* "pykeyvi.pyx":791 * return py_result * * def SetStart(self, start ): # <<<<<<<<<<<<<< @@ -20032,7 +20045,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_18SetStart(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":795 +/* "pykeyvi.pyx":796 * self.inst.get().SetStart((start)) * * def GetEnd(self): # <<<<<<<<<<<<<< @@ -20064,7 +20077,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetEnd", 0); - /* "pykeyvi.pyx":796 + /* "pykeyvi.pyx":797 * * def GetEnd(self): * cdef size_t _r = self.inst.get().GetEnd() # <<<<<<<<<<<<<< @@ -20073,7 +20086,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat */ __pyx_v__r = __pyx_v_self->inst.get()->GetEnd(); - /* "pykeyvi.pyx":797 + /* "pykeyvi.pyx":798 * def GetEnd(self): * cdef size_t _r = self.inst.get().GetEnd() * py_result = _r # <<<<<<<<<<<<<< @@ -20082,7 +20095,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat */ __pyx_v_py_result = ((size_t)__pyx_v__r); - /* "pykeyvi.pyx":798 + /* "pykeyvi.pyx":799 * cdef size_t _r = self.inst.get().GetEnd() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -20090,13 +20103,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat * def __copy__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":795 + /* "pykeyvi.pyx":796 * self.inst.get().SetStart((start)) * * def GetEnd(self): # <<<<<<<<<<<<<< @@ -20115,7 +20128,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_20GetEnd(struct __pyx_obj_7pykeyvi_Mat return __pyx_r; } -/* "pykeyvi.pyx":800 +/* "pykeyvi.pyx":801 * return py_result * * def __copy__(self): # <<<<<<<<<<<<<< @@ -20146,20 +20159,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__copy__", 0); - /* "pykeyvi.pyx":801 + /* "pykeyvi.pyx":802 * * def __copy__(self): * cdef Match rv = Match.__new__(Match) # <<<<<<<<<<<<<< * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv */ - __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rv = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":802 + /* "pykeyvi.pyx":803 * def __copy__(self): * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) # <<<<<<<<<<<<<< @@ -20168,7 +20181,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M */ __pyx_v_rv->inst = boost::shared_ptr (new keyvi::dictionary::Match((*__pyx_v_self->inst.get()))); - /* "pykeyvi.pyx":803 + /* "pykeyvi.pyx":804 * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv # <<<<<<<<<<<<<< @@ -20180,7 +20193,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M __pyx_r = ((PyObject *)__pyx_v_rv); goto __pyx_L0; - /* "pykeyvi.pyx":800 + /* "pykeyvi.pyx":801 * return py_result * * def __copy__(self): # <<<<<<<<<<<<<< @@ -20200,7 +20213,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_22__copy__(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":805 +/* "pykeyvi.pyx":806 * return rv * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -20231,20 +20244,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "pykeyvi.pyx":806 + /* "pykeyvi.pyx":807 * * def __deepcopy__(self, memo): * cdef Match rv = Match.__new__(Match) # <<<<<<<<<<<<<< * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv */ - __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_rv = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":807 + /* "pykeyvi.pyx":808 * def __deepcopy__(self, memo): * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) # <<<<<<<<<<<<<< @@ -20253,7 +20266,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey */ __pyx_v_rv->inst = boost::shared_ptr (new keyvi::dictionary::Match((*__pyx_v_self->inst.get()))); - /* "pykeyvi.pyx":808 + /* "pykeyvi.pyx":809 * cdef Match rv = Match.__new__(Match) * rv.inst = shared_ptr[_Match](new _Match(deref(self.inst.get()))) * return rv # <<<<<<<<<<<<<< @@ -20265,7 +20278,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey __pyx_r = ((PyObject *)__pyx_v_rv); goto __pyx_L0; - /* "pykeyvi.pyx":805 + /* "pykeyvi.pyx":806 * return rv * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -20285,7 +20298,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_24__deepcopy__(struct __pyx_obj_7pykey return __pyx_r; } -/* "pykeyvi.pyx":810 +/* "pykeyvi.pyx":811 * return rv * * def _init_0(self): # <<<<<<<<<<<<<< @@ -20311,7 +20324,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_26_init_0(struct __pyx_obj_7pykeyvi_Ma __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_0", 0); - /* "pykeyvi.pyx":811 + /* "pykeyvi.pyx":812 * * def _init_0(self): * self.inst = shared_ptr[_Match](new _Match()) # <<<<<<<<<<<<<< @@ -20320,7 +20333,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_26_init_0(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_self->inst = boost::shared_ptr (new keyvi::dictionary::Match()); - /* "pykeyvi.pyx":810 + /* "pykeyvi.pyx":811 * return rv * * def _init_0(self): # <<<<<<<<<<<<<< @@ -20335,7 +20348,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_26_init_0(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":813 +/* "pykeyvi.pyx":814 * self.inst = shared_ptr[_Match](new _Match()) * * def _init_1(self, Match m ): # <<<<<<<<<<<<<< @@ -20352,7 +20365,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_29_init_1(PyObject *__pyx_v_self, PyOb PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_7pykeyvi_Match, 1, "m", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_7pykeyvi_Match, 1, "m", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7pykeyvi_5Match_28_init_1(((struct __pyx_obj_7pykeyvi_Match *)__pyx_v_self), ((struct __pyx_obj_7pykeyvi_Match *)__pyx_v_m)); /* function exit code */ @@ -20373,7 +20386,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_1", 0); - /* "pykeyvi.pyx":814 + /* "pykeyvi.pyx":815 * * def _init_1(self, Match m ): * assert isinstance(m, Match), 'arg m wrong type' # <<<<<<<<<<<<<< @@ -20385,12 +20398,12 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_m), __pyx_ptype_7pykeyvi_Match); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_m_wrong_type); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "pykeyvi.pyx":816 + /* "pykeyvi.pyx":817 * assert isinstance(m, Match), 'arg m wrong type' * * self.inst = shared_ptr[_Match](new _Match((deref(m.inst.get())))) # <<<<<<<<<<<<<< @@ -20399,7 +20412,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma */ __pyx_v_self->inst = boost::shared_ptr (new keyvi::dictionary::Match((*__pyx_v_m->inst.get()))); - /* "pykeyvi.pyx":813 + /* "pykeyvi.pyx":814 * self.inst = shared_ptr[_Match](new _Match()) * * def _init_1(self, Match m ): # <<<<<<<<<<<<<< @@ -20419,7 +20432,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_28_init_1(struct __pyx_obj_7pykeyvi_Ma return __pyx_r; } -/* "pykeyvi.pyx":818 +/* "pykeyvi.pyx":819 * self.inst = shared_ptr[_Match](new _Match((deref(m.inst.get())))) * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -20459,7 +20472,7 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pykeyvi.pyx":819 + /* "pykeyvi.pyx":820 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -20470,21 +20483,21 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":820 + /* "pykeyvi.pyx":821 * def __init__(self, *args): * if not args: * self._init_0(*args) # <<<<<<<<<<<<<< * elif (len(args)==1) and (isinstance(args[0], Match)): * self._init_1(*args) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":819 + /* "pykeyvi.pyx":820 * * def __init__(self, *args): * if not args: # <<<<<<<<<<<<<< @@ -20494,14 +20507,14 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * goto __pyx_L3; } - /* "pykeyvi.pyx":821 + /* "pykeyvi.pyx":822 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], Match)): # <<<<<<<<<<<<<< * self._init_1(*args) * else: */ - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { } else { @@ -20517,21 +20530,21 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":822 + /* "pykeyvi.pyx":823 * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], Match)): * self._init_1(*args) # <<<<<<<<<<<<<< * else: * raise Exception('can not handle type of %s' % (args,)) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pykeyvi.pyx":821 + /* "pykeyvi.pyx":822 * if not args: * self._init_0(*args) * elif (len(args)==1) and (isinstance(args[0], Match)): # <<<<<<<<<<<<<< @@ -20541,7 +20554,7 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * goto __pyx_L3; } - /* "pykeyvi.pyx":824 + /* "pykeyvi.pyx":825 * self._init_1(*args) * else: * raise Exception('can not handle type of %s' % (args,)) # <<<<<<<<<<<<<< @@ -20549,29 +20562,29 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * * def GetMatchedString(self): */ /*else*/ { - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_args); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_can_not_handle_type_of_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "pykeyvi.pyx":818 + /* "pykeyvi.pyx":819 * self.inst = shared_ptr[_Match](new _Match((deref(m.inst.get())))) * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -20592,7 +20605,7 @@ static int __pyx_pf_7pykeyvi_5Match_30__init__(struct __pyx_obj_7pykeyvi_Match * return __pyx_r; } -/* "pykeyvi.pyx":826 +/* "pykeyvi.pyx":827 * raise Exception('can not handle type of %s' % (args,)) * * def GetMatchedString(self): # <<<<<<<<<<<<<< @@ -20624,7 +20637,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetMatchedString", 0); - /* "pykeyvi.pyx":827 + /* "pykeyvi.pyx":828 * * def GetMatchedString(self): * cdef libcpp_string _r = self.inst.get().GetMatchedString() # <<<<<<<<<<<<<< @@ -20633,7 +20646,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p */ __pyx_v__r = __pyx_v_self->inst.get()->GetMatchedString(); - /* "pykeyvi.pyx":828 + /* "pykeyvi.pyx":829 * def GetMatchedString(self): * cdef libcpp_string _r = self.inst.get().GetMatchedString() * py_result = _r # <<<<<<<<<<<<<< @@ -20642,7 +20655,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p */ __pyx_v_py_result = ((std::string)__pyx_v__r); - /* "pykeyvi.pyx":829 + /* "pykeyvi.pyx":830 * cdef libcpp_string _r = self.inst.get().GetMatchedString() * py_result = _r * return py_result # <<<<<<<<<<<<<< @@ -20650,13 +20663,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p * def GetAttribute(self, key): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":826 + /* "pykeyvi.pyx":827 * raise Exception('can not handle type of %s' % (args,)) * * def GetMatchedString(self): # <<<<<<<<<<<<<< @@ -20675,7 +20688,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_32GetMatchedString(struct __pyx_obj_7p return __pyx_r; } -/* "pykeyvi.pyx":831 +/* "pykeyvi.pyx":832 * return py_result * * def GetAttribute(self, key): # <<<<<<<<<<<<<< @@ -20712,7 +20725,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey __Pyx_RefNannySetupContext("GetAttribute", 0); __Pyx_INCREF(__pyx_v_key); - /* "pykeyvi.pyx":832 + /* "pykeyvi.pyx":833 * * def GetAttribute(self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20723,22 +20736,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":833 + /* "pykeyvi.pyx":834 * def GetAttribute(self, key): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * py_result = self.inst.get().GetAttributePy( key) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":832 + /* "pykeyvi.pyx":833 * * def GetAttribute(self, key): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20747,23 +20760,23 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey */ } - /* "pykeyvi.pyx":835 + /* "pykeyvi.pyx":836 * key = key.encode("utf-8") * * py_result = self.inst.get().GetAttributePy( key) # <<<<<<<<<<<<<< * return py_result * */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_6 = __pyx_v_self->inst.get()->GetAttributePy(((std::string)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_py_result = __pyx_t_6; - /* "pykeyvi.pyx":836 + /* "pykeyvi.pyx":837 * * py_result = self.inst.get().GetAttributePy( key) * return py_result # <<<<<<<<<<<<<< @@ -20775,7 +20788,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":831 + /* "pykeyvi.pyx":832 * return py_result * * def GetAttribute(self, key): # <<<<<<<<<<<<<< @@ -20796,7 +20809,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_34GetAttribute(struct __pyx_obj_7pykey return __pyx_r; } -/* "pykeyvi.pyx":839 +/* "pykeyvi.pyx":840 * * * def SetAttribute(self, key, value): # <<<<<<<<<<<<<< @@ -20835,11 +20848,11 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_37SetAttribute(PyObject *__pyx_v_self, case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -20852,7 +20865,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_37SetAttribute(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("SetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Match.SetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20885,7 +20898,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __Pyx_RefNannySetupContext("SetAttribute", 0); __Pyx_INCREF(__pyx_v_key); - /* "pykeyvi.pyx":840 + /* "pykeyvi.pyx":841 * * def SetAttribute(self, key, value): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20896,22 +20909,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pykeyvi.pyx":841 + /* "pykeyvi.pyx":842 * def SetAttribute(self, key, value): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * t = type(value) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; - /* "pykeyvi.pyx":840 + /* "pykeyvi.pyx":841 * * def SetAttribute(self, key, value): * if isinstance(key, unicode): # <<<<<<<<<<<<<< @@ -20920,7 +20933,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey */ } - /* "pykeyvi.pyx":843 + /* "pykeyvi.pyx":844 * key = key.encode("utf-8") * * t = type(value) # <<<<<<<<<<<<<< @@ -20930,35 +20943,35 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); __pyx_v_t = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value))); - /* "pykeyvi.pyx":844 + /* "pykeyvi.pyx":845 * * t = type(value) * if t == str: # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value) * elif t == unicode: */ - __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":845 + /* "pykeyvi.pyx":846 * t = type(value) * if t == str: * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * elif t == unicode: * value_utf8 = value.encode("utf-8") */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((std::string)__pyx_t_6)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":844 + /* "pykeyvi.pyx":845 * * t = type(value) * if t == str: # <<<<<<<<<<<<<< @@ -20968,50 +20981,50 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":846 + /* "pykeyvi.pyx":847 * if t == str: * self.inst.get().SetAttribute( key, value) * elif t == unicode: # <<<<<<<<<<<<<< * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) */ - __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":847 + /* "pykeyvi.pyx":848 * self.inst.get().SetAttribute( key, value) * elif t == unicode: * value_utf8 = value.encode("utf-8") # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_value_utf8 = __pyx_t_3; __pyx_t_3 = 0; - /* "pykeyvi.pyx":848 + /* "pykeyvi.pyx":849 * elif t == unicode: * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) # <<<<<<<<<<<<<< * elif t == float: * self.inst.get().SetAttribute( key, value) */ - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value_utf8); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value_utf8); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_6), ((std::string)__pyx_t_5)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":846 + /* "pykeyvi.pyx":847 * if t == str: * self.inst.get().SetAttribute( key, value) * elif t == unicode: # <<<<<<<<<<<<<< @@ -21021,35 +21034,35 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":849 + /* "pykeyvi.pyx":850 * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value) * elif t == int: */ - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":850 + /* "pykeyvi.pyx":851 * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * elif t == int: * self.inst.get().SetAttribute( key, value) */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((float)__pyx_t_7)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":849 + /* "pykeyvi.pyx":850 * value_utf8 = value.encode("utf-8") * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: # <<<<<<<<<<<<<< @@ -21059,35 +21072,35 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":851 + /* "pykeyvi.pyx":852 * elif t == float: * self.inst.get().SetAttribute( key, value) * elif t == int: # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value) * # special trick as t == bool does not work due to name collision between cython and C */ - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_t), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":852 + /* "pykeyvi.pyx":853 * self.inst.get().SetAttribute( key, value) * elif t == int: * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((int)__pyx_t_8)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":851 + /* "pykeyvi.pyx":852 * elif t == float: * self.inst.get().SetAttribute( key, value) * elif t == int: # <<<<<<<<<<<<<< @@ -21097,7 +21110,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":854 + /* "pykeyvi.pyx":855 * self.inst.get().SetAttribute( key, value) * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): # <<<<<<<<<<<<<< @@ -21108,23 +21121,23 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pykeyvi.pyx":855 + /* "pykeyvi.pyx":856 * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): * self.inst.get().SetAttribute( key, value) # <<<<<<<<<<<<<< * else: * raise Exception("Unsupported Value Type") */ - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_key); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 == (bool)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetAttribute(((std::string)__pyx_t_5), ((bool)__pyx_t_9)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":854 + /* "pykeyvi.pyx":855 * self.inst.get().SetAttribute( key, value) * # special trick as t == bool does not work due to name collision between cython and C * elif isinstance(value, (int)): # <<<<<<<<<<<<<< @@ -21134,7 +21147,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey goto __pyx_L4; } - /* "pykeyvi.pyx":857 + /* "pykeyvi.pyx":858 * self.inst.get().SetAttribute( key, value) * else: * raise Exception("Unsupported Value Type") # <<<<<<<<<<<<<< @@ -21142,15 +21155,15 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey * */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; - /* "pykeyvi.pyx":839 + /* "pykeyvi.pyx":840 * * * def SetAttribute(self, key, value): # <<<<<<<<<<<<<< @@ -21175,7 +21188,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_36SetAttribute(struct __pyx_obj_7pykey return __pyx_r; } -/* "pykeyvi.pyx":860 +/* "pykeyvi.pyx":861 * * * def GetValue(self): # <<<<<<<<<<<<<< @@ -21216,7 +21229,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GetValue", 0); - /* "pykeyvi.pyx":862 + /* "pykeyvi.pyx":863 * def GetValue(self): * """Decodes a keyvi value and returns it.""" * value = self.inst.get().GetRawValueAsString() # <<<<<<<<<<<<<< @@ -21227,14 +21240,14 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_1 = __pyx_v_self->inst.get()->GetRawValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "pykeyvi.pyx":863 + /* "pykeyvi.pyx":864 * """Decodes a keyvi value and returns it.""" * value = self.inst.get().GetRawValueAsString() * if value is None or len(value) == 0: # <<<<<<<<<<<<<< @@ -21248,13 +21261,13 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((__pyx_t_6 == 0) != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "pykeyvi.pyx":864 + /* "pykeyvi.pyx":865 * value = self.inst.get().GetRawValueAsString() * if value is None or len(value) == 0: * return None # <<<<<<<<<<<<<< @@ -21266,7 +21279,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_r = Py_None; goto __pyx_L0; - /* "pykeyvi.pyx":863 + /* "pykeyvi.pyx":864 * """Decodes a keyvi value and returns it.""" * value = self.inst.get().GetRawValueAsString() * if value is None or len(value) == 0: # <<<<<<<<<<<<<< @@ -21275,20 +21288,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M */ } - /* "pykeyvi.pyx":866 + /* "pykeyvi.pyx":867 * return None * * elif value[0] == '\x00': # <<<<<<<<<<<<<< * return msgpack.loads(value[1:]) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__12, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__12, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pykeyvi.pyx":867 + /* "pykeyvi.pyx":868 * * elif value[0] == '\x00': * return msgpack.loads(value[1:]) # <<<<<<<<<<<<<< @@ -21296,12 +21309,12 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M * elif value[0] == '\x01': */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_loads); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_loads); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -21314,17 +21327,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -21333,7 +21346,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":866 + /* "pykeyvi.pyx":867 * return None * * elif value[0] == '\x00': # <<<<<<<<<<<<<< @@ -21342,32 +21355,32 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M */ } - /* "pykeyvi.pyx":869 + /* "pykeyvi.pyx":870 * return msgpack.loads(value[1:]) * * elif value[0] == '\x01': # <<<<<<<<<<<<<< * value = zlib.decompress(value[1:]) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pykeyvi.pyx":870 + /* "pykeyvi.pyx":871 * * elif value[0] == '\x01': * value = zlib.decompress(value[1:]) # <<<<<<<<<<<<<< * * elif value[0] == '\x02': */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zlib); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zlib); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decompress); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decompress); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__15, 1, 0, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__15, 1, 0, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { @@ -21380,17 +21393,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -21398,7 +21411,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "pykeyvi.pyx":869 + /* "pykeyvi.pyx":870 * return msgpack.loads(value[1:]) * * elif value[0] == '\x01': # <<<<<<<<<<<<<< @@ -21408,32 +21421,32 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M goto __pyx_L3; } - /* "pykeyvi.pyx":872 + /* "pykeyvi.pyx":873 * value = zlib.decompress(value[1:]) * * elif value[0] == '\x02': # <<<<<<<<<<<<<< * value = snappy.decompress(value[1:]) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pykeyvi.pyx":873 + /* "pykeyvi.pyx":874 * * elif value[0] == '\x02': * value = snappy.decompress(value[1:]) # <<<<<<<<<<<<<< * * return msgpack.loads(value) */ - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_snappy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_snappy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decompress); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decompress); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__17, 1, 0, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__17, 1, 0, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { @@ -21446,17 +21459,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_8) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -21464,7 +21477,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "pykeyvi.pyx":872 + /* "pykeyvi.pyx":873 * value = zlib.decompress(value[1:]) * * elif value[0] == '\x02': # <<<<<<<<<<<<<< @@ -21474,7 +21487,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } __pyx_L3:; - /* "pykeyvi.pyx":875 + /* "pykeyvi.pyx":876 * value = snappy.decompress(value[1:]) * * return msgpack.loads(value) # <<<<<<<<<<<<<< @@ -21482,9 +21495,9 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_loads); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_loads); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -21498,16 +21511,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M } } if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_value); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -21516,7 +21529,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M __pyx_t_2 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":860 + /* "pykeyvi.pyx":861 * * * def GetValue(self): # <<<<<<<<<<<<<< @@ -21540,7 +21553,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_38GetValue(struct __pyx_obj_7pykeyvi_M return __pyx_r; } -/* "pykeyvi.pyx":878 +/* "pykeyvi.pyx":879 * * * def dumps(self): # <<<<<<<<<<<<<< @@ -21585,19 +21598,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dumps", 0); - /* "pykeyvi.pyx":879 + /* "pykeyvi.pyx":880 * * def dumps(self): * m=[] # <<<<<<<<<<<<<< * do_pack_rest = False * score = self.inst.get().GetScore() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":880 + /* "pykeyvi.pyx":881 * def dumps(self): * m=[] * do_pack_rest = False # <<<<<<<<<<<<<< @@ -21606,40 +21619,40 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 0; - /* "pykeyvi.pyx":881 + /* "pykeyvi.pyx":882 * m=[] * do_pack_rest = False * score = self.inst.get().GetScore() # <<<<<<<<<<<<<< * if score != 0: * m.append(score) */ - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->inst.get()->GetScore()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->inst.get()->GetScore()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_score = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":882 + /* "pykeyvi.pyx":883 * do_pack_rest = False * score = self.inst.get().GetScore() * if score != 0: # <<<<<<<<<<<<<< * m.append(score) * do_pack_rest = True */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_score, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_score, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "pykeyvi.pyx":883 + /* "pykeyvi.pyx":884 * score = self.inst.get().GetScore() * if score != 0: * m.append(score) # <<<<<<<<<<<<<< * do_pack_rest = True * end = self.inst.get().GetEnd() */ - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_v_score); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_v_score); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":884 + /* "pykeyvi.pyx":885 * if score != 0: * m.append(score) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21648,7 +21661,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":882 + /* "pykeyvi.pyx":883 * do_pack_rest = False * score = self.inst.get().GetScore() * if score != 0: # <<<<<<<<<<<<<< @@ -21657,7 +21670,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":885 + /* "pykeyvi.pyx":886 * m.append(score) * do_pack_rest = True * end = self.inst.get().GetEnd() # <<<<<<<<<<<<<< @@ -21666,7 +21679,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_end = __pyx_v_self->inst.get()->GetEnd(); - /* "pykeyvi.pyx":886 + /* "pykeyvi.pyx":887 * do_pack_rest = True * end = self.inst.get().GetEnd() * if end != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21684,19 +21697,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":887 + /* "pykeyvi.pyx":888 * end = self.inst.get().GetEnd() * if end != 0 or do_pack_rest: * m.append(end) # <<<<<<<<<<<<<< * do_pack_rest = True * start = self.inst.get().GetStart() */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":888 + /* "pykeyvi.pyx":889 * if end != 0 or do_pack_rest: * m.append(end) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21705,7 +21718,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":886 + /* "pykeyvi.pyx":887 * do_pack_rest = True * end = self.inst.get().GetEnd() * if end != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21714,7 +21727,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":889 + /* "pykeyvi.pyx":890 * m.append(end) * do_pack_rest = True * start = self.inst.get().GetStart() # <<<<<<<<<<<<<< @@ -21723,7 +21736,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_start = __pyx_v_self->inst.get()->GetStart(); - /* "pykeyvi.pyx":890 + /* "pykeyvi.pyx":891 * do_pack_rest = True * start = self.inst.get().GetStart() * if start != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21741,19 +21754,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":891 + /* "pykeyvi.pyx":892 * start = self.inst.get().GetStart() * if start != 0 or do_pack_rest: * m.append(start) # <<<<<<<<<<<<<< * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":892 + /* "pykeyvi.pyx":893 * if start != 0 or do_pack_rest: * m.append(start) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21762,7 +21775,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":890 + /* "pykeyvi.pyx":891 * do_pack_rest = True * start = self.inst.get().GetStart() * if start != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21771,7 +21784,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":893 + /* "pykeyvi.pyx":894 * m.append(start) * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() # <<<<<<<<<<<<<< @@ -21780,16 +21793,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_matchedstring = __pyx_v_self->inst.get()->GetMatchedString(); - /* "pykeyvi.pyx":894 + /* "pykeyvi.pyx":895 * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() * if len(matchedstring) != 0 or do_pack_rest: # <<<<<<<<<<<<<< * m.append(matchedstring) * do_pack_rest = True */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((__pyx_t_5 != 0) != 0); if (!__pyx_t_4) { @@ -21802,19 +21815,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L11_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":895 + /* "pykeyvi.pyx":896 * matchedstring = self.inst.get().GetMatchedString() * if len(matchedstring) != 0 or do_pack_rest: * m.append(matchedstring) # <<<<<<<<<<<<<< * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_matchedstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":896 + /* "pykeyvi.pyx":897 * if len(matchedstring) != 0 or do_pack_rest: * m.append(matchedstring) * do_pack_rest = True # <<<<<<<<<<<<<< @@ -21823,7 +21836,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ __pyx_v_do_pack_rest = 1; - /* "pykeyvi.pyx":894 + /* "pykeyvi.pyx":895 * do_pack_rest = True * matchedstring = self.inst.get().GetMatchedString() * if len(matchedstring) != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21832,7 +21845,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":897 + /* "pykeyvi.pyx":898 * m.append(matchedstring) * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() # <<<<<<<<<<<<<< @@ -21843,20 +21856,20 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_t_6 = __pyx_v_self->inst.get()->GetRawValueAsString(); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_rawvalue = __pyx_t_6; - /* "pykeyvi.pyx":898 + /* "pykeyvi.pyx":899 * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() * if len(rawvalue) != 0 or do_pack_rest: # <<<<<<<<<<<<<< * m.append(rawvalue) * m.reverse() */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((__pyx_t_5 != 0) != 0); if (!__pyx_t_4) { @@ -21869,19 +21882,19 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_L14_bool_binop_done:; if (__pyx_t_2) { - /* "pykeyvi.pyx":899 + /* "pykeyvi.pyx":900 * rawvalue = self.inst.get().GetRawValueAsString() * if len(rawvalue) != 0 or do_pack_rest: * m.append(rawvalue) # <<<<<<<<<<<<<< * m.reverse() * return msgpack.dumps(m) */ - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rawvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_m, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":898 + /* "pykeyvi.pyx":899 * do_pack_rest = True * rawvalue = self.inst.get().GetRawValueAsString() * if len(rawvalue) != 0 or do_pack_rest: # <<<<<<<<<<<<<< @@ -21890,16 +21903,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc */ } - /* "pykeyvi.pyx":900 + /* "pykeyvi.pyx":901 * if len(rawvalue) != 0 or do_pack_rest: * m.append(rawvalue) * m.reverse() # <<<<<<<<<<<<<< * return msgpack.dumps(m) * */ - __pyx_t_3 = PyList_Reverse(__pyx_v_m); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_Reverse(__pyx_v_m); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":901 + /* "pykeyvi.pyx":902 * m.append(rawvalue) * m.reverse() * return msgpack.dumps(m) # <<<<<<<<<<<<<< @@ -21907,9 +21920,9 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc * def __SetRawValue(self, str): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dumps); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dumps); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -21923,16 +21936,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc } } if (!__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_m); __Pyx_GIVEREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_m); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -21941,7 +21954,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc __pyx_t_1 = 0; goto __pyx_L0; - /* "pykeyvi.pyx":878 + /* "pykeyvi.pyx":879 * * * def dumps(self): # <<<<<<<<<<<<<< @@ -21965,7 +21978,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_40dumps(struct __pyx_obj_7pykeyvi_Matc return __pyx_r; } -/* "pykeyvi.pyx":903 +/* "pykeyvi.pyx":904 * return msgpack.dumps(m) * * def __SetRawValue(self, str): # <<<<<<<<<<<<<< @@ -21995,22 +22008,22 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_42__SetRawValue(struct __pyx_obj_7pyke int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__SetRawValue", 0); - /* "pykeyvi.pyx":904 + /* "pykeyvi.pyx":905 * * def __SetRawValue(self, str): * self.inst.get().SetRawValue( str) # <<<<<<<<<<<<<< * * @staticmethod */ - __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_v_self->inst.get()->SetRawValue(((std::string)__pyx_t_1)); } catch(...) { __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "pykeyvi.pyx":903 + /* "pykeyvi.pyx":904 * return msgpack.dumps(m) * * def __SetRawValue(self, str): # <<<<<<<<<<<<<< @@ -22030,7 +22043,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_42__SetRawValue(struct __pyx_obj_7pyke return __pyx_r; } -/* "pykeyvi.pyx":907 +/* "pykeyvi.pyx":908 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< @@ -22067,7 +22080,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_45loads(CYTHON_UNUSED PyObject *__pyx_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loads") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loads") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -22078,7 +22091,7 @@ static PyObject *__pyx_pw_7pykeyvi_5Match_45loads(CYTHON_UNUSED PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("loads", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("loads", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("pykeyvi.Match.loads", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22109,28 +22122,28 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m int __pyx_clineno = 0; __Pyx_RefNannySetupContext("loads", 0); - /* "pykeyvi.pyx":908 + /* "pykeyvi.pyx":909 * @staticmethod * def loads(serialized_match): * m=Match() # <<<<<<<<<<<<<< * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":909 + /* "pykeyvi.pyx":910 * def loads(serialized_match): * m=Match() * unserialized = msgpack.loads(serialized_match) # <<<<<<<<<<<<<< * number_of_fields = len(unserialized) * if number_of_fields > 0: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_msgpack); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -22144,16 +22157,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_serialized_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_serialized_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_serialized_match); __Pyx_GIVEREF(__pyx_v_serialized_match); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_serialized_match); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -22161,17 +22174,17 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_v_unserialized = __pyx_t_1; __pyx_t_1 = 0; - /* "pykeyvi.pyx":910 + /* "pykeyvi.pyx":911 * m=Match() * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) # <<<<<<<<<<<<<< * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) */ - __pyx_t_5 = PyObject_Length(__pyx_v_unserialized); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Length(__pyx_v_unserialized); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_number_of_fields = __pyx_t_5; - /* "pykeyvi.pyx":911 + /* "pykeyvi.pyx":912 * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) * if number_of_fields > 0: # <<<<<<<<<<<<<< @@ -22181,16 +22194,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 0) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":912 + /* "pykeyvi.pyx":913 * number_of_fields = len(unserialized) * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) # <<<<<<<<<<<<<< * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetRawValue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetRawValue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22203,24 +22216,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":913 + /* "pykeyvi.pyx":914 * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) * if number_of_fields > 1: # <<<<<<<<<<<<<< @@ -22230,16 +22243,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 1) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":914 + /* "pykeyvi.pyx":915 * m.__SetRawValue(unserialized[0]) * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) # <<<<<<<<<<<<<< * if number_of_fields > 2: * m.SetStart(unserialized[2]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetMatchedString); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetMatchedString); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22252,24 +22265,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":915 + /* "pykeyvi.pyx":916 * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) * if number_of_fields > 2: # <<<<<<<<<<<<<< @@ -22279,16 +22292,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 2) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":916 + /* "pykeyvi.pyx":917 * m.SetMatchedString(unserialized[1]) * if number_of_fields > 2: * m.SetStart(unserialized[2]) # <<<<<<<<<<<<<< * if number_of_fields > 3: * m.SetEnd(unserialized[3]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetStart); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetStart); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_unserialized, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_unserialized, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22301,24 +22314,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":917 + /* "pykeyvi.pyx":918 * if number_of_fields > 2: * m.SetStart(unserialized[2]) * if number_of_fields > 3: # <<<<<<<<<<<<<< @@ -22328,16 +22341,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 3) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":918 + /* "pykeyvi.pyx":919 * m.SetStart(unserialized[2]) * if number_of_fields > 3: * m.SetEnd(unserialized[3]) # <<<<<<<<<<<<<< * if number_of_fields > 4: * m.SetScore(unserialized[4]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetEnd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetEnd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_unserialized, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22350,24 +22363,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":919 + /* "pykeyvi.pyx":920 * if number_of_fields > 3: * m.SetEnd(unserialized[3]) * if number_of_fields > 4: # <<<<<<<<<<<<<< @@ -22377,16 +22390,16 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_t_6 = ((__pyx_v_number_of_fields > 4) != 0); if (__pyx_t_6) { - /* "pykeyvi.pyx":920 + /* "pykeyvi.pyx":921 * m.SetEnd(unserialized[3]) * if number_of_fields > 4: * m.SetScore(unserialized[4]) # <<<<<<<<<<<<<< * * return m */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetScore); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_SetScore); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_unserialized, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { @@ -22399,24 +22412,24 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":919 + /* "pykeyvi.pyx":920 * if number_of_fields > 3: * m.SetEnd(unserialized[3]) * if number_of_fields > 4: # <<<<<<<<<<<<<< @@ -22425,7 +22438,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":917 + /* "pykeyvi.pyx":918 * if number_of_fields > 2: * m.SetStart(unserialized[2]) * if number_of_fields > 3: # <<<<<<<<<<<<<< @@ -22434,7 +22447,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":915 + /* "pykeyvi.pyx":916 * if number_of_fields > 1: * m.SetMatchedString(unserialized[1]) * if number_of_fields > 2: # <<<<<<<<<<<<<< @@ -22443,7 +22456,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":913 + /* "pykeyvi.pyx":914 * if number_of_fields > 0: * m.__SetRawValue(unserialized[0]) * if number_of_fields > 1: # <<<<<<<<<<<<<< @@ -22452,7 +22465,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":911 + /* "pykeyvi.pyx":912 * unserialized = msgpack.loads(serialized_match) * number_of_fields = len(unserialized) * if number_of_fields > 0: # <<<<<<<<<<<<<< @@ -22461,7 +22474,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m */ } - /* "pykeyvi.pyx":922 + /* "pykeyvi.pyx":923 * m.SetScore(unserialized[4]) * * return m # <<<<<<<<<<<<<< @@ -22473,7 +22486,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m __pyx_r = ((PyObject *)__pyx_v_m); goto __pyx_L0; - /* "pykeyvi.pyx":907 + /* "pykeyvi.pyx":908 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< @@ -22498,7 +22511,7 @@ static PyObject *__pyx_pf_7pykeyvi_5Match_44loads(PyObject *__pyx_v_serialized_m return __pyx_r; } -/* "pykeyvi.pyx":950 +/* "pykeyvi.pyx":951 * # self.it = it * * def __iter__(self): # <<<<<<<<<<<<<< @@ -22524,7 +22537,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator___iter__(struct __pyx_obj_7py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "pykeyvi.pyx":951 + /* "pykeyvi.pyx":952 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -22536,7 +22549,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator___iter__(struct __pyx_obj_7py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pykeyvi.pyx":950 + /* "pykeyvi.pyx":951 * # self.it = it * * def __iter__(self): # <<<<<<<<<<<<<< @@ -22551,7 +22564,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator___iter__(struct __pyx_obj_7py return __pyx_r; } -/* "pykeyvi.pyx":959 +/* "pykeyvi.pyx":960 * # del self.end * * def __next__(self): # <<<<<<<<<<<<<< @@ -22584,7 +22597,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); - /* "pykeyvi.pyx":962 + /* "pykeyvi.pyx":963 * # This works correctly by using "*it" and "*end" in the code, * #if co.dereference( self.it ) == co.dereference( self.end ) : * if self.it == self.end: # <<<<<<<<<<<<<< @@ -22594,20 +22607,20 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p __pyx_t_1 = ((__pyx_v_self->it == __pyx_v_self->end) != 0); if (__pyx_t_1) { - /* "pykeyvi.pyx":964 + /* "pykeyvi.pyx":965 * if self.it == self.end: * * raise StopIteration() # <<<<<<<<<<<<<< * cdef _Match * _r = new _Match(co.dereference( self.it )) * */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_StopIteration); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_StopIteration); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":962 + /* "pykeyvi.pyx":963 * # This works correctly by using "*it" and "*end" in the code, * #if co.dereference( self.it ) == co.dereference( self.end ) : * if self.it == self.end: # <<<<<<<<<<<<<< @@ -22616,7 +22629,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ } - /* "pykeyvi.pyx":965 + /* "pykeyvi.pyx":966 * * raise StopIteration() * cdef _Match * _r = new _Match(co.dereference( self.it )) # <<<<<<<<<<<<<< @@ -22625,7 +22638,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ __pyx_v__r = new keyvi::dictionary::Match((*__pyx_v_self->it)); - /* "pykeyvi.pyx":968 + /* "pykeyvi.pyx":969 * * # This also does the expected thing. * co.preincrement( self.it ) # <<<<<<<<<<<<<< @@ -22634,20 +22647,20 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ (++__pyx_v_self->it); - /* "pykeyvi.pyx":970 + /* "pykeyvi.pyx":971 * co.preincrement( self.it ) * * cdef Match py_result = Match.__new__(Match) # <<<<<<<<<<<<<< * py_result.inst = shared_ptr[_Match](_r) * */ - __pyx_t_2 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_tp_new_7pykeyvi_Match(((PyTypeObject *)__pyx_ptype_7pykeyvi_Match), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7pykeyvi_Match)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_result = ((struct __pyx_obj_7pykeyvi_Match *)__pyx_t_2); __pyx_t_2 = 0; - /* "pykeyvi.pyx":971 + /* "pykeyvi.pyx":972 * * cdef Match py_result = Match.__new__(Match) * py_result.inst = shared_ptr[_Match](_r) # <<<<<<<<<<<<<< @@ -22656,7 +22669,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p */ __pyx_v_py_result->inst = boost::shared_ptr (__pyx_v__r); - /* "pykeyvi.pyx":973 + /* "pykeyvi.pyx":974 * py_result.inst = shared_ptr[_Match](_r) * * return py_result # <<<<<<<<<<<<<< @@ -22668,7 +22681,7 @@ static PyObject *__pyx_pf_7pykeyvi_13MatchIterator_2__next__(struct __pyx_obj_7p __pyx_r = ((PyObject *)__pyx_v_py_result); goto __pyx_L0; - /* "pykeyvi.pyx":959 + /* "pykeyvi.pyx":960 * # del self.end * * def __next__(self): # <<<<<<<<<<<<<< @@ -27612,6 +27625,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_decompress, __pyx_k_decompress, sizeof(__pyx_k_decompress), 0, 0, 1, 1}, {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1}, + {&__pyx_n_s_default_os, __pyx_k_default_os, sizeof(__pyx_k_default_os), 0, 0, 1, 1}, {&__pyx_n_s_dumps, __pyx_k_dumps, sizeof(__pyx_k_dumps), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, @@ -27672,11 +27686,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -27733,80 +27747,80 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "pykeyvi.pyx":833 + /* "pykeyvi.pyx":834 * def GetAttribute(self, key): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * py_result = self.inst.get().GetAttributePy( key) */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "pykeyvi.pyx":841 + /* "pykeyvi.pyx":842 * def SetAttribute(self, key, value): * if isinstance(key, unicode): * key = key.encode("utf-8") # <<<<<<<<<<<<<< * * t = type(value) */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "pykeyvi.pyx":847 + /* "pykeyvi.pyx":848 * self.inst.get().SetAttribute( key, value) * elif t == unicode: * value_utf8 = value.encode("utf-8") # <<<<<<<<<<<<<< * self.inst.get().SetAttribute( key, value_utf8) * elif t == float: */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "pykeyvi.pyx":857 + /* "pykeyvi.pyx":858 * self.inst.get().SetAttribute( key, value) * else: * raise Exception("Unsupported Value Type") # <<<<<<<<<<<<<< * * */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_Value_Type); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_Value_Type); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "pykeyvi.pyx":867 + /* "pykeyvi.pyx":868 * * elif value[0] == '\x00': * return msgpack.loads(value[1:]) # <<<<<<<<<<<<<< * * elif value[0] == '\x01': */ - __pyx_slice__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__13); __Pyx_GIVEREF(__pyx_slice__13); - /* "pykeyvi.pyx":870 + /* "pykeyvi.pyx":871 * * elif value[0] == '\x01': * value = zlib.decompress(value[1:]) # <<<<<<<<<<<<<< * * elif value[0] == '\x02': */ - __pyx_slice__15 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__15 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__15); __Pyx_GIVEREF(__pyx_slice__15); - /* "pykeyvi.pyx":873 + /* "pykeyvi.pyx":874 * * elif value[0] == '\x02': * value = snappy.decompress(value[1:]) # <<<<<<<<<<<<<< * * return msgpack.loads(value) */ - __pyx_slice__17 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__17 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__17); __Pyx_GIVEREF(__pyx_slice__17); @@ -27822,17 +27836,17 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__18); __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hendrik_dev_git_cliqz_keyv, __pyx_n_s_JumpConsistentHashString, 34, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "pykeyvi.pyx":907 + /* "pykeyvi.pyx":908 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< * m=Match() * unserialized = msgpack.loads(serialized_match) */ - __pyx_tuple__20 = PyTuple_Pack(4, __pyx_n_s_serialized_match, __pyx_n_s_m, __pyx_n_s_unserialized, __pyx_n_s_number_of_fields); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__20 = PyTuple_Pack(4, __pyx_n_s_serialized_match, __pyx_n_s_m, __pyx_n_s_unserialized, __pyx_n_s_number_of_fields); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hendrik_dev_git_cliqz_keyv, __pyx_n_s_loads, 907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hendrik_dev_git_cliqz_keyv, __pyx_n_s_loads, 908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -27852,6 +27866,7 @@ static int __Pyx_InitGlobals(void) { __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -27976,33 +27991,33 @@ PyMODINIT_FUNC PyInit_pykeyvi(void) __pyx_type_7pykeyvi_loading_strategy_types.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "loading_strategy_types", (PyObject *)&__pyx_type_7pykeyvi_loading_strategy_types) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_loading_strategy_types = &__pyx_type_7pykeyvi_loading_strategy_types; - if (PyType_Ready(&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_CompletionDictionaryCompiler.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "CompletionDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "CompletionDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_CompletionDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_CompletionDictionaryCompiler = &__pyx_type_7pykeyvi_CompletionDictionaryCompiler; - if (PyType_Ready(&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_MultiWordCompletion.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "MultiWordCompletion", (PyObject *)&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "MultiWordCompletion", (PyObject *)&__pyx_type_7pykeyvi_MultiWordCompletion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_MultiWordCompletion = &__pyx_type_7pykeyvi_MultiWordCompletion; - if (PyType_Ready(&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_PredictiveCompression.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "PredictiveCompression", (PyObject *)&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "PredictiveCompression", (PyObject *)&__pyx_type_7pykeyvi_PredictiveCompression) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_PredictiveCompression = &__pyx_type_7pykeyvi_PredictiveCompression; - if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryGenerator", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryGenerator", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_KeyOnlyDictionaryGenerator = &__pyx_type_7pykeyvi_KeyOnlyDictionaryGenerator; - if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "KeyOnlyDictionaryCompiler", (PyObject *)&__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_KeyOnlyDictionaryCompiler = &__pyx_type_7pykeyvi_KeyOnlyDictionaryCompiler; - if (PyType_Ready(&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_Match.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "Match", (PyObject *)&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "Match", (PyObject *)&__pyx_type_7pykeyvi_Match) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_Match = &__pyx_type_7pykeyvi_Match; - if (PyType_Ready(&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi_MatchIterator.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "MatchIterator", (PyObject *)&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "MatchIterator", (PyObject *)&__pyx_type_7pykeyvi_MatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7pykeyvi_MatchIterator = &__pyx_type_7pykeyvi_MatchIterator; if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct___init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct___init_2.tp_print = 0; @@ -28049,40 +28064,40 @@ PyMODINIT_FUNC PyInit_pykeyvi(void) if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper = &__pyx_type_7pykeyvi___pyx_scope_struct_14__item_iterator_wrapper; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_15__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_15__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_15__init_2.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_15__init_2 = &__pyx_type_7pykeyvi___pyx_scope_struct_15__init_2; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_16_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_16_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_17_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_17_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_18___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_18___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_18___init__.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_18___init__ = &__pyx_type_7pykeyvi___pyx_scope_struct_18___init__; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_19_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_19_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_20_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_20_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_21__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_21__init_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_21__init_2.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_21__init_2 = &__pyx_type_7pykeyvi___pyx_scope_struct_21__init_2; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_22_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_22_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_23_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_23_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_24___init__.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_24___init__ = &__pyx_type_7pykeyvi___pyx_scope_struct_24___init__; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_25_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_25_genexpr; - if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr.tp_print = 0; __pyx_ptype_7pykeyvi___pyx_scope_struct_26_genexpr = &__pyx_type_7pykeyvi___pyx_scope_struct_26_genexpr; /*--- Type import code ---*/ @@ -28115,177 +28130,187 @@ PyMODINIT_FUNC PyInit_pykeyvi(void) /* "pykeyvi.pyx":490 * * cdef class loading_strategy_types: - * lazy = 0 # <<<<<<<<<<<<<< - * populate = 1 - * populate_key_part = 2 + * default_os = 0 # <<<<<<<<<<<<<< + * lazy = 1 + * populate = 2 */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_default_os, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); /* "pykeyvi.pyx":491 * cdef class loading_strategy_types: - * lazy = 0 - * populate = 1 # <<<<<<<<<<<<<< - * populate_key_part = 2 - * populate_lazy = 3 + * default_os = 0 + * lazy = 1 # <<<<<<<<<<<<<< + * populate = 2 + * populate_key_part = 3 */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); /* "pykeyvi.pyx":492 - * lazy = 0 - * populate = 1 - * populate_key_part = 2 # <<<<<<<<<<<<<< - * populate_lazy = 3 - * lazy_no_readahead = 4 + * default_os = 0 + * lazy = 1 + * populate = 2 # <<<<<<<<<<<<<< + * populate_key_part = 3 + * populate_lazy = 4 */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_key_part, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); /* "pykeyvi.pyx":493 - * populate = 1 - * populate_key_part = 2 - * populate_lazy = 3 # <<<<<<<<<<<<<< - * lazy_no_readahead = 4 - * lazy_no_readahead_value_part = 5 + * lazy = 1 + * populate = 2 + * populate_key_part = 3 # <<<<<<<<<<<<<< + * populate_lazy = 4 + * lazy_no_readahead = 5 */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_lazy, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_key_part, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); /* "pykeyvi.pyx":494 - * populate_key_part = 2 - * populate_lazy = 3 - * lazy_no_readahead = 4 # <<<<<<<<<<<<<< - * lazy_no_readahead_value_part = 5 - * populate_key_part_no_readahead_value_part = 6 + * populate = 2 + * populate_key_part = 3 + * populate_lazy = 4 # <<<<<<<<<<<<<< + * lazy_no_readahead = 5 + * lazy_no_readahead_value_part = 6 */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy_no_readahead, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_lazy, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); /* "pykeyvi.pyx":495 - * populate_lazy = 3 - * lazy_no_readahead = 4 - * lazy_no_readahead_value_part = 5 # <<<<<<<<<<<<<< - * populate_key_part_no_readahead_value_part = 6 - * + * populate_key_part = 3 + * populate_lazy = 4 + * lazy_no_readahead = 5 # <<<<<<<<<<<<<< + * lazy_no_readahead_value_part = 6 + * populate_key_part_no_readahead_value_part = 7 */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy_no_readahead_value_part, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy_no_readahead, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); /* "pykeyvi.pyx":496 - * lazy_no_readahead = 4 - * lazy_no_readahead_value_part = 5 - * populate_key_part_no_readahead_value_part = 6 # <<<<<<<<<<<<<< + * populate_lazy = 4 + * lazy_no_readahead = 5 + * lazy_no_readahead_value_part = 6 # <<<<<<<<<<<<<< + * populate_key_part_no_readahead_value_part = 7 + * + */ + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_lazy_no_readahead_value_part, __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); + + /* "pykeyvi.pyx":497 + * lazy_no_readahead = 5 + * lazy_no_readahead_value_part = 6 + * populate_key_part_no_readahead_value_part = 7 # <<<<<<<<<<<<<< * * cdef class CompletionDictionaryCompiler: */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_key_part_no_readahead_v, __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_loading_strategy_types->tp_dict, __pyx_n_s_populate_key_part_no_readahead_v, __pyx_int_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} PyType_Modified(__pyx_ptype_7pykeyvi_loading_strategy_types); - /* "pykeyvi.pyx":907 + /* "pykeyvi.pyx":908 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< * m=Match() * unserialized = msgpack.loads(serialized_match) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7pykeyvi_5Match_45loads, NULL, __pyx_n_s_pykeyvi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7pykeyvi_5Match_45loads, NULL, __pyx_n_s_pykeyvi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "pykeyvi.pyx":906 + /* "pykeyvi.pyx":907 * self.inst.get().SetRawValue( str) * * @staticmethod # <<<<<<<<<<<<<< * def loads(serialized_match): * m=Match() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_7pykeyvi_Match); - /* "pykeyvi.pyx":907 + /* "pykeyvi.pyx":908 * * @staticmethod * def loads(serialized_match): # <<<<<<<<<<<<<< * m=Match() * unserialized = msgpack.loads(serialized_match) */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_7pykeyvi_Match, __pyx_n_s_loads); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_7pykeyvi_Match, __pyx_n_s_loads); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "pykeyvi.pyx":906 + /* "pykeyvi.pyx":907 * self.inst.get().SetRawValue( str) * * @staticmethod # <<<<<<<<<<<<<< * def loads(serialized_match): * m=Match() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_7pykeyvi_Match->tp_dict, __pyx_n_s_loads, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_7pykeyvi_Match); - /* "pykeyvi.pyx":929 + /* "pykeyvi.pyx":930 * from libc.stdint cimport uint32_t * * import json # <<<<<<<<<<<<<< * import msgpack * import zlib */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":930 + /* "pykeyvi.pyx":931 * * import json * import msgpack # <<<<<<<<<<<<<< * import zlib * import snappy */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_msgpack, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_msgpack, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_msgpack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_msgpack, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":931 + /* "pykeyvi.pyx":932 * import json * import msgpack * import zlib # <<<<<<<<<<<<<< * import snappy * */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_zlib, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_zlib, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_zlib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_zlib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pykeyvi.pyx":932 + /* "pykeyvi.pyx":933 * import msgpack * import zlib * import snappy # <<<<<<<<<<<<<< * * # same import style as autowrap */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_snappy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_snappy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_snappy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_snappy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pykeyvi.pyx":1 diff --git a/pykeyvi/src/pykeyvi.pyx b/pykeyvi/src/pykeyvi.pyx index 2edd8a7b..0c846ca7 100644 --- a/pykeyvi/src/pykeyvi.pyx +++ b/pykeyvi/src/pykeyvi.pyx @@ -282,7 +282,7 @@ cdef class Dictionary: def _init_1(self, bytes filename , int in_1 ): assert isinstance(filename, bytes), 'arg filename wrong type' - assert in_1 in [0, 1, 2, 3, 4, 5, 6], 'arg in_1 wrong type' + assert in_1 in [0, 1, 2, 3, 4, 5, 6, 7], 'arg in_1 wrong type' cdef const_char * input_filename = filename self.inst = shared_ptr[_Dictionary](new _Dictionary(input_filename, (<_loading_strategy_types>in_1))) @@ -290,7 +290,7 @@ cdef class Dictionary: def __init__(self, *args): if (len(args)==1) and (isinstance(args[0], bytes)): self._init_0(*args) - elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6]): + elif (len(args)==2) and (isinstance(args[0], bytes)) and (args[1] in [0, 1, 2, 3, 4, 5, 6, 7]): self._init_1(*args) else: raise Exception('can not handle type of %s' % (args,)) @@ -487,13 +487,14 @@ cdef class ForwardBackwardCompletion: self.inst = shared_ptr[_ForwardBackwardCompletion](new _ForwardBackwardCompletion(input_in_0, input_in_1)) cdef class loading_strategy_types: - lazy = 0 - populate = 1 - populate_key_part = 2 - populate_lazy = 3 - lazy_no_readahead = 4 - lazy_no_readahead_value_part = 5 - populate_key_part_no_readahead_value_part = 6 + default_os = 0 + lazy = 1 + populate = 2 + populate_key_part = 3 + populate_lazy = 4 + lazy_no_readahead = 5 + lazy_no_readahead_value_part = 6 + populate_key_part_no_readahead_value_part = 7 cdef class CompletionDictionaryCompiler: diff --git a/pykeyvi/tests/dictionary/loading_test.py b/pykeyvi/tests/dictionary/loading_test.py new file mode 100644 index 00000000..f9c7fff2 --- /dev/null +++ b/pykeyvi/tests/dictionary/loading_test.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Usage: py.test tests + +import pykeyvi + +import sys +import os + +root = os.path.dirname(os.path.abspath(__file__)) +sys.path.append(os.path.join(root, "../")) + +def test_invalid_filemagic(): + fd = open('broken_file','w') + fd.write ('dead beef') + fd.close() + exception_caught = False + try: + d=pykeyvi.Dictionary('broken_file') + except ValueError: + exception_caught = True + + assert exception_caught + os.remove('broken_file') + +def test_truncated_file_json(): + c=pykeyvi.JsonDictionaryCompiler() + c.Add('a', '{1:2}') + c.Add('b', '{2:4}') + c.Add('c', '{4:4}') + c.Add('d', '{2:3}') + c.Compile() + + c.WriteToFile('truncation_test.kv') + size = os.path.getsize('truncation_test.kv') + + fd_in = open('truncation_test.kv') + fd = open('truncation_test1.kv', 'w') + fd.write(fd_in.read(size/2)) + fd.close() + + exception_caught = False + try: + d=pykeyvi.Dictionary('truncation_test1.kv') + except ValueError: + exception_caught = True + + assert exception_caught + os.remove('truncation_test1.kv') + os.remove('truncation_test.kv') \ No newline at end of file