From c4e2e1416bcedbe654d56c3851a0d08cddfc4bee Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Mon, 27 Sep 2010 18:40:13 +0000 Subject: 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 --- src/couchdb/couch_db.hrl | 3 +++ 1 file changed, 3 insertions(+) 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), -- cgit v1.2.3