My Project
|
00001 /* 00002 Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; version 2 of the License. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00016 */ 00017 00018 #ifndef SQL_CALLBACK_INCLUDED 00019 #define SQL_CALLBACK_INCLUDED 00020 00033 #define MYSQL_CALLBACK(OBJ, FUNC, PARAMS) \ 00034 do { \ 00035 if ((OBJ) && ((OBJ)->FUNC)) \ 00036 (OBJ)->FUNC PARAMS; \ 00037 } while (0) 00038 00039 #define MYSQL_CALLBACK_ELSE(OBJ, FUNC, PARAMS, ELSE) \ 00040 (((OBJ) && ((OBJ)->FUNC)) ? (OBJ)->FUNC PARAMS : (ELSE)) 00041 00042 00043 #endif /* SQL_CALLBACK_INCLUDED */