diff options
| author | Paul Jones <paulj@lshift.net> | 2009-08-26 12:33:08 +0100 |
|---|---|---|
| committer | Paul Jones <paulj@lshift.net> | 2009-08-26 12:33:08 +0100 |
| commit | 341ddb9220dc3f9185554f056bb681e9a52a109f (patch) | |
| tree | 654aef4927925d67e7fe00b701ef903bbb6eac91 /codegen.py | |
| parent | 493a17637a4fabb7c7037d16b9e9c113b5c76dc9 (diff) | |
| download | rabbitmq-server-git-341ddb9220dc3f9185554f056bb681e9a52a109f.tar.gz | |
Also check for a nowait field on synchronous records
Diffstat (limited to 'codegen.py')
| -rw-r--r-- | codegen.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/codegen.py b/codegen.py index b46c4d3175..533192c507 100644 --- a/codegen.py +++ b/codegen.py @@ -119,7 +119,11 @@ def genErl(spec): print "method_has_content(%s) -> %s;" % (m.erlangName(), str(m.hasContent).lower()) def genMethodIsSynchronous(m): - print "is_method_synchronous(%s) -> %s;" % (m.erlangName(), str(m.isSynchronous).lower()) + hasNoWait = "nowait" in fieldNameList(m.arguments) + if m.isSynchronous and hasNoWait: + print "is_method_synchronous(#%s{nowait = NoWait}) -> not(NoWait);" % (m.erlangName()) + else: + print "is_method_synchronous(#%s{}) -> %s;" % (m.erlangName(), str(m.isSynchronous).lower()) def genMethodFieldTypes(m): """Not currently used - may be useful in future?""" |
