plhashcomparator.rst (865B)
1 PLHashComparator 2 ================ 3 4 5 Syntax 6 ------ 7 8 .. code:: 9 10 #include <plhash.h> 11 12 typedef PRIntn (PR_CALLBACK *PLHashComparator)( 13 const void *v1, 14 const void *v2); 15 16 17 Description 18 ----------- 19 20 :ref:`PLHashComparator` is a function type that compares two values of an 21 unspecified type. It returns a nonzero value if the two values are 22 equal, and 0 if the two values are not equal. :ref:`PLHashComparator` 23 defines the meaning of equality for the unspecified type. 24 25 For convenience, two comparator functions are provided. 26 :ref:`PL_CompareStrings` compare two character strings using ``strcmp``. 27 :ref:`PL_CompareValues` compares the values of the arguments v1 and v2 28 numerically. 29 30 31 Remark 32 ------ 33 34 The return value of :ref:`PLHashComparator` functions should be of type 35 :ref:`PRBool`. 36 37 38 See Also 39 -------- 40 41 :ref:`PL_CompareStrings`, :ref:`PL_CompareValues`