Two tiny IPDL fixes.

This commit is contained in:
Ben Turner 2009-10-07 16:52:41 -07:00
parent 80b478e8c5
commit 63699d2cd3

View File

@ -384,6 +384,8 @@ class GenerateProtocolHeader(Visitor):
opeqdecl.params[0].type = copyintype
opeq = cxx.MethodDefn(opeqdecl)
opeq.addstmt(cxx.StmtExpr(cxx.ExprAssn(mtypevar, enumvar)))
opeq.addstmt(cxx.StmtExpr(
cxx.ExprNew(cxxt, args=[ ], newargs=[ callptrmeth ])))
opeq.addstmt(cxx.StmtExpr(
cxx.ExprAssn(cxx.ExprDeref(callptrmeth),
rhsvar)))
@ -391,6 +393,8 @@ class GenerateProtocolHeader(Visitor):
opeqs.append(opeq)
opeqswitch.addstmt(caselabel)
opeqswitch.addstmt(cxx.StmtExpr(
cxx.ExprNew(cxxt, args=[ ], newargs=[ callptrmeth ])))
opeqswitch.addstmt(cxx.StmtExpr(
cxx.ExprAssn(
cxx.ExprDeref(callptrmeth),
@ -1993,8 +1997,7 @@ class GenerateProtocolActorHeader(Visitor):
uavar = cxx.ExprVar('__ua')
failif = cxx.StmtIf(cxx.ExprPrefixUnop(uavar, '!'))
failif.addifstmt(cxx.StmtReturn(
cxx.ExprVar('MsgValueError')))
failif.addifstmt(cxx.StmtReturn(valueerrcode))
ifhandle.addifstmt(failif)
# finally, slam the actor back into the union