1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Redefine Datum as uintptr_t, instead of unsigned long.

This is more in keeping with modern practice, and is a first step towards
porting to Win64 (which has sizeof(pointer) > sizeof(long)).

Tsutomu Yamada, Magnus Hagander, Tom Lane
This commit is contained in:
Tom Lane
2009-12-31 19:41:37 +00:00
parent 8abb011047
commit 85d02a6586
16 changed files with 751 additions and 423 deletions

View File

@ -50,7 +50,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.127 2009/06/11 14:48:53 momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.128 2009/12/31 19:41:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -192,7 +192,7 @@ heap_fill_tuple(TupleDesc tupleDesc,
if (att[i]->attbyval)
{
/* pass-by-value */
data = (char *) att_align_nominal((long) data, att[i]->attalign);
data = (char *) att_align_nominal(data, att[i]->attalign);
store_att_byval(data, values[i], att[i]->attlen);
data_length = att[i]->attlen;
}
@ -226,7 +226,7 @@ heap_fill_tuple(TupleDesc tupleDesc,
else
{
/* full 4-byte header varlena */
data = (char *) att_align_nominal((long) data,
data = (char *) att_align_nominal(data,
att[i]->attalign);
data_length = VARSIZE(val);
memcpy(data, val, data_length);
@ -243,7 +243,7 @@ heap_fill_tuple(TupleDesc tupleDesc,
else
{
/* fixed-length pass-by-reference */
data = (char *) att_align_nominal((long) data, att[i]->attalign);
data = (char *) att_align_nominal(data, att[i]->attalign);
Assert(att[i]->attlen > 0);
data_length = att[i]->attlen;
memcpy(data, DatumGetPointer(values[i]), data_length);