mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Massive commit to run PGINDENT on all *.c and *.h files.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* tupmacs.h--
|
||||
* Tuple macros used by both index tuples and heap tuples.
|
||||
* Tuple macros used by both index tuples and heap tuples.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: tupmacs.h,v 1.1 1996/08/27 21:50:27 scrappy Exp $
|
||||
* $Id: tupmacs.h,v 1.2 1997/09/07 04:56:17 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,7 +22,7 @@
|
||||
* given a AttributeTupleForm and a pointer into a tuple's data
|
||||
* area, return the correct value or pointer.
|
||||
*
|
||||
* We return a 4 byte (char *) value in all cases. If the attribute has
|
||||
* We return a 4 byte (char *) value in all cases. If the attribute has
|
||||
* "byval" false or has variable length, we return the same pointer
|
||||
* into the tuple data area that we're passed. Otherwise, we return
|
||||
* the 1, 2, or 4 bytes pointed to by it, properly extended to 4
|
||||
@@ -31,7 +31,7 @@
|
||||
* note that T must already be properly LONGALIGN/SHORTALIGN'd for
|
||||
* this to work correctly.
|
||||
*
|
||||
* the double-cast is to stop gcc from (correctly) complaining about
|
||||
* the double-cast is to stop gcc from (correctly) complaining about
|
||||
* casting integer types with size < sizeof(char *) to (char *).
|
||||
* sign-extension may get weird if you use an integer type that
|
||||
* isn't the same size as (char *) for the first cast. (on the other
|
||||
@@ -39,17 +39,17 @@
|
||||
*
|
||||
* attbyval seems to be fairly redundant. We have to return a pointer if
|
||||
* the value is longer than 4 bytes or has variable length; returning the
|
||||
* value would be useless. In fact, for at least the variable length case,
|
||||
* value would be useless. In fact, for at least the variable length case,
|
||||
* the caller assumes we return a pointer regardless of attbyval.
|
||||
* I would eliminate attbyval altogether, but I don't know how. -BRYANH.
|
||||
*/
|
||||
#define fetchatt(A, T) \
|
||||
((*(A))->attbyval && (*(A))->attlen != -1 \
|
||||
? ((*(A))->attlen > sizeof(int16) \
|
||||
? (char *) (long) *((int32 *)(T)) \
|
||||
: ((*(A))->attlen < sizeof(int16) \
|
||||
? (char *) (long) *((char *)(T)) \
|
||||
: (char *) (long) *((int16 *)(T)))) \
|
||||
? (char *) (long) *((int32 *)(T)) \
|
||||
: ((*(A))->attlen < sizeof(int16) \
|
||||
? (char *) (long) *((char *)(T)) \
|
||||
: (char *) (long) *((int16 *)(T)))) \
|
||||
: (char *) (T))
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user