13 /* =============================================================================
17 * pair_t* pair_alloc(void* firstPtr, void* secondPtr);
18 * =============================================================================
20 public static Pair alloc(Object first,Object second)
31 /* =============================================================================
34 * -- Returns NULL if failure
35 * =============================================================================
37 public static Pair Ppair_alloc (Object firstPtr, Object secondPtr) {
38 Pair pairPtr = new Pair();
39 pairPtr.first = firstPtr;
40 pairPtr.second = secondPtr;
45 /* =============================================================================
47 * =============================================================================
49 * void pair_free (pair_t* pairPtr);
52 public static void free(Pair pairPtr)
58 /* =============================================================================
60 * =============================================================================
62 void Ppair_free (pair_t* pairPtr);
65 /* =============================================================================
67 * -- Exchange 'firstPtr' and 'secondPtr'
68 * =============================================================================
69 * void pair_swap (pair_t* pairPtr);
71 public static void swap(Pair pairPtr)
73 Object tmpPtr = pairPtr.first;
75 pairPtr.first = pairPtr.second;
76 pairPtr.second = tmpPtr;
81 /* =============================================================================
85 * =============================================================================