mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 15:45:20 +00:00
- Don't rely on the default calling convention being cdecl for function pointers
svn path=/trunk/; revision=42429
This commit is contained in:
parent
1a3dc30655
commit
60bf2397d9
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
bsearch(const void *key, const void *base0, size_t nelem,
|
bsearch(const void *key, const void *base0, size_t nelem,
|
||||||
size_t size, int (*cmp)(const void *ck, const void *ce))
|
size_t size, int (__cdecl *cmp)(const void *ck, const void *ce))
|
||||||
{
|
{
|
||||||
char *base = (char *)base0;
|
char *base = (char *)base0;
|
||||||
int lim, cmpval;
|
int lim, cmpval;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
void *_lfind(const void *key, const void *base, unsigned int *nelp,
|
void *_lfind(const void *key, const void *base, unsigned int *nelp,
|
||||||
unsigned int width, int (*compar)(const void *, const void *))
|
unsigned int width, int (__cdecl *compar)(const void *, const void *))
|
||||||
{
|
{
|
||||||
char* char_base = (char*)base;
|
char* char_base = (char*)base;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
void *_lsearch(const void *key, void *base, unsigned int *nelp, unsigned int width,
|
void *_lsearch(const void *key, void *base, unsigned int *nelp, unsigned int width,
|
||||||
int (*compar)(const void *, const void *))
|
int (__cdecl *compar)(const void *, const void *))
|
||||||
{
|
{
|
||||||
void *ret_find = _lfind(key,base,nelp,width,compar);
|
void *ret_find = _lfind(key,base,nelp,width,compar);
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qst(size_t size, int (*compar)(const void*, const void*), char *base, char *max)
|
qst(size_t size, int (__cdecl *compar)(const void*, const void*), char *base, char *max)
|
||||||
{
|
{
|
||||||
char c, *i, *j, *jj;
|
char c, *i, *j, *jj;
|
||||||
int ii;
|
int ii;
|
||||||
|
@ -176,7 +176,7 @@ qst(size_t size, int (*compar)(const void*, const void*), char *base, char *max)
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
qsort(void *base0, size_t n, size_t size, int (*compar)(const void*, const void*))
|
qsort(void *base0, size_t n, size_t size, int (__cdecl *compar)(const void*, const void*))
|
||||||
{
|
{
|
||||||
char *base = (char *)base0;
|
char *base = (char *)base0;
|
||||||
char c, *i, *j, *lo, *hi;
|
char c, *i, *j, *lo, *hi;
|
||||||
|
|
Loading…
Reference in a new issue