From 64d3f248c50950798157386399f09ec693b6bb6b Mon Sep 17 00:00:00 2001 From: doomchild Date: Tue, 22 Mar 2011 11:42:59 -0500 Subject: [PATCH] fixed a missing import, a type error, and a misspell --- dfhack-python/window_io.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dfhack-python/window_io.py b/dfhack-python/window_io.py index 8be4ff9c0..0e29b86fc 100644 --- a/dfhack-python/window_io.py +++ b/dfhack-python/window_io.py @@ -1,4 +1,5 @@ from ctypes import * +from dftypes import libdfhack libdfhack.WindowIO_TypeStr.argtypes = [ c_void_p, c_char_p, c_uint, c_byte ] libdfhack.WindowIO_TypeSpecial.argtypes = [ c_void_p, c_uint, c_uint, c_uint, c_uint ] @@ -9,7 +10,7 @@ class WindowIO(object): def type_str(self, s, delay = 0, use_shift = False): c_shift = c_byte(0) - c_delay = c_int(delay) + c_delay = c_uint(delay) c_s = c_char_p(s) if use_shift is True: @@ -22,4 +23,4 @@ class WindowIO(object): c_count = c_uint(count) c_delay = c_uint(delay) - return libdfhack.WindwIO_TypeSpecial(self._window_io_ptr, c_command, c_count, c_delay) > 0 \ No newline at end of file + return libdfhack.WindowIO_TypeSpecial(self._window_io_ptr, c_command, c_count, c_delay) > 0 \ No newline at end of file