- def trace_function_fail(self, function):
- if function.fail is not None:
- if function.type is stdapi.Void:
- assert function.fail == ''
- print ' return;'
- else:
- assert function.fail != ''
- print ' return %s;' % function.fail
- else:
- print ' Trace::Abort();'
-
- def get_function_address(self, function):
- raise NotImplementedError
-
- def _get_true_pointer(self, function):
- ptype = self.function_pointer_type(function)
- pvalue = self.function_pointer_value(function)
- print ' if(!%s) {' % (pvalue,)
- print ' %s = (%s)%s;' % (pvalue, ptype, self.get_function_address(function))
- print ' if(!%s)' % (pvalue,)
- self.trace_function_fail(function)
- print ' }'
+ def get_dispatch_function(self, function):
+ return '__' + function.name