After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 95791 - imodules ommit typecodes for nested structs
imodules ommit typecodes for nested structs
Status: RESOLVED FIXED
Product: ORBit2
Classification: Deprecated
Component: IDL compiler
2.4.X
Other All
: Normal normal
: ---
Assigned To: ORBit maintainers
ORBit maintainers
Depends on:
Blocks:
 
 
Reported: 2002-10-15 08:15 UTC by James Henstridge
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to list nested structs in imodules (3.17 KB, patch)
2002-10-16 13:35 UTC, James Henstridge
none Details | Review
patch v2: enum defs can also be nested, and exceptions can have nested structs, etc (3.90 KB, patch)
2002-10-16 13:56 UTC, James Henstridge
none Details | Review

Description James Henstridge 2002-10-15 08:15:52 UTC
While investigating bug 95591, I ran into another imodule bug: nested
structures are not returned by ORBit_small_get_types().

If I have the following input:
  module testing {
    struct ParentStruct {
      struct ChildStruct {
        long a;
      } a;
    };
  };

and generate an imodule, the imodule will only list TC_testing_ParentStruct
and skip TC_testing_ParentStruct_ChildStruct.  I see a similar behaviour
for structs nested in unions (and would probably see the same for unions
nested in structs and unions nested in unions).

I would expect the nested struct type code to be listed after the parent one.
Comment 1 James Henstridge 2002-10-16 13:35:57 UTC
Created attachment 11590 [details] [review]
patch to list nested structs in imodules
Comment 2 James Henstridge 2002-10-16 13:56:52 UTC
Created attachment 11591 [details] [review]
patch v2:  enum defs can also be nested, and exceptions can have nested structs, etc
Comment 3 James Henstridge 2002-10-16 14:00:54 UTC
The above patch adds support for nested structs, unions and enums
inside structs, unions and exceptions.  It also puts enumeration
discriminants after their unions, as suggested in bug 95591.

If this patch looks okay, it should probably be applied to HEAD and
gnome-2-0 branches.
Comment 4 Michael Meeks 2002-10-16 14:27:13 UTC
PAtch looks fine, it might be nice to move this cut and paste block:

+		gchar *id;
+		id = orbit_cbe_get_typespec_str (tree);
+		fprintf (ci->fh, "\tTC_%s,\n", id);
+		(*count)++;
+		g_free (id);

into a separate method if it makes sense. Apart from that looks great
for HEAD & stable; please commit; thanks.
Comment 5 James Henstridge 2002-10-16 14:53:00 UTC
patch committed to HEAD and gnome-2-0 branches.