fix typing problems and a bug in quote.c?

This commit is contained in:
Vítor Santos Costa 2010-05-06 12:19:51 +01:00
parent 5f5fcb920f
commit 51f33514b3
4 changed files with 8 additions and 8 deletions

View File

@ -319,7 +319,7 @@ Yap_LookupMaybeWideAtomWithLength(wchar_t *atom, size_t len)
while (len--) {*ptr++ = *p++;}
ptr[0] = '\0';
at = LookupWideAtom(ptr0);
Yap_FreeCodeSpace(ptr0);
Yap_FreeCodeSpace((char *)ptr0);
return at;
} else {
char *ptr, *ptr0;

View File

@ -117,14 +117,14 @@ typedef unsigned __int64 uint64_t;
typedef uintptr_t PL_fid_t; /* opaque foreign context handle */
#endif
typedef void *function_t;
typedef void *pl_function_t;
#define fid_t PL_fid_t /* avoid AIX name-clash */
typedef struct _PL_extension
{ const char *predicate_name; /* Name of the predicate */
short arity; /* Arity of the predicate */
function_t function; /* Implementing functions */
pl_function_t function; /* Implementing functions */
short flags; /* Or of PL_FA_... */
} PL_extension;
@ -444,8 +444,8 @@ extern X_API term_t PL_exception(qid_t);
extern X_API term_t PL_exception(qid_t);
extern X_API int PL_call_predicate(module_t, int, predicate_t, term_t);
extern X_API int PL_call(term_t, module_t);
extern X_API void PL_register_foreign(const char *, int, foreign_t (*)(void), int);
extern X_API void PL_register_foreign_in_module(const char *, const char *, int, foreign_t (*)(void), int);
extern X_API void PL_register_foreign(const char *, int, pl_function_t, int);
extern X_API void PL_register_foreign_in_module(const char *, const char *, int, pl_function_t, int);
extern X_API void PL_register_extensions(const PL_extension *);
extern X_API void PL_load_extensions(const PL_extension *);
extern X_API int PL_handle_signals(void);

View File

@ -2462,7 +2462,7 @@ X_API int PL_call(term_t tp, module_t m)
return out;
}
X_API void PL_register_foreign_in_module(const char *module, const char *name, int arity, foreign_t (*function)(void), int flags)
X_API void PL_register_foreign_in_module(const char *module, const char *name, int arity, pl_function_t function, int flags)
{
Term tmod;
Int nflags = 0;
@ -2495,7 +2495,7 @@ X_API void PL_register_extensions(const PL_extension *ptr)
PL_load_extensions(ptr);
}
X_API void PL_register_foreign(const char *name, int arity, foreign_t (*function)(void), int flags)
X_API void PL_register_foreign(const char *name, int arity, pl_function_t function, int flags)
{
PL_register_foreign_in_module(NULL, name, arity, function, flags);
}

View File

@ -26,7 +26,7 @@
#include <SWI-Prolog.h>
#include <stdlib.h>
#ifdef HAVE_MALLOC_H
#include HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "error.h"
#include <errno.h>