From a2d21f67f901ec34799819ba47b9579ac78bf112 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 23 Nov 2009 14:40:32 +0800 Subject: mesa/es: Generate code for special functions. es_generator.py did not generate code for special functions. They were supposed to be defined elsewhere. But as a result, parameter checking was also skipped. This commit changes the way special functions are called so that parameter checking is always performed. When there is nothing to check, the check functions becomes macros expanding to the real functions, as an optimization. Signed-off-by: Chia-I Wu --- src/mesa/es/main/APIspecutil.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/es/main/APIspecutil.py') diff --git a/src/mesa/es/main/APIspecutil.py b/src/mesa/es/main/APIspecutil.py index 5bfb699ba7..27a8fe8a6d 100644 --- a/src/mesa/es/main/APIspecutil.py +++ b/src/mesa/es/main/APIspecutil.py @@ -59,8 +59,11 @@ def _ParseXML(filename, apiname): for func in api.functions: alias, need_conv = impl.match(func, conversions) if not alias: - print >>sys.stderr, "Error: unable to dispatch %s" % func.name + # external functions are manually dispatched + if not func.is_external: + print >>sys.stderr, "Error: unable to dispatch %s" % func.name alias = func + need_conv = False __functions[func.name] = func __aliases[func.name] = (alias, need_conv) -- cgit v1.2.3