aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-06-14 05:24:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-06-14 05:24:50 +0000
commitff7b9f55410bbfbd017af331d23371ab61b63d5e (patch)
tree6a055be48dd161470503eb2f1a0376bc048ab73b /src/backend/utils/adt/arrayfuncs.c
parent69cd08d9f79818c8ff8b7b74c7ecfe8dcdb0202c (diff)
downloadpostgresql-ff7b9f55410bbfbd017af331d23371ab61b63d5e.tar.gz
postgresql-ff7b9f55410bbfbd017af331d23371ab61b63d5e.zip
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.
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
-rw-r--r--src/backend/utils/adt/arrayfuncs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index d54a6847bd2..aae18aa047f 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.57 2000/06/13 07:35:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.58 2000/06/14 05:24:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -187,7 +187,7 @@ array_in(PG_FUNCTION_ARGS)
retval = (ArrayType *) palloc(sizeof(ArrayType));
MemSet(retval, 0, sizeof(ArrayType));
*(int32 *) retval = sizeof(ArrayType);
- return PointerGetDatum(retval);
+ PG_RETURN_POINTER(retval);
}
if (*p == '{')
@@ -238,7 +238,7 @@ array_in(PG_FUNCTION_ARGS)
PG_RETURN_NULL();
}
pfree(string_save);
- return PointerGetDatum(retval);
+ PG_RETURN_POINTER(retval);
}
/*-----------------------------------------------------------------------------
@@ -622,9 +622,6 @@ array_out(PG_FUNCTION_ARGS)
int ndim,
*dim;
- if (v == (ArrayType *) NULL)
- PG_RETURN_CSTRING((char *) NULL);
-
if (ARR_IS_LO(v) == true)
{
text *p;