@@ -117,6 +117,13 @@ def genMethodId(m):
117117
118118 def genMethodHasContent (m ):
119119 print "method_has_content(%s) -> %s;" % (m .erlangName (), str (m .hasContent ).lower ())
120+
121+ def genMethodIsSynchronous (m ):
122+ hasNoWait = "nowait" in fieldNameList (m .arguments )
123+ if m .isSynchronous and hasNoWait :
124+ print "is_method_synchronous(#%s{nowait = NoWait}) -> not(NoWait);" % (m .erlangName ())
125+ else :
126+ print "is_method_synchronous(#%s{}) -> %s;" % (m .erlangName (), str (m .isSynchronous ).lower ())
120127
121128 def genMethodFieldTypes (m ):
122129 """Not currently used - may be useful in future?"""
@@ -246,6 +253,7 @@ def genLookupException1(c,hardErrorBoolStr):
246253
247254-export([method_id/1]).
248255-export([method_has_content/1]).
256+ -export([is_method_synchronous/1]).
249257-export([method_fieldnames/1]).
250258-export([decode_method_fields/2]).
251259-export([decode_properties/2]).
@@ -266,6 +274,9 @@ def genLookupException1(c,hardErrorBoolStr):
266274 for m in methods : genMethodHasContent (m )
267275 print "method_has_content(Name) -> exit({unknown_method_name, Name})."
268276
277+ for m in methods : genMethodIsSynchronous (m )
278+ print "is_method_synchronous(Name) -> exit({unknown_method_name, Name})."
279+
269280 for m in methods : genMethodFieldNames (m )
270281 print "method_fieldnames(Name) -> exit({unknown_method_name, Name})."
271282
0 commit comments