[Xapian-devel] Patch for database code
Charlie Hull
charlie at juggler.net
Mon Apr 23 16:56:57 BST 2007
Hi all,
Attached is a simple patch for Flint and Quartz; Visual C++ complains if
you try and define arrays with non-constant size.
Charlie
-------------- next part --------------
Index: flint/flint_table.cc
===================================================================
--- flint/flint_table.cc (revision 8371)
+++ flint/flint_table.cc (working copy)
@@ -1369,8 +1369,8 @@
basenames.push_back('A');
basenames.push_back('B');
- FlintTable_base bases[basenames.size()];
- bool base_ok[basenames.size()];
+ FlintTable_base bases[2];
+ bool base_ok[2];
{
for (size_t i = 0; i < basenames.size(); ++i) {
Index: quartz/btree.cc
===================================================================
--- quartz/btree.cc (revision 8371)
+++ quartz/btree.cc (working copy)
@@ -1269,8 +1269,8 @@
basenames.push_back('A');
basenames.push_back('B');
- Btree_base bases[basenames.size()];
- bool base_ok[basenames.size()];
+ Btree_base bases[2];
+ bool base_ok[2];
for (size_t i = 0; i < basenames.size(); ++i) {
base_ok[i] = bases[i].read(name, basenames[i], err_msg);
More information about the Xapian-devel
mailing list