X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=database.cc;h=aaad710552f9d4c496098ea19945f9f6b8ab1d26;hp=928e91ba7585617f9a64c3634b3ef2f39f6a3f0f;hb=9ec68aa9c4694bdf1b948bb93299e0270ec071ae;hpb=65a272832e75a5bc8fbbc3e00ce25ae861787cce diff --git a/database.cc b/database.cc index 928e91ba..aaad7105 100644 --- a/database.cc +++ b/database.cc @@ -588,7 +588,8 @@ notmuch_database_set_timestamp (notmuch_database_t *notmuch, try { status = find_timestamp_document (notmuch, db_key, &doc, &doc_id); - doc.add_value (0, Xapian::sortable_serialise (timestamp)); + doc.add_value (NOTMUCH_VALUE_TIMESTAMP, + Xapian::sortable_serialise (timestamp)); if (status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) { char *term = talloc_asprintf (NULL, "%s%s", @@ -630,7 +631,7 @@ notmuch_database_get_timestamp (notmuch_database_t *notmuch, const char *key) if (status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) goto DONE; - ret = Xapian::sortable_unserialise (doc.get_value (0)); + ret = Xapian::sortable_unserialise (doc.get_value (NOTMUCH_VALUE_TIMESTAMP)); } catch (Xapian::Error &error) { goto DONE; }