OSSP CVS Repository

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

Check-in Number: 5380
Date: 2006-Mar-13 10:14:23 (local)
2006-Mar-13 09:14:23 (UTC)
User:rse
Branch:
Comment: Fix Perl API's "export" function by not taking over NUL-termination character under UUID_FMT_TXT.
Tickets:
Inspections:
Files:
ossp-pkg/uuid/ChangeLog      1.108 -> 1.109     4 inserted, 0 deleted
ossp-pkg/uuid/perl/uuid.xs      1.6 -> 1.7     1 inserted, 1 deleted

ossp-pkg/uuid/ChangeLog 1.108 -> 1.109

--- ChangeLog    2006/02/23 13:32:46     1.108
+++ ChangeLog    2006/03/13 09:14:23     1.109
@@ -12,6 +12,10 @@
   For a more brief summary please have a look at the NEWS file.
 
   Changes between 1.4.1 and 1.4.2 (07-Feb-2006 to xx-Feb-2006)
+
+   o Fix Perl API's "export" function by not taking over NUL-termination
+     character under UUID_FMT_TXT.
+     [Thomas Lotterer <thomas@lotterer.net>]
    
    o Declare "install", "uninstall" and "clean" make(1) targets
      ".PHONY". This especially workarounds problems on case insensitive


ossp-pkg/uuid/perl/uuid.xs 1.6 -> 1.7

--- uuid.xs      2006/02/07 08:19:15     1.6
+++ uuid.xs      2006/03/13 09:14:23     1.7
@@ -201,7 +201,7 @@
         data_len = 0;
         RETVAL = uuid_export(uuid, fmt, &data_ptr, &data_len);
         if (RETVAL == UUID_RC_OK) {
-            if (fmt == UUID_FMT_STR)
+            if (fmt == UUID_FMT_STR || fmt == UUID_FMT_TXT)
                 data_len--; /* Perl doesn't wish NUL-termination on strings */
             sv_setpvn(ST(2), data_ptr, data_len);
             free(data_ptr);

CVSTrac 2.0.1