projects
/
notmuch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ed4f73a
)
ruby: Update for changes to notmuch_database_get_directory
author
Austin Clements
<amdragon@MIT.EDU>
Sun, 13 May 2012 23:36:12 +0000
(19:36 -0400)
committer
David Bremner
<bremner@debian.org>
Tue, 15 May 2012 11:59:05 +0000
(08:59 -0300)
bindings/ruby/database.c
patch
|
blob
|
history
diff --git
a/bindings/ruby/database.c
b/bindings/ruby/database.c
index 409d54fa504e85e8f88037cf7b99f4dcdbf2eb89..e84f726d1bf5576814a019062e883e604f0ba467 100644
(file)
--- a/
bindings/ruby/database.c
+++ b/
bindings/ruby/database.c
@@
-252,6
+252,7
@@
VALUE
notmuch_rb_database_get_directory (VALUE self, VALUE pathv)
{
const char *path;
notmuch_rb_database_get_directory (VALUE self, VALUE pathv)
{
const char *path;
+ notmuch_status_t ret;
notmuch_directory_t *dir;
notmuch_database_t *db;
notmuch_directory_t *dir;
notmuch_database_t *db;
@@
-260,11
+261,11
@@
notmuch_rb_database_get_directory (VALUE self, VALUE pathv)
SafeStringValue (pathv);
path = RSTRING_PTR (pathv);
SafeStringValue (pathv);
path = RSTRING_PTR (pathv);
-
dir = notmuch_database_get_directory (db, path
);
- if (!dir)
- rb_raise (notmuch_rb_eXapianError, "Xapian exception");
-
- return
Data_Wrap_Struct (notmuch_rb_cDirectory, NULL, NULL, dir)
;
+
ret = notmuch_database_get_directory (db, path, &dir
);
+ notmuch_rb_status_raise (ret);
+ if (dir)
+ return Data_Wrap_Struct (notmuch_rb_cDirectory, NULL, NULL, dir);
+ return
Qnil
;
}
/*
}
/*