mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 12:31:23 +02:00
Parenthesize macro arguments safely. I see no bug among the current
uses of PG_DETOAST_DATUM_SLICE, but it's clearly trouble waiting to happen.
This commit is contained in:
parent
5e87ebb0c3
commit
571340a00e
@ -11,7 +11,7 @@
|
|||||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/include/fmgr.h,v 1.53 2007/09/21 22:52:52 tgl Exp $
|
* $PostgreSQL: pgsql/src/include/fmgr.h,v 1.54 2007/09/22 04:41:19 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -179,7 +179,7 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena * datum);
|
|||||||
pg_detoast_datum_copy((struct varlena *) DatumGetPointer(datum))
|
pg_detoast_datum_copy((struct varlena *) DatumGetPointer(datum))
|
||||||
#define PG_DETOAST_DATUM_SLICE(datum,f,c) \
|
#define PG_DETOAST_DATUM_SLICE(datum,f,c) \
|
||||||
pg_detoast_datum_slice((struct varlena *) DatumGetPointer(datum), \
|
pg_detoast_datum_slice((struct varlena *) DatumGetPointer(datum), \
|
||||||
(int32) f, (int32) c)
|
(int32) (f), (int32) (c))
|
||||||
/* WARNING -- unaligned pointer */
|
/* WARNING -- unaligned pointer */
|
||||||
#define PG_DETOAST_DATUM_PACKED(datum) \
|
#define PG_DETOAST_DATUM_PACKED(datum) \
|
||||||
pg_detoast_datum_packed((struct varlena *) DatumGetPointer(datum))
|
pg_detoast_datum_packed((struct varlena *) DatumGetPointer(datum))
|
||||||
|
Loading…
Reference in New Issue
Block a user