ATLAS Offline Software
Loading...
Searching...
No Matches
compare-pointer.h File Reference

Comparison functions for generic (void) pointers. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int pointer_equal (void *location1, void *location2)
 Compare two pointers to determine if they are equal.
int pointer_compare (void *location1, void *location2)
 Compare two pointers.

Detailed Description

Comparison functions for generic (void) pointers.

To find the difference between two pointers, use pointer_compare.

To find if two pointers are equal, use pointer_equal.

Definition in file compare-pointer.h.

Function Documentation

◆ pointer_compare()

int pointer_compare ( void * location1,
void * location2 )

Compare two pointers.

Parameters
location1The first pointer.
location2The second pointer.
Returns
A negative value if the first pointer is in a lower memory address than the second, a positive value if the first pointer is in a higher memory address than the second, zero if they point to the same location.

◆ pointer_equal()

int pointer_equal ( void * location1,
void * location2 )

Compare two pointers to determine if they are equal.


Parameters
location1The first pointer.
location2The second pointer.
Returns
Non-zero if the pointers are equal, zero if they are not equal.