Ticket #422: close.patch

File close.patch, 901 bytes (added by Henry, 15 years ago)
  • search-xapian/XS/WritableDatabase.xs

    old new  
    4747        }
    4848
    4949void
     50WritableDatabase::close()
     51   CODE:
     52    try {
     53            THIS->close();
     54        }
     55        catch (const Error &error) {
     56            croak( "Exception: %s", error.get_msg().c_str() );
     57        }
     58
     59void
    5060WritableDatabase::begin_transaction(flushed = NO_INIT)
    5161    bool flushed
    5262    CODE:
  • search-xapian/t/writabledatabase.t

    old new  
    186186ok(!$write->term_exists($delterm), 'check term exists after deleting all documents');
    187187is($write->get_termfreq($delterm), 0, 'check term frequency after deleting all documents');
    188188
     189$write->flush();
     190$write->close();
     191
    1891921;