]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - include/c++/orb.h
Explicitly set unsigned long array size in GUID union.
[polintos/scott/priv.git] / include / c++ / orb.h
index a2ead4d67fde25486c28f3412fcc0030265c00a1..fa2f54846379c067e84acbfff1e3a8a93028c75d 100644 (file)
@@ -43,7 +43,7 @@ namespace System {
                
                union GUID {
                        unsigned char c[16];
-                       unsigned long l[];
+                       unsigned long l[16 / sizeof(unsigned long)];
                };
 
                uintptr_t downcast(::System::_i_Object *obj, const GUID *new_guid);
@@ -123,6 +123,14 @@ namespace System {
                        uint32_t reserved[3]; // must be zero
                };
 
+               struct MarshCtx {
+                       GrowableArray<uint8_t, ORBMM> &buf;
+                       GrowableArray<ID, ORBMM> &objlist;
+                       GrowableArray<NewObject, ORBMM> &newobjlist;
+                       ParamInfoBlock::Segment *segs;
+                       int nsegs;
+               };
+
                struct VStructInfo {
                        // List of GUIDs of the struct and its superstructs,
                        // starting with System.VStruct and ending with
@@ -134,17 +142,10 @@ namespace System {
                        
                        const int chainlen;
 
-                       int (*marshall)(GrowableArray<uint8_t, ORBMM> &buf,
-                                       GrowableArray<ID, ORBMM> &objlist,
-                                       GrowableArray<NewObject, ORBMM> &newobjlist,
-                                       ParamInfoBlock::Segment *segs,
-                                       int nsegs);
-                       void (*unmarshall)(Array<uint8_t, ORBMM> buf,
-                                          Array< ::System::_i_Object *, ORBMM> objlist,
-                                          ParamInfoBlock::Segment *segs,
-                                          int nsegs);
+                       int (*marshall)(MarshCtx &ctx);
+                       void (*unmarshall)(MarshCtx &ctx);
                };
-               
+
                namespace Priv {
                        // Return the caller's PC.  It'd be nice if GCC had a builtin for
                        // the current PC, so that a simple relocation could be used rather
@@ -161,6 +162,7 @@ namespace System {
                                return false;
 #endif
                        }
+
                }
        };
 }