From eae5efbf112a8697309fe7c1e385a8609124520e Mon Sep 17 00:00:00 2001 From: Victor Chahuneau Date: Wed, 8 Aug 2012 18:56:02 -0400 Subject: [python] Get rid of the GIL --- python/src/_cdec.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/src/_cdec.pyx') diff --git a/python/src/_cdec.pyx b/python/src/_cdec.pyx index e93474fe..af4e5f2f 100644 --- a/python/src/_cdec.pyx +++ b/python/src/_cdec.pyx @@ -25,6 +25,9 @@ decoder.register_feature_functions() class InvalidConfig(Exception): pass class ParseFailed(Exception): pass +def set_silent(yn): + SetSilent(yn) + def _make_config(config): for key, value in config.items(): if isinstance(value, dict): @@ -82,7 +85,7 @@ cdef class Decoder: property formalism: def __get__(self): cdef variables_map* conf = &self.dec.GetConf() - return conf[0]['formalism'].as_str() + return conf[0]['formalism'].as_str().c_str() def read_weights(self, weights): with open(weights) as fp: -- cgit v1.2.3