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 171012 - several function definitions are inconsistent with respect to the use of "const"
several function definitions are inconsistent with respect to the use of "const"
Status: RESOLVED FIXED
Product: ORBit2
Classification: Deprecated
Component: general
2.12.x
Other IRIX
: Normal normal
: ---
Assigned To: ORBit maintainers
ORBit maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-20 17:18 UTC by Georg Schwarz
Modified: 2006-11-10 13:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch as an attachment (5.52 KB, patch)
2006-10-22 14:24 UTC, Kjartan Maraas
none Details | Review

Description Georg Schwarz 2005-03-20 17:18:34 UTC
Version details: 2.12.1
Distribution/Version: 5.3

Several function defintions are inconsistent with respect to the use of "const". In the header files they appear with const (probably correct), whereas the actual definition in the .c files omits it. This results in compile time errors with the IRIX 5.3 cc.
Here are the diffs to fix things:

--- src/orb/orb-core/corba-object.c.orig        2005-03-20 15:35:28.000000000 +0100
+++ src/orb/orb-core/corba-object.c     2005-03-20 15:36:13.000000000 +0100
@@ -445,7 +445,7 @@
  */
 CORBA_boolean
 CORBA_Object_is_equivalent (CORBA_Object       obj,
-                           CORBA_Object       other_object,
+                           const CORBA_Object other_object,
                            CORBA_Environment *ev)
 {
        return obj == other_object;


--- src/orb/orb-core/corba-typecode.c.orig      2005-03-20 15:56:18.000000000 +0100
+++ src/orb/orb-core/corba-typecode.c   2005-03-20 16:06:49.000000000 +0100
@@ -688,7 +688,7 @@
 
 CORBA_boolean
 CORBA_TypeCode_equal (CORBA_TypeCode obj,
-                     CORBA_TypeCode tc,
+                     const CORBA_TypeCode tc,
                      CORBA_Environment *ev)
 {
        return typecode_equiv_internal (obj, tc, TRUE, ev);
@@ -696,7 +696,7 @@
 
 CORBA_boolean
 CORBA_TypeCode_equivalent (CORBA_TypeCode obj,
-                          CORBA_TypeCode tc,
+                          const CORBA_TypeCode tc,
                           CORBA_Environment *ev)
 {
        return typecode_equiv_internal (obj, tc, FALSE, ev);
@@ -786,7 +786,7 @@
 
 CORBA_Identifier
 CORBA_TypeCode_member_name (CORBA_TypeCode       typecode,
-                           CORBA_unsigned_long  index,
+                           const CORBA_unsigned_long  index,
                            CORBA_Environment   *ev)
 {
        if (!(typecode->kind == CORBA_tk_struct ||
@@ -812,7 +812,7 @@
 
 CORBA_TypeCode
 CORBA_TypeCode_member_type (CORBA_TypeCode       typecode,
-                           CORBA_unsigned_long  index,
+                           const CORBA_unsigned_long  index,
                            CORBA_Environment   *ev)
 {
        if (!(typecode->kind == CORBA_tk_struct ||
@@ -838,7 +838,7 @@
 
 CORBA_any *
 CORBA_TypeCode_member_label (CORBA_TypeCode       typecode,
-                            CORBA_unsigned_long  index,
+                            const CORBA_unsigned_long  index,
                             CORBA_Environment   *ev)
 {
        CORBA_any *retval;


--- src/orb/dynamic/dynany.c.orig       2005-03-20 16:44:26.000000000 +0100
+++ src/orb/dynamic/dynany.c    2005-03-20 17:01:51.000000000 +0100
@@ -700,7 +700,7 @@
 
 void
 DynamicAny_DynAny_assign (DynamicAny_DynAny dest,
-                    DynamicAny_DynAny src,
+                    const DynamicAny_DynAny src,
                     CORBA_Environment *ev)
 {
        DynAny *dynany_src;
@@ -779,7 +779,7 @@
 
 CORBA_boolean
 DynamicAny_DynAny_equal (DynamicAny_DynAny obj_a,
-                        DynamicAny_DynAny obj_b,
+                        const DynamicAny_DynAny obj_b,
                         CORBA_Environment *ev)
 {
        DynAny *dynanya;
@@ -880,7 +880,7 @@
                                                                                \
 void                                                                           \
 DynamicAny_DynAny_insert_##apiname (DynamicAny_DynAny       obj,               \
-                              CORBA_##ctype      value,                        \
+                              const CORBA_##ctype      value,                  \
                               CORBA_Environment *ev)                           \
 {                                                                              \
        DynAny  *dynany;                                                        \
@@ -966,7 +966,7 @@
 /* 9.2.3.9 */
 
 CORBA_boolean
-DynamicAny_DynAny_seek (DynamicAny_DynAny obj, CORBA_long index, CORBA_Environment *ev)
+DynamicAny_DynAny_seek (DynamicAny_DynAny obj, const CORBA_long index, CORBA_Environment *ev)
 {
        DynAny *dynany;
        CORBA_any *any;
@@ -1277,7 +1277,7 @@
 
 void
 DynamicAny_DynEnum_set_as_ulong (DynamicAny_DynEnum obj,
-                           CORBA_unsigned_long value_as_ulong,
+                           const CORBA_unsigned_long value_as_ulong,
                            CORBA_Environment *ev)
 {
        DynAny *dynany;
@@ -1590,7 +1590,7 @@
 
 void
 DynamicAny_DynUnion_set_discriminator (DynamicAny_DynUnion obj,
-                                 DynamicAny_DynAny   d,
+                                 const DynamicAny_DynAny   d,
                                  CORBA_Environment *ev)
 {
        g_assert (!"Not yet implemented");
@@ -1952,7 +1952,7 @@
 
 void
 DynamicAny_DynSequence_set_length (DynamicAny_DynSequence   obj,
-                                  CORBA_unsigned_long length,
+                                  const CORBA_unsigned_long length,
                                   CORBA_Environment  *ev)
 {
        DynAny *dynany;
Comment 1 Kjartan Maraas 2006-10-22 14:24:23 UTC
Created attachment 75198 [details] [review]
patch as an attachment

Does this look ok Michael?
Comment 2 Michael Meeks 2006-10-23 09:32:08 UTC
looks lovely to me. Lets get it in.
Comment 3 Kjartan Maraas 2006-11-10 13:35:44 UTC
Commited.