OSSP CVS Repository

ossp - Check-in [4448]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4448
Date: 2004-Mar-18 16:50:34 (local)
2004-Mar-18 15:50:34 (UTC)
User:rse
Branch:
Comment: Constifiy the ex_file and ex_func fields of the exception context structure because __FUNCTION__ and __FILE__ are usually (especially under strict C99 environments) constant values.

Submitted by: <me@davidyu.org>

Tickets:
Inspections:
Files:
ossp-pkg/ex/ChangeLog      1.7 -> 1.8     5 inserted, 0 deleted
ossp-pkg/ex/ex.h      1.23 -> 1.24     6 inserted, 6 deleted

ossp-pkg/ex/ChangeLog 1.7 -> 1.8

--- ChangeLog    2003/02/09 18:15:33     1.7
+++ ChangeLog    2004/03/18 15:50:34     1.8
@@ -13,6 +13,11 @@
 
   Changes between 1.0.2 and 1.0.3 (30-Jan-2003 to xx-Feb-2003)
 
+   *) Constifiy the ex_file and ex_func fields of the exception
+      context structure because __FUNCTION__ and __FILE__ are usually
+      (especially under strict C99 environments) constant values.
+      [<me@davidyu.org>]
+
    *) Fixed test suite library (ts.c): the ts_suite_free()
       function performed an illegal iteration for freeing elements (they
       were freed but still references for traversing to next element).


ossp-pkg/ex/ex.h 1.23 -> 1.24

--- ex.h 2004/02/17 09:14:55     1.23
+++ ex.h 2004/03/18 15:50:34     1.24
@@ -82,13 +82,13 @@
 /* declare the exception type (public) */
 typedef struct {
     /* throw value */
-    void *ex_class;
-    void *ex_object;
-    void *ex_value;
+    void       *ex_class;
+    void       *ex_object;
+    void       *ex_value;
     /* throw point */
-    char *ex_file;
-    int   ex_line;
-    char *ex_func;
+    const char *ex_file;
+    int         ex_line;
+    const char *ex_func;
 } ex_t;
 
 /* declare the context type (private) */

CVSTrac 2.0.1