@@@ lbuf needs test
[mLib-python] / utils.pyx
index eab722f..4d7d06f 100644 (file)
--- a/utils.pyx
+++ b/utils.pyx
@@ -38,14 +38,14 @@ cdef int _getfd(object fdobj):
     fd = fdobj.fileno()
   return fd
 
-#cdef object _checkcallable(object f, object what):
-#  if f is not None and not callable(f):
-#    raise TypeError('%s must be callable' % what)
-#  return f
+cdef object _checkcallable(object f, object what):
+  if f is not None and not callable(f):
+    raise TypeError('%s must be callable' % what)
+  return f
 
-#cdef object _maybecall(object f, object args):
-#  if f is None:
-#    return None
-#  return f(*args)
+cdef object _maybecall(object f, object args):
+  if f is None:
+    return None
+  return f(*args)
 
 ###----- That's all, folks --------------------------------------------------