1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

I had overlooked the fact that some fmgr-callable functions return void

--- ie, they're only called for side-effects.  Add a PG_RETURN_VOID()
macro and use it where appropriate.  This probably doesn't change the
machine code by a single bit ... it's just for documentation.
This commit is contained in:
Tom Lane
2000-06-14 05:24:50 +00:00
parent 69cd08d9f7
commit ff7b9f5541
10 changed files with 41 additions and 43 deletions

View File

@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: fmgr.h,v 1.5 2000/06/13 07:35:23 tgl Exp $
* $Id: fmgr.h,v 1.6 2000/06/14 05:24:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -147,6 +147,9 @@ extern void fmgr_info(Oid functionId, FmgrInfo *finfo);
#define PG_RETURN_NULL() \
do { fcinfo->isnull = true; return (Datum) 0; } while (0)
/* A few internal functions return void (which is not the same as NULL!) */
#define PG_RETURN_VOID() return (Datum) 0
/* Macros for returning results of standard types */
#define PG_RETURN_INT32(x) return Int32GetDatum(x)