OSSP CVS Repository

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

Check-in Number: 851
Date: 2001-Sep-05 09:41:18 (local)
2001-Sep-05 07:41:18 (UTC)
User:rse
Branch:
Comment: Provide an L2_TYPE_STRING for the channel configuration steps. This is like L2_TYPE_CHARPTR but treats the target as a NUL-terminated string and performs a strdup() on it. This make the channels simpler, because they no longer have to post-process the configuration step in order to make own copies of provided strings.
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2.h      1.16 -> 1.17     1 inserted, 0 deleted
ossp-pkg/l2/l2_ut_param.c      1.1 -> 1.2     3 inserted, 0 deleted

ossp-pkg/l2/l2.h 1.16 -> 1.17

--- l2.h 2001/09/04 19:18:49     1.16
+++ l2.h 2001/09/05 07:41:18     1.17
@@ -103,6 +103,7 @@
     L2_TYPE_LONG,
     L2_TYPE_FLOAT,
     L2_TYPE_DOUBLE,
+    L2_TYPE_STRING,
     L2_TYPE_CHARPTR,
     L2_TYPE_VOIDPTR
 } l2_type_t;


ossp-pkg/l2/l2_ut_param.c 1.1 -> 1.2

--- l2_ut_param.c        2001/09/04 13:52:59     1.1
+++ l2_ut_param.c        2001/09/05 07:41:18     1.2
@@ -85,6 +85,9 @@
                     case L2_TYPE_DOUBLE:
                         *(double *)(pa[i].store) = va_get(ap, double); 
                         break;
+                    case L2_TYPE_STRING:
+                        *(char **)(pa[i].store) = strdup(va_get(ap, charptr)); 
+                        break;
                     case L2_TYPE_CHARPTR:
                         *(char **)(pa[i].store) = va_get(ap, charptr); 
                         break;

CVSTrac 2.0.1