]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - idlcomp/languages/c++/marshall.cc
Some weak symbol usage, and some marshalling stuff.
[polintos/scott/priv.git] / idlcomp / languages / c++ / marshall.cc
index 8425ddd3aa312b8b97a02cc9b4d199f8a561fb75..6deb115ad7f2842a10c7a6accc6db0356456d7f2 100644 (file)
@@ -25,7 +25,7 @@ void CPPFile::output_ifaceinfo(Interface *iface)
             << indent << "             int nsegs);\n\n";
 #endif
 
-       file << indent << "static const __attribute__((unused))\n"
+       file << indent << "__attribute__((weak)) __attribute__((unused))\n"
             << indent << "::System::RunTime::IFaceInfo _info = {\n"
             << indent << "\t&_guid,\n"
             << indent << "};\n";
@@ -33,8 +33,24 @@ void CPPFile::output_ifaceinfo(Interface *iface)
        do_extra_newline = true;
 }
 
-void CPPFile::output_marshall(Struct *sym)
+void CPPFile::output_marshall(Struct *sym, int pass)
 {
-       file << indent;
-       
+       switch (pass) {
+               case trav_nsdecl:
+                       extra_newline();
+                       
+                       file << indent << "int _marshall(::System::RunTime::GrowableArray<uint8_t> &buf,\n"
+                            << indent << "              ::System::RunTime::GrowableArray< ::System::RunTime::ID> &objlist,\n"
+                            << indent << "              ::System::RunTime::GrowableArray< ::System::RunTime::NewObject> &newobjlist,\n"
+                            << indent << "              ::System::RunTime::ParamInfoBlock::Segment *segs,\n"
+                            << indent << "              int nsegs);\n";
+
+                       file << indent << "void _unmarshall(::System::RunTime::Array<uint8_t> buf,\n"
+                            << indent << "                 ::System::RunTime::Array< ::System::_i_Object *> objlist,\n"
+                            << indent << "                 ::System::RunTime::ParamInfoBlock::Segment *segs,\n"
+                            << indent << "                 int nsegs);\n";
+
+                       do_extra_newline = true;
+                       break;
+       }
 }