regify utility  2.0.0-0

This section contains collection support for 32 Bit Integers such as int32_t. More...

Functions

RUAPI ru_uint ruInt32Hash (trans_ptr key)
 Returns a hash for given 32 bit integer number. More...
 
RUAPI bool ruInt32Match (trans_ptr testKey, trans_ptr existingKey)
 Convenience 32 bit integer match function for Maps. More...
 
RUAPI int32_t ruInt32Comp (trans_ptr testVal, trans_ptr existingVal)
 32 bit integer comparator function for the ruType system More...
 
RUAPI ptr ruInt32RefPtr (ptr in)
 Returns the content of the given 32 bit integer address as pointer. More...
 
RUAPI int32_t ruRefPtrInt32 (ptr src, ptr *dst)
 Copies the 32 bit integer stored in src to dst. More...
 
RUAPI ruType ruTypeInt32 (void)
 Returns an ruType used for 32 bit integers. More...
 

Detailed Description

This section contains collection support for 32 Bit Integers such as int32_t.

Function Documentation

◆ ruInt32Comp()

RUAPI int32_t ruInt32Comp ( trans_ptr  testVal,
trans_ptr  existingVal 
)

32 bit integer comparator function for the ruType system

Parameters
testValValue to compare against existing value.
existingValThe existing value to compare testVal to.
Returns
-1 if testVal is less existingVal, 1 if testVal is greater existingVal or 0 in case both of them are equal.

◆ ruInt32Hash()

RUAPI ru_uint ruInt32Hash ( trans_ptr  key)

Returns a hash for given 32 bit integer number.

Parameters
keyNumber to hash
Returns
The hash of the given number.

◆ ruInt32Match()

RUAPI bool ruInt32Match ( trans_ptr  testKey,
trans_ptr  existingKey 
)

Convenience 32 bit integer match function for Maps.

Parameters
testKeyFirst comparison int.
existingKeySecond comparison int.
Returns
true if they are equal

◆ ruInt32RefPtr()

RUAPI ptr ruInt32RefPtr ( ptr  in)

Returns the content of the given 32 bit integer address as pointer.

Parameters
inaddress to 32 bit integer
Returns
content of given address in pointer sized field

◆ ruRefPtrInt32()

RUAPI int32_t ruRefPtrInt32 ( ptr  src,
ptr dst 
)

Copies the 32 bit integer stored in src to dst.

Parameters
srcWhere the 32 bit integer is stored, usually in the collection.
dstWhere the value will be copied to properly type casted.
Returns
RUE_OK unless dst is not set.

◆ ruTypeInt32()

RUAPI ruType ruTypeInt32 ( void  )

Returns an ruType used for 32 bit integers.

Returns
32 bit integer type specification. Caller need not free.