qa.vec = vec; qa.elsize = elsize; qa.pivot = pivot; qa.cmp = cmp; qa.arg = arg;
hsa.vec = vec; hsa.elsize = elsize; hsa.pivot = pivot; hsa.cmp = cmp; hsa.arg = arg; hsa.fastcopy = (cmp == sort_compare || cmp == sort_compare_strings);
js_HeapSort(void *vec, size_t nel, size_t elsize, JSComparator cmp, void *arg) {    void *pivot;    HSortArgs qa;    int i;    pivot = malloc(elsize);    if (!pivot)	return JS_FALSE;    qa.vec = vec;    qa.elsize = elsize;    qa.pivot = pivot;    qa.cmp = cmp;    qa.arg = arg;    for (i = nel/2; i > 0; i--)        HeapSortHelper(&qa, i, (int) nel);    while (nel > 2)        HeapSortHelper(&qa, 1, (int) --nel);    free(pivot);    return JS_TRUE;}