You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2009/12/11 00:52:17 UTC
svn commit: r889470 - in /lucene/lucy/trunk/clownfish:
lib/Clownfish/Parser.pm lib/Clownfish/Type/Integer.pm t/102-integer_type.t
Author: marvin
Date: Thu Dec 10 23:52:16 2009
New Revision: 889470
URL: http://svn.apache.org/viewvc?rev=889470&view=rev
Log:
Add support for a few stdint.h integer types to Clownfish.
Modified:
lucene/lucy/trunk/clownfish/lib/Clownfish/Parser.pm
lucene/lucy/trunk/clownfish/lib/Clownfish/Type/Integer.pm
lucene/lucy/trunk/clownfish/t/102-integer_type.t
Modified: lucene/lucy/trunk/clownfish/lib/Clownfish/Parser.pm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/clownfish/lib/Clownfish/Parser.pm?rev=889470&r1=889469&r2=889470&view=diff
==============================================================================
--- lucene/lucy/trunk/clownfish/lib/Clownfish/Parser.pm (original)
+++ lucene/lucy/trunk/clownfish/lib/Clownfish/Parser.pm Thu Dec 10 23:52:16 2009
@@ -226,7 +226,7 @@
/(?:chy_)?([iu](8|16|32|64)|bool)_t(?!\w)/
c_integer_specifier:
- /(?:char|int|short|long|size_t)(?!\w)/
+ /(?:(?:u?int(?:8|16|32|64)_t)|(?:char|int|short|long|size_t))(?!\w)/
c_float_specifier:
/(?:float|double)(?!\w)/
Modified: lucene/lucy/trunk/clownfish/lib/Clownfish/Type/Integer.pm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/clownfish/lib/Clownfish/Type/Integer.pm?rev=889470&r1=889469&r2=889470&view=diff
==============================================================================
--- lucene/lucy/trunk/clownfish/lib/Clownfish/Type/Integer.pm (original)
+++ lucene/lucy/trunk/clownfish/lib/Clownfish/Type/Integer.pm Thu Dec 10 23:52:16 2009
@@ -13,20 +13,28 @@
);
our %specifiers = (
- bool_t => $Config{intsize},
- i8_t => 1,
- i16_t => 2,
- i32_t => 4,
- i64_t => 8,
- u8_t => 1,
- u16_t => 2,
- u32_t => 4,
- u64_t => 8,
- char => 1,
- int => $Config{intsize},
- short => $Config{shortsize},
- long => $Config{longsize},
- size_t => $Config{sizesize},
+ bool_t => $Config{intsize},
+ int8_t => 1,
+ int16_t => 2,
+ int32_t => 4,
+ int64_t => 8,
+ uint8_t => 1,
+ uint16_t => 2,
+ uint32_t => 4,
+ uint64_t => 8,
+ i8_t => 1,
+ i16_t => 2,
+ i32_t => 4,
+ i64_t => 8,
+ u8_t => 1,
+ u16_t => 2,
+ u32_t => 4,
+ u64_t => 8,
+ char => 1,
+ int => $Config{intsize},
+ short => $Config{shortsize},
+ long => $Config{longsize},
+ size_t => $Config{sizesize},
);
sub new {
Modified: lucene/lucy/trunk/clownfish/t/102-integer_type.t
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/clownfish/t/102-integer_type.t?rev=889470&r1=889469&r2=889470&view=diff
==============================================================================
--- lucene/lucy/trunk/clownfish/t/102-integer_type.t (original)
+++ lucene/lucy/trunk/clownfish/t/102-integer_type.t Thu Dec 10 23:52:16 2009
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 60;
+use Test::More tests => 92;
use Clownfish::Type::Integer;
use Clownfish::Parser;
@@ -34,6 +34,14 @@
int
long
size_t
+ int8_t
+ int16_t
+ int32_t
+ int64_t
+ uint8_t
+ uint16_t
+ uint32_t
+ uint64_t
);
for my $chy_specifier (@chy_specifiers) {