ossp-pkg/uuid/perl/uuid.pm 1.17 -> 1.18
--- uuid.pm 2006/03/13 09:42:48 1.17
+++ uuid.pm 2006/05/11 09:37:30 1.18
@@ -129,6 +129,7 @@
UUID_VERSION
UUID_LEN_BIN
UUID_LEN_STR
+ UUID_LEN_SIV
UUID_RC_OK
UUID_RC_ARG
UUID_RC_MEM
@@ -142,6 +143,7 @@
UUID_MAKE_MC
UUID_FMT_BIN
UUID_FMT_STR
+ UUID_FMT_SIV
UUID_FMT_TXT
)],
'func' => [qw(
@@ -256,6 +258,7 @@
my ($self, $fmt, $data_ptr, $data_len) = @_;
if ($fmt eq 'bin') { $fmt = $self->UUID_FMT_BIN; }
elsif ($fmt eq 'str') { $fmt = $self->UUID_FMT_STR; }
+ elsif ($fmt eq 'siv') { $fmt = $self->UUID_FMT_SIV; }
elsif ($fmt eq 'txt') { $fmt = $self->UUID_FMT_TXT; }
else { croak("invalid format \"$fmt\""); }
$data_len ||= length($data_ptr); # functional redudant, but Perl dislikes undef value here
@@ -283,6 +286,7 @@
my $data_ptr;
if ($fmt eq 'bin') { $fmt = $self->UUID_FMT_BIN; }
elsif ($fmt eq 'str') { $fmt = $self->UUID_FMT_STR; }
+ elsif ($fmt eq 'siv') { $fmt = $self->UUID_FMT_SIV; }
elsif ($fmt eq 'txt') { $fmt = $self->UUID_FMT_TXT; }
else { croak("invalid format \"$fmt\""); }
$self->{-rc} = uuid_export($self->{-uuid}, $fmt, $data_ptr, undef);
|
|