mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
ruby: Update for changes to notmuch_database_get_directory
This commit is contained in:
parent
ed4f73a080
commit
bc4000a952
1 changed files with 6 additions and 5 deletions
|
@ -252,6 +252,7 @@ VALUE
|
||||||
notmuch_rb_database_get_directory (VALUE self, VALUE pathv)
|
notmuch_rb_database_get_directory (VALUE self, VALUE pathv)
|
||||||
{
|
{
|
||||||
const char *path;
|
const char *path;
|
||||||
|
notmuch_status_t ret;
|
||||||
notmuch_directory_t *dir;
|
notmuch_directory_t *dir;
|
||||||
notmuch_database_t *db;
|
notmuch_database_t *db;
|
||||||
|
|
||||||
|
@ -260,11 +261,11 @@ notmuch_rb_database_get_directory (VALUE self, VALUE pathv)
|
||||||
SafeStringValue (pathv);
|
SafeStringValue (pathv);
|
||||||
path = RSTRING_PTR (pathv);
|
path = RSTRING_PTR (pathv);
|
||||||
|
|
||||||
dir = notmuch_database_get_directory (db, path);
|
ret = notmuch_database_get_directory (db, path, &dir);
|
||||||
if (!dir)
|
notmuch_rb_status_raise (ret);
|
||||||
rb_raise (notmuch_rb_eXapianError, "Xapian exception");
|
if (dir)
|
||||||
|
return Data_Wrap_Struct (notmuch_rb_cDirectory, NULL, NULL, dir);
|
||||||
return Data_Wrap_Struct (notmuch_rb_cDirectory, NULL, NULL, dir);
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue