提交 ce33af22 编写于 作者: H Heikki Linnakangas

Replace "uint" type with uint32 or unsigned int.

"uint" is not a standard C type, so it might not be available on all
platforms. Indeed, we had a typedef for WIN32 for that. But there's no reason
to use "uint", might as well just use the C standard "unsigned int", or the
PostgreSQL-specific uint32. Makes the intention more clear too, IMHO.
上级 b6230cab
......@@ -9003,8 +9003,8 @@ RecoveryRestartPoint(const CheckPoint *checkPoint)
{
// int elapsed_secs;
int rmid;
uint _logId = 0;
uint _logSeg = 0;
uint32 _logId = 0;
uint32 _logSeg = 0;
/* use volatile pointer to prevent code rearrangement */
volatile XLogCtlData *xlogctl = XLogCtl;
......
......@@ -4460,7 +4460,7 @@ performDtxProtocolCommand(DtxProtocolCommand dtxProtocolCommand,
gid, contextInfo->nestingLevel, GetCurrentTransactionNestLevel())));
}
uint i = GetCurrentTransactionNestLevel() - contextInfo->nestingLevel;
unsigned int i = GetCurrentTransactionNestLevel() - contextInfo->nestingLevel;
while (i > 0)
{
RollbackAndReleaseCurrentSubTransaction();
......
......@@ -1239,7 +1239,7 @@ gpdb::FCastFunc
return false;
}
uint
unsigned int
gpdb::UlCmpt
(
Oid oidOp,
......@@ -1261,7 +1261,7 @@ gpdb::OidScCmp
(
Oid oidLeft,
Oid oidRight,
uint ulCmpt
unsigned int ulCmpt
)
{
GP_WRAP_START;
......
......@@ -1198,7 +1198,7 @@ test__MemoryAccounting_Serialize_Deserialize__Validate(void **state)
StringInfoData buffer;
initStringInfo(&buffer);
uint totalSerialized = MemoryAccounting_Serialize(&buffer);
uint32 totalSerialized = MemoryAccounting_Serialize(&buffer);
/*
* We haven't created any new account, so we should have
......
......@@ -1688,7 +1688,7 @@ initDDSystem(ddp_inst_desc_t *ddp_inst, ddp_conn_desc_t *ddp_conn, ddp_client_in
bool createStorageUnit, char **default_backup_directory, bool remote)
{
int err = DD_ERR_NONE;
uint POOL_SIZE = DDBOOST_POOL_SIZE;
unsigned int POOL_SIZE = DDBOOST_POOL_SIZE;
char *storage_unit_name = NULL;
char *dd_boost_username = NULL;
char *dd_boost_passwd = NULL;
......
......@@ -414,14 +414,14 @@ typedef struct MotionNodeEntry
* Variable that records the total number of senders to this motion node.
* This is expected to always be (number of qExecs).
*/
uint num_senders;
uint32 num_senders;
/*
* Variable that tracks number of senders that have reported end-of-stream
* for this motion node. When the local node sends end-of-stream, that is
* also recorded.
*/
uint num_stream_ends_recvd;
uint32 num_stream_ends_recvd;
bool cleanedUp;
bool valid;
......
......@@ -16,11 +16,6 @@
#ifndef HTUPFIFO_H
#define HTUPFIFO_H
#ifdef WIN32
typedef unsigned int uint;
#endif
/* An entry in the HeapTuple FIFO. Entries are formed into queues. */
typedef struct htf_entry_data
{
......@@ -57,7 +52,7 @@ typedef struct htup_fifo_state
* The maximum size that the FIFO is allowed to grow to, in bytes, before
* it will cause an error to be reported.
*/
uint max_mem_size;
uint32 max_mem_size;
} htup_fifo_state, *htup_fifo;
......
......@@ -248,10 +248,10 @@ namespace gpdb {
bool FCastFunc(Oid oidSrc, Oid oidDest, bool *is_binary_coercible, Oid *oidCastFunc);
// get type of operator
uint UlCmpt(Oid oidOp, Oid oidLeft, Oid oidRight);
unsigned int UlCmpt(Oid oidOp, Oid oidLeft, Oid oidRight);
// get scalar comparison between given types
Oid OidScCmp(Oid oidLeft, Oid oidRight, uint ulCmpt);
Oid OidScCmp(Oid oidLeft, Oid oidRight, unsigned int ulCmpt);
// get equality operator for given type
Oid OidEqualityOp(Oid oidType);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册