def fail_impl(self):
if self.fail is not None:
- assert self.type is not Void
- print ' return %s;' % self.fail
+ if self.type is Void:
+ assert self.fail == ''
+ print ' return;'
+ else:
+ assert self.fail != ''
+ print ' return %s;' % self.fail
else:
print ' ExitProcess(0);'
print ' Log::EndReturn();'
self.type.wrap_instance('result')
print ' Log::EndCall();'
+ self.post_call_impl()
if self.type is not Void:
print ' return result;'
print '}'
print
+ def post_call_impl(self):
+ pass
+
class Interface(Type):
Type.__init__(self, "String")
def __str__(self):
- return "char *"
+ return "const char *"
def dump(self, instance):
print ' Log::DumpString((const char *)%s);' % instance
String = _String()
+class _WString(Type):
+
+ def __init__(self):
+ Type.__init__(self, "WString")
+
+ def __str__(self):
+ return "const wchar_t *"
+
+ def dump(self, instance):
+ print ' Log::DumpWString(%s);' % instance
+
+WString = _WString()
+
SChar = Intrinsic("signed char", "%i")
UChar = Intrinsic("unsigned char", "%u")