aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2024-01-19 15:46:34 +0100
committerOscar Najera <hi@oscarnajera.com>2024-01-19 15:46:34 +0100
commitf176396621a8cebd732840b627610a78c58f1817 (patch)
tree1564c68d19bf19c7747601a41915c9d4a44ec577 /lib
parentd755db14575edac5f685c458d9f4c9dc9bb78af4 (diff)
downloaddotfiles-f176396621a8cebd732840b627610a78c58f1817.tar.gz
dotfiles-f176396621a8cebd732840b627610a78c58f1817.tar.bz2
dotfiles-f176396621a8cebd732840b627610a78c58f1817.zip
update notmuch for scheme
Diffstat (limited to 'lib')
-rw-r--r--lib/guile/ffi/notmuch.scm62
1 files changed, 37 insertions, 25 deletions
diff --git a/lib/guile/ffi/notmuch.scm b/lib/guile/ffi/notmuch.scm
index 4c02592..5c6fb6e 100644
--- a/lib/guile/ffi/notmuch.scm
+++ b/lib/guile/ffi/notmuch.scm
@@ -76,7 +76,8 @@
(define-public (unwrap-notmuch_status_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_status_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_status_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_status_t v)
@@ -280,7 +281,8 @@
(define-public (unwrap-notmuch_database_mode_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_database_mode_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_database_mode_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_database_mode_t v)
@@ -854,7 +856,8 @@
(define-public (unwrap-notmuch_query_syntax_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_query_syntax_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_query_syntax_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_query_syntax_t v)
@@ -902,7 +905,8 @@
(define-public (unwrap-notmuch_sort_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_sort_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_sort_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_sort_t v)
@@ -954,7 +958,8 @@
(define-public (unwrap-notmuch_exclude_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_exclude_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_exclude_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_exclude_t v)
@@ -1617,7 +1622,8 @@
(define-public (unwrap-notmuch_message_flag_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_message_flag_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_message_flag_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_message_flag_t v)
@@ -2492,6 +2498,7 @@
;; NOTMUCH_CONFIG_USER_NAME,
;; NOTMUCH_CONFIG_AUTOCOMMIT,
;; NOTMUCH_CONFIG_EXTRA_HEADERS,
+;; NOTMUCH_CONFIG_INDEX_AS_TEXT,
;; NOTMUCH_CONFIG_LAST,
;; } notmuch_config_key_t;
(define notmuch_config_key_t-enum-nvl
@@ -2509,7 +2516,8 @@
(NOTMUCH_CONFIG_USER_NAME . 10)
(NOTMUCH_CONFIG_AUTOCOMMIT . 11)
(NOTMUCH_CONFIG_EXTRA_HEADERS . 12)
- (NOTMUCH_CONFIG_LAST . 13))
+ (NOTMUCH_CONFIG_INDEX_AS_TEXT . 13)
+ (NOTMUCH_CONFIG_LAST . 14))
)
(define notmuch_config_key_t-enum-vnl
(map (lambda (pair) (cons (cdr pair) (car pair)))
@@ -2517,7 +2525,8 @@
(define-public (unwrap-notmuch_config_key_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_config_key_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_config_key_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_config_key_t v)
@@ -2826,7 +2835,8 @@
(define-public (unwrap-notmuch_decryption_policy_t n)
(cond
((symbol? n)
- (or (assq-ref notmuch_decryption_policy_t-enum-nvl n) (error "bad arg")))
+ (or (assq-ref notmuch_decryption_policy_t-enum-nvl n)
+ (throw 'ffi-help-error "bad arg: ~A" n)))
((integer? n) n)
(else (error "bad arg"))))
(define-public (wrap-notmuch_decryption_policy_t v)
@@ -2907,7 +2917,8 @@
(NOTMUCH_DECRYPT_AUTO . 2)
(NOTMUCH_DECRYPT_TRUE . 1)
(NOTMUCH_DECRYPT_FALSE . 0)
- (NOTMUCH_CONFIG_LAST . 13)
+ (NOTMUCH_CONFIG_LAST . 14)
+ (NOTMUCH_CONFIG_INDEX_AS_TEXT . 13)
(NOTMUCH_CONFIG_EXTRA_HEADERS . 12)
(NOTMUCH_CONFIG_AUTOCOMMIT . 11)
(NOTMUCH_CONFIG_USER_NAME . 10)
@@ -2922,7 +2933,8 @@
(NOTMUCH_CONFIG_MAIL_ROOT . 1)
(NOTMUCH_CONFIG_DATABASE_PATH . 0)
(NOTMUCH_CONFIG_FIRST . 0)
- (NOTMUCH_CONFIG_LAST . 13)
+ (NOTMUCH_CONFIG_LAST . 14)
+ (NOTMUCH_CONFIG_INDEX_AS_TEXT . 13)
(NOTMUCH_CONFIG_EXTRA_HEADERS . 12)
(NOTMUCH_CONFIG_AUTOCOMMIT . 11)
(NOTMUCH_CONFIG_USER_NAME . 10)
@@ -2975,7 +2987,9 @@
(NOTMUCH_STATUS_NO_DATABASE . 20)
(NOTMUCH_STATUS_NO_CONFIG . 19)
(NOTMUCH_STATUS_UNKNOWN_CRYPTO_PROTOCOL . 18)
- (NOTMUCH_STATUS_FAILED_CRYPTO_CONTEXT_CREATION . 17)
+ (NOTMUCH_STATUS_FAILED_CRYPTO_CONTEXT_CREATION
+ .
+ 17)
(NOTMUCH_STATUS_MALFORMED_CRYPTO_PROTOCOL . 16)
(NOTMUCH_STATUS_ILLEGAL_ARGUMENT . 15)
(NOTMUCH_STATUS_IGNORED . 14)
@@ -3040,19 +3054,17 @@
(else (error "type mismatch"))))
(define ffi-notmuch-types
- '((pointer . "notmuch_database_t") "notmuch_database_t"
- (pointer . "notmuch_query_t") "notmuch_query_t"
- (pointer . "notmuch_threads_t") "notmuch_threads_t"
- (pointer . "notmuch_thread_t") "notmuch_thread_t"
- (pointer . "notmuch_messages_t") "notmuch_messages_t"
- (pointer . "notmuch_message_t") "notmuch_message_t"
- (pointer . "notmuch_tags_t") "notmuch_tags_t"
- (pointer . "notmuch_directory_t") "notmuch_directory_t"
- (pointer . "notmuch_filenames_t") "notmuch_filenames_t"
- (pointer . "notmuch_config_list_t") "notmuch_config_list_t"
- (pointer . "notmuch_config_values_t") "notmuch_config_values_t"
- (pointer . "notmuch_config_pairs_t") "notmuch_config_pairs_t"
- (pointer . "notmuch_indexopts_t") "notmuch_indexopts_t" "notmuch_compact_status_cb_t"
+ '((pointer . "notmuch_database_t") "notmuch_database_t" (pointer .
+ "notmuch_query_t") "notmuch_query_t" (pointer . "notmuch_threads_t")
+ "notmuch_threads_t" (pointer . "notmuch_thread_t") "notmuch_thread_t"
+ (pointer . "notmuch_messages_t") "notmuch_messages_t" (pointer .
+ "notmuch_message_t") "notmuch_message_t" (pointer . "notmuch_tags_t")
+ "notmuch_tags_t" (pointer . "notmuch_directory_t") "notmuch_directory_t"
+ (pointer . "notmuch_filenames_t") "notmuch_filenames_t" (pointer .
+ "notmuch_config_list_t") "notmuch_config_list_t" (pointer .
+ "notmuch_config_values_t") "notmuch_config_values_t" (pointer .
+ "notmuch_config_pairs_t") "notmuch_config_pairs_t" (pointer .
+ "notmuch_indexopts_t") "notmuch_indexopts_t" "notmuch_compact_status_cb_t"
(pointer . "notmuch_message_properties_t") "notmuch_message_properties_t"))
(export ffi-notmuch-types)