[pypy-svn] r38042 - pypy/dist/pypy/lang/prolog/builtin

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Feb 7 00:56:28 CET 2007


Author: cfbolz
Date: Wed Feb  7 00:56:27 2007
New Revision: 38042

Modified:
   pypy/dist/pypy/lang/prolog/builtin/control.py
Log:
use available helper


Modified: pypy/dist/pypy/lang/prolog/builtin/control.py
==============================================================================
--- pypy/dist/pypy/lang/prolog/builtin/control.py	(original)
+++ pypy/dist/pypy/lang/prolog/builtin/control.py	Wed Feb  7 00:56:27 2007
@@ -36,8 +36,7 @@
         next_call = self.next_call.dereference(engine.frame)
         if isinstance(next_call, term.Var):
             error.throw_instantiation_error()
-        if not isinstance(next_call, term.Callable):
-            error.throw_type_error('callable', next_call)
+        next_call = helper.ensure_callable(next_call)
         return engine.call(next_call, self.continuation)
 
 def impl_and(engine, call1, call2, continuation):



More information about the Pypy-commit mailing list