Ticket #385: x64.patch
File x64.patch, 3.1 KB (added by , 15 years ago) |
---|
-
xapian-core/tests/harness/testutils.cc
30 30 31 31 using namespace std; 32 32 33 ostream &34 operator<<(ostream &os, const vector< unsigned int> &ints)33 template<class T> ostream & 34 operator<<(ostream &os, const vector<T> &ints) 35 35 { 36 36 copy(ints.begin(), ints.end(), 37 ostream_iterator<unsigned int>(os, ", "));37 ostream_iterator<T>(os, ", ")); 38 38 return os; 39 39 } 40 40 -
xapian-core/tests/harness/testutils.h
28 28 // ###################################################################### 29 29 // Useful display operators 30 30 31 template<class T> 31 32 std::ostream &operator<<(std::ostream &os, 32 const std::vector< unsigned int> &ints);33 const std::vector<T> &ints); 33 34 34 35 // ###################################################################### 35 36 // Useful comparison operators -
xapian-core/include/xapian/types.h
21 21 #ifndef XAPIAN_INCLUDED_TYPES_H 22 22 #define XAPIAN_INCLUDED_TYPES_H 23 23 24 #define USE_64BIT_DOCID 1 25 #define USE_64BIT_TERMCOUNT 1 26 24 27 namespace Xapian { 25 28 26 29 /** A count of documents. … … 28 31 * This is used to hold values such as the number of documents in a database 29 32 * and the frequency of a term in the database. 30 33 */ 34 #ifdef USE_64BIT_DOCID 35 typedef unsigned long long doccount; 36 #else 31 37 typedef unsigned doccount; 38 #endif 32 39 33 40 /** A signed difference between two counts of documents. 34 41 * 35 42 * This is used by the Xapian classes which are STL containers of documents 36 43 * for "difference_type". 37 44 */ 38 typedef int doccount_diff; /* FIXME: can overflow with more than 2^31 docs. */ 45 /* FIXME: can overflow. */ 46 #ifdef USE_64BIT_DOCID 47 typedef long long doccount_diff; 48 #else 49 typedef int doccount_diff; 50 #endif 39 51 40 52 /** A unique identifier for a document. 41 53 * 42 54 * Docid 0 is invalid, providing an "out of range" value which can be 43 55 * used to mean "not a valid document". 44 56 */ 57 #ifdef USE_64BIT_DOCID 58 typedef unsigned long long docid; 59 #else 45 60 typedef unsigned docid; 61 #endif 46 62 47 63 /** A normalised document length. 48 64 * … … 58 74 * 59 75 * This is used to hold values such as the Within Document Frequency (wdf). 60 76 */ 77 #ifdef USE_64BIT_TERMCOUNT 78 typedef unsigned long long termcount; 79 #else 61 80 typedef unsigned termcount; 81 #endif 62 82 63 83 /** A signed difference between two counts of terms. 64 84 * 65 85 * This is used by the Xapian classes which are STL containers of terms 66 86 * for "difference_type". 67 87 */ 68 typedef int termcount_diff; /* FIXME: can overflow with more than 2^31 terms. */ 88 /* FIXME: can overflow. */ 89 #ifdef USE_64BIT_DOCID 90 typedef long long termcount_diff; 91 #else 92 typedef int termcount_diff; 93 #endif 69 94 70 95 /** A term position within a document or query. 71 96 */