From cfa91cea96b6aa688cdab2240147b8800ec0fce5 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sat, 20 Feb 2016 21:11:00 +0300 Subject: [PATCH] tox.py fix creating tox_options --- src/tox.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tox.py b/src/tox.py index ca1c176..4ade7a1 100644 --- a/src/tox.py +++ b/src/tox.py @@ -111,8 +111,9 @@ class Tox(object): :return: A pointer to new ToxOptions object with default options or raise MemoryError. """ tox_err_options_new = c_int() - Tox.libtoxcore.tox_options_new.restype = POINTER(ToxOptions) - result = Tox.libtoxcore.tox_options_new(addressof(tox_err_options_new)) + f = Tox.libtoxcore.tox_options_new + f.restype = POINTER(ToxOptions) + result = f(addressof(tox_err_options_new)) tox_err_options_new = tox_err_options_new.value if tox_err_options_new == TOX_ERR_OPTIONS_NEW['TOX_ERR_OPTIONS_NEW_OK']: return result