Re: [gnomemm] Re: libbonobomm



OK. Here you are.

On Fri, 2002-06-28 at 18:29, Murray Cumming wrote:
> On Sat, 2002-06-29 at 17:15, Felix Breuer wrote:
> > I got round to take a look at this problem again and found a solution.
> > Apparently naming a member of a structure "namespace" confuses the
> > compiler, as this is also a keyword. I do not know whether this is
> > correct, as this is a C and not a C++ file, but nonetheless I had this
> > problem with GCC version 2.95 and 3.0. 
> 
> I'm using gcc 2.96RH and it seems to be OK. I think that the C files are
> parsed as C, and we don't need to use that keyword in the C++. It is
> annoying however - somebody changed it from "ns" to "namespace"
> recently. It could have been prevented if the person who chose "ns" had
> added a comment. 
> 
> > I do not know how to create a patch file, but I will just paste the
> > output of `cvs diff -r cpp` here. I hope it is not too inconvenient that
> > way:
> 
> You are almost there. Just direct it to a text file like so, and please
> use this format option.
> 
> cvs diff -up > cpp
> 
> Then I'll investigate.
> 
> -- 
> Murray Cumming
> murrayc@usa.net
> www.murrayc.com
> 

? ORBit-2.0-cpp.pc
? namespace2ns.patch
? src/idl-compiler/cpp/types/Makefile
? src/idl-compiler/cpp/types/Makefile.in
? test/cpp/Makefile
? test/cpp/Makefile.in
? test/cpp/helloworld/Makefile
? test/cpp/helloworld/Makefile.in
? test/cpp/helloworld/generated/Makefile
? test/cpp/helloworld/generated/Makefile.in
? test/cpp/struct-simple/Makefile
? test/cpp/struct-simple/Makefile.in
Index: src/idl-compiler/orbit-idl-driver.c
===================================================================
RCS file: /cvs/gnome/ORBit2/src/idl-compiler/orbit-idl-driver.c,v
retrieving revision 1.23.2.2
diff -u -p -r1.23.2.2 orbit-idl-driver.c
--- src/idl-compiler/orbit-idl-driver.c	17 Jun 2002 09:26:45 -0000	1.23.2.2
+++ src/idl-compiler/orbit-idl-driver.c	28 Jun 2002 17:02:38 -0000
@@ -39,7 +39,7 @@ int
 orbit_idl_to_backend(const char *filename, OIDL_Run_Info *rinfo)
 {
   OIDL_Backend_Info *binfo;
-  IDL_ns namespace;
+  IDL_ns ns;
   IDL_tree tree;
   int errcode;
   char *fbasename, *ctmp;
@@ -50,7 +50,7 @@ orbit_idl_to_backend(const char *filenam
   g_return_val_if_fail(binfo && binfo->op_output, 0);
 
   errcode = IDL_parse_filename(filename, rinfo->cpp_args, NULL,
-			       &tree, &namespace,
+			       &tree, &ns,
 			       (rinfo->show_cpp_errors?IDLF_SHOW_CPP_ERRORS:0)
 			       |IDLF_TYPECODES
 			       |IDLF_SRCFILES
@@ -59,7 +59,7 @@ orbit_idl_to_backend(const char *filenam
 			         ?(IDLF_INHIBIT_INCLUDES):0)
 			       |IDLF_CODEFRAGS,
 			       rinfo->idl_warn_level);
-  rinfo->namespace = namespace;
+  rinfo->ns = ns;
 
   if(rinfo->debug_level > 3)
     orbit_idl_print_node(tree, 0);
@@ -78,7 +78,7 @@ orbit_idl_to_backend(const char *filenam
 
   otree.tree = tree;
 
-  orbit_idl_tree_populate(otree.tree, namespace, &otree, TRUE);
+  orbit_idl_tree_populate(otree.tree, ns, &otree, TRUE);
   otree.ctxt = oidl_marshal_context_new (tree);
   if(rinfo->debug_level > 2)
     {
@@ -86,7 +86,7 @@ orbit_idl_to_backend(const char *filenam
       oidl_marshal_context_dump(otree.ctxt);
     }
 
-  orbit_idl_tree_populate(otree.tree, namespace, &otree, FALSE);
+  orbit_idl_tree_populate(otree.tree, ns, &otree, FALSE);
   orbit_idl_do_passes(otree.tree, rinfo);
 
   binfo->op_output(&otree, rinfo);
Index: src/idl-compiler/orbit-idl3-types.h
===================================================================
RCS file: /cvs/gnome/ORBit2/src/idl-compiler/orbit-idl3-types.h,v
retrieving revision 1.16.2.3
diff -u -p -r1.16.2.3 orbit-idl3-types.h
--- src/idl-compiler/orbit-idl3-types.h	17 Jun 2002 09:26:45 -0000	1.16.2.3
+++ src/idl-compiler/orbit-idl3-types.h	28 Jun 2002 17:02:38 -0000
@@ -42,7 +42,7 @@ typedef struct {
   gboolean small_skels;
   gboolean idata;
 
-  IDL_ns namespace;
+  IDL_ns ns;
 } OIDL_Run_Info;
 
 /* yadda yadda:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]