couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1001863 - /couchdb/trunk/src/couchdb/couch_db.hrl
Date Mon, 27 Sep 2010 18:40:14 GMT
Author: fdmanana
Date: Mon Sep 27 18:40:13 2010
New Revision: 1001863

URL: http://svn.apache.org/viewvc?rev=1001863&view=rev
Log:
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.



Modified:
    couchdb/trunk/src/couchdb/couch_db.hrl

Modified: couchdb/trunk/src/couchdb/couch_db.hrl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_db.hrl?rev=1001863&r1=1001862&r2=1001863&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_db.hrl (original)
+++ couchdb/trunk/src/couchdb/couch_db.hrl Mon Sep 27 18:40:13 2010
@@ -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),



Mime
View raw message