** Compare text in decimal order. */
| 4915 | ** Compare text in decimal order. |
| 4916 | */ |
| 4917 | static int decimalCollFunc( |
| 4918 | void *notUsed, |
| 4919 | int nKey1, const void *pKey1, |
| 4920 | int nKey2, const void *pKey2 |
| 4921 | ){ |
| 4922 | const unsigned char *zA = (const unsigned char*)pKey1; |
| 4923 | const unsigned char *zB = (const unsigned char*)pKey2; |
| 4924 | Decimal *pA = decimal_new(0, 0, nKey1, zA); |
| 4925 | Decimal *pB = decimal_new(0, 0, nKey2, zB); |
| 4926 | int rc; |
| 4927 | UNUSED_PARAMETER(notUsed); |
| 4928 | if( pA==0 || pB==0 ){ |
| 4929 | rc = 0; |
| 4930 | }else{ |
| 4931 | rc = decimal_cmp(pA, pB); |
| 4932 | } |
| 4933 | decimal_free(pA); |
| 4934 | decimal_free(pB); |
| 4935 | return rc; |
| 4936 | } |
| 4937 | |
| 4938 | |
| 4939 | /* |
nothing calls this directly
no test coverage detected