[libsphinx-search-perl] 08/16: new upstream release

Taku YASUI tach at debian.org
Sun Aug 11 11:53:24 UTC 2013


This is an automated email from the git hooks/post-receive script.

tach pushed a commit to branch master
in repository libsphinx-search-perl.

commit 07882f04e36908dff006e7423d47356d62eb876c
Author: tach <tach at 19660600-52fe-0310-9875-adc0d7a7b53c>
Date:   Mon Apr 27 15:29:11 2009 +0000

    new upstream release
---
 Changes              |    7 +++++++
 META.yml             |    2 +-
 debian/changelog     |    6 ++++++
 lib/Sphinx/Search.pm |   35 +++++++++--------------------------
 t/64bitid.t          |    1 +
 5 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/Changes b/Changes
index d6f84ff..96a4609 100644
--- a/Changes
+++ b/Changes
@@ -59,3 +59,10 @@ Revision history for Sphinx-Search
 
 0.18	2009-04-09
 	Included missing test files in CPAN package.
+
+0.19	Removed request for GMP implementation of Math::BigInt due to apparent
+	bug in Math::BigInt on 32 bit architectures (Math::BigInt::Calc and
+	Math::BigInt::GMP give different answers for 32 bit shift of long
+	integer)
+	Fixed incorrect setting for _max_id that was causing results with 64 bit IDs to be
+	ignored unless SetIDRange() had been called.
diff --git a/META.yml b/META.yml
index 03cfed4..d0b4d29 100644
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Sphinx-Search
-version:      0.18
+version:      0.19
 version_from: lib/Sphinx/Search.pm
 installdirs:  site
 requires:
diff --git a/debian/changelog b/debian/changelog
index a2135a4..5adb8d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libsphinx-search-perl (0.19-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Taku YASUI <tach at debian.org>  Tue, 28 Apr 2009 00:28:51 +0900
+
 libsphinx-search-perl (0.18-2) unstable; urgency=low
 
   * Fix Build-Depends
diff --git a/lib/Sphinx/Search.pm b/lib/Sphinx/Search.pm
index fd671d6..5c1e85e 100644
--- a/lib/Sphinx/Search.pm
+++ b/lib/Sphinx/Search.pm
@@ -8,7 +8,7 @@ use base 'Exporter';
 use Carp;
 use Socket;
 use Config;
-use Math::BigInt lib => 'GMP';
+use Math::BigInt;
 use IO::Socket::INET;
 use IO::Socket::UNIX;
 use Encode qw/encode_utf8 decode_utf8/;
@@ -21,7 +21,7 @@ Sphinx::Search - Sphinx search engine API Perl client
 
 Please note that you *MUST* install a version which is compatible with your version of Sphinx.
 
-Use version 0.18 for Sphinx 0.9.9-rc2 and later (Please read the Compatibility Note under L<SetEncoders> regarding encoding changes)
+Use version 0.19 for Sphinx 0.9.9-rc2 and later (Please read the Compatibility Note under L<SetEncoders> regarding encoding changes)
 
 Use version 0.15 for Sphinx 0.9.9-svn-r1674
 
@@ -43,7 +43,7 @@ Use version 0.02 for Sphinx 0.9.8-cvs-20070818
 
 =cut
 
-our $VERSION = '0.18';
+our $VERSION = '0.19';
 
 =head1 SYNOPSIS
 
@@ -150,16 +150,8 @@ sub _sphPackI64 {
     my $v = shift;
 
     # x64 route
-    if ( $self->{_longsize} >= 8 ) {
-	my $i = int($v);
-	return pack ( "NN", $i>>32, $i & 4294967295 );
-    }
-
-    # x32 route, BigInt
-    my $vb = Math::BigInt->new($v);
-    my $l = $vb->copy->band ( 4294967295 );
-    my $h = $vb->copy->brsft ( 32 );
-    return pack ( "NN", $h, $l );
+    my $i = $self->{_longsize} >= 8 ? int($v) : Math::BigInt->new("$v");
+    return pack ( "NN", $i>>32, $i & 4294967295 );
 }
 
 # portably pack numeric to 64 unsigned bits, network order
@@ -167,17 +159,8 @@ sub _sphPackU64 {
     my $self = shift;
     my $v = shift;
 
-    # x64 route
-    if ( $self->{_longsize} >= 8 ) {
-	my $i = int($v);
-	return pack ( "NN", $i>>32, $i & 4294967295 );
-    }
-
-    # x32 route, BigInt
-    my $vb = Math::BigInt->new($v);
-    my $l = $vb->copy->band ( 4294967295 );
-    my $h = $vb->copy->brsft ( 32 );
-    return pack ( "NN", $h, $l );
+    my $i = $self->{_longsize} >= 8  ? int($v) : Math::BigInt->new("$v");
+    return pack ( "NN", $i>>32, $i & 4294967295 );
 }
 
 sub _sphPackI64array {
@@ -287,7 +270,7 @@ sub new {
 	_sort		=> SPH_SORT_RELEVANCE,
 	_sortby		=> "",
 	_min_id		=> 0,
-	_max_id		=> 0xFFFFFFFF,
+	_max_id		=> 0,
 	_filters	=> [],
 	_groupby	=> "",
 	_groupdistinct	=> "",
@@ -308,7 +291,7 @@ sub new {
 	# per-reply fields (for single-query case)
 	_error		=> '',
 	_warning	=> '',
-	_connerror      => '',,
+	_connerror      => '',
 	
 	# request storage (for multi-query case)
 	_reqs           => [],
diff --git a/t/64bitid.t b/t/64bitid.t
index c8ae458..f400c5a 100644
--- a/t/64bitid.t
+++ b/t/64bitid.t
@@ -16,6 +16,7 @@ ok($sphinx, "Constructor");
 my @tests = ( 0, 1, 0x7FFFFFFF, 0x80000000, 0xFFFFFFFF, '4294967296', '9223372036854775807', '9223372036854775808', '18446744073709551615');
 
 for my $x (@tests) {
+#    print $x . " " . $sphinx->_sphUnpackU64($sphinx->_sphPackU64($x)) . "\n";
     ok($sphinx->_sphUnpackU64($sphinx->_sphPackU64($x)) == $x, "64 bit unsigned transfer $x");
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libsphinx-search-perl.git



More information about the Pkg-perl-cvs-commits mailing list