include/xapian/deprecated.h

00001 // deprecated.h: Define XAPIAN_DEPRECATED() macro.
00002 //
00003 // Copyright (C) 2006,2007,2009 Olly Betts
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 2 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00018 
00019 #ifndef XAPIAN_INCLUDED_DEPRECATED_H
00020 #define XAPIAN_INCLUDED_DEPRECATED_H
00021 
00022 // How to use of the XAPIAN_DEPRECATED is document in HACKING - see the
00023 // section "Marking Features as Deprecated".  Don't forget to update the
00024 // documentation of deprecated methods for end users in docs/deprecation.rst
00025 // too!
00026 
00027 // xapian-bindings needs to wrap deprecated functions without warnings,
00028 // so check if XAPIAN_DEPRECATED is defined so xapian-bindings can override
00029 // it.
00030 #ifndef XAPIAN_DEPRECATED
00031 # ifdef __GNUC__
00032 // __attribute__((__deprecated__)) is supported by GCC 3.1 and later, which
00033 // is now our minimum requirement, so there's no need to check the GCC version
00034 // in use.
00035 #  define XAPIAN_DEPRECATED(D) D __attribute__((__deprecated__))
00036 # elif defined _MSC_VER && _MSC_VER >= 1300
00037 // __declspec(deprecated) is supported by MSVC 7.0 and later.
00038 #  define XAPIAN_DEPRECATED(D) __declspec(deprecated) D
00039 # else
00040 #  define XAPIAN_DEPRECATED(D) D
00041 # endif
00042 #endif
00043 
00044 #endif

Documentation for Xapian (version 1.1.2).
Generated on 23 Jul 2009 by Doxygen 1.5.2.