提交 2a8f2715 authored 作者: James Bergstra's avatar James Bergstra

fixed assert in CLazyLinker

上级 0a937a6e
...@@ -783,7 +783,7 @@ CLazyLinker_call(PyObject *_self, PyObject *args, PyObject *kwds) ...@@ -783,7 +783,7 @@ CLazyLinker_call(PyObject *_self, PyObject *args, PyObject *kwds)
// save references to outputs prior to updating storage containers // save references to outputs prior to updating storage containers
if ((call_i + 1) == n_calls) if ((call_i + 1) == n_calls)
{ {
assert (self->n_output_vars > self->n_updates); assert (self->n_output_vars >= self->n_updates);
Py_DECREF(rval); Py_DECREF(rval);
rval = PyList_New(self->n_output_vars); rval = PyList_New(self->n_output_vars);
for (int i = 0; i < (self->n_output_vars); ++i) for (int i = 0; i < (self->n_output_vars); ++i)
...@@ -886,7 +886,7 @@ static PyTypeObject lazylinker_ext_CLazyLinkerType = { ...@@ -886,7 +886,7 @@ static PyTypeObject lazylinker_ext_CLazyLinkerType = {
static PyObject * get_version(PyObject *dummy, PyObject *args) static PyObject * get_version(PyObject *dummy, PyObject *args)
{ {
PyObject *result = PyFloat_FromDouble(0.12); PyObject *result = PyFloat_FromDouble(0.13);
return result; return result;
} }
......
...@@ -13,7 +13,7 @@ if config.compiledir not in sys.path: ...@@ -13,7 +13,7 @@ if config.compiledir not in sys.path:
sys.path.append(config.compiledir) sys.path.append(config.compiledir)
force_compile = False force_compile = False
version = 0.12 # must match constant returned in function get_version() version = 0.13 # must match constant returned in function get_version()
try: try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论