charmxi sdag: match up parens/braces in connect generation code
authorPhil Miller <mille121@illinois.edu>
Mon, 26 Mar 2012 22:00:57 +0000 (17:00 -0500)
committerPhil Miller <mille121@illinois.edu>
Mon, 26 Mar 2012 22:00:57 +0000 (17:00 -0500)
src/xlat-i/sdag/CSdagConstruct.C

index 30a2677de2f59da12438ca29383a8990c190008b..9309fca6277b478209d7bb0cb51a1232a23a7c9b 100644 (file)
@@ -228,25 +228,29 @@ void SdagConstruct::generateEntryList(TList<CEntry*>& CEntrylist, SdagConstruct
 }
  
 void SdagConstruct::generateConnectEntries(XStr& op){
-   op << "  void " <<connectEntry->charstar() <<'(';
+   op << "  void " <<connectEntry->charstar() << "(";
    ParamList *pl = param;
    XStr msgParams;
    if (pl->isVoid() == 1) {
-     op << "void) {\n"; 
+     op << "void";
    }
    else if (pl->isMessage() == 1){
-     op << pl->getBaseName() <<" *" <<pl->getGivenName() <<") {\n";
+     op << pl->getBaseName() <<" *" <<pl->getGivenName();
    }
    else {
-    op << "CkMarshallMsg *" /*<< connectEntry->charstar()*/ <<"_msg) {\n";
+    op << "CkMarshallMsg *" /*<< connectEntry->charstar()*/ <<"_msg";
+   }
+   op << ") {\n";
+
+   if (!pl->isVoid() && !pl->isMessage()) {
     msgParams <<"   char *impl_buf= _msg->msgBuf;\n";
     param->beginUnmarshall(msgParams);
    }
+
    op << msgParams.charstar() <<"\n"; 
    op << "  " <<text->charstar() <<"\n";
 
    op << "  }\n";
-   
 }
 
 void SdagConstruct::generateConnectEntryList(TList<SdagConstruct*>& ConnectEList) {