diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-27 18:40:13 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-27 18:40:13 +0000 |
commit | c4e2e1416bcedbe654d56c3851a0d08cddfc4bee (patch) | |
tree | d1bed10378d77be52bb1c69e1faeecda6b558ee0 /src/couchdb/couch_db.hrl | |
parent | 99134ed775bd0825db76fc924c82ff9b0fc99cfa (diff) |
Adding new macro ?getv as an alias to couch_util:get_value.
That function is used so often by most (if not all) modules that it deserves
a small macro to help keeping the code short.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1001863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db.hrl')
-rw-r--r-- | src/couchdb/couch_db.hrl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl index eb2b6816..a557ceeb 100644 --- a/src/couchdb/couch_db.hrl +++ b/src/couchdb/couch_db.hrl @@ -23,6 +23,9 @@ -define(b2l(V), binary_to_list(V)). -define(l2b(V), list_to_binary(V)). +-define(getv(Key, List), couch_util:get_value(Key, List)). +-define(getv(Key, List, Default), couch_util:get_value(Key, List, Default)). + -define(DEFAULT_ATTACHMENT_CONTENT_TYPE, <<"application/octet-stream">>). -define(LOG_DEBUG(Format, Args), |