Fix invalid prototype after switches to size_t instead of unsigned int.

This commit is contained in:
Siu Kwan Lam 2012-09-10 17:22:20 -07:00
commit 5ee6bba66b
3 changed files with 7 additions and 7 deletions

View file

@ -254,7 +254,7 @@ void LLVMDisposeTargetMachine(LLVMTargetMachineRef tm){
unsigned char* LLVMTargetMachineEmitFile(LLVMTargetMachineRef tmref,
LLVMModuleRef modref,
int assembly, unsigned * lenp,
int assembly, size_t * lenp,
std::string &error)
{
using namespace llvm;
@ -352,7 +352,7 @@ LLVMTargetDataRef LLVMTargetMachineGetTargetData(LLVMTargetMachineRef tm)
}
unsigned char* LLVMGetNativeCodeFromModule(LLVMModuleRef module, int assembly,
unsigned * lenp, std::string &error)
size_t * lenp, std::string &error)
{
using namespace llvm;
assert(lenp);
@ -988,7 +988,7 @@ unsigned LLVMLinkModules(LLVMModuleRef dest, LLVMModuleRef src, unsigned int mod
}
#endif
unsigned char *LLVMGetBitcodeFromModule(LLVMModuleRef module, unsigned *lenp)
unsigned char *LLVMGetBitcodeFromModule(LLVMModuleRef module, size_t *lenp)
{
assert(lenp);

View file

@ -109,7 +109,7 @@ void LLVMDisposeTargetMachine(LLVMTargetMachineRef tm);
*/
unsigned char* LLVMTargetMachineEmitFile(LLVMTargetMachineRef tmref,
LLVMModuleRef modref,
int assembly, unsigned * lenp,
int assembly, size_t * lenp,
std::string &error);
/*
@ -151,7 +151,7 @@ void LLVMPrintRegisteredTargetsForVersion();
* Wraps TargetMachine::addPassesToEmitFile
*/
unsigned char* LLVMGetNativeCodeFromModule(LLVMModuleRef module, int assembly,
unsigned * lenp, std::string &error);
size_t * lenp, std::string &error);
/*
* Wraps IRBuilder::CreateFence
@ -446,7 +446,7 @@ unsigned LLVMLinkModules(LLVMModuleRef dest, LLVMModuleRef src,
#endif
/* Returns pointer to a heap-allocated block of `*len' bytes containing bit code
* for the given module. NULL on error. */
unsigned char *LLVMGetBitcodeFromModule(LLVMModuleRef module, unsigned *len);
unsigned char *LLVMGetBitcodeFromModule(LLVMModuleRef module, size_t *len);
/* Wraps llvm::sys::DynamicLibrary::LoadLibraryPermanently(). Returns 0 on
* failure (with errmsg filled in) and 1 on success. Dispose error message after

View file

@ -108,7 +108,7 @@ void **make_array_from_list(PyObject *list, int n)
}
#define LIST_FROM_ARRAY_IMPL(TYPE) \
PyObject *make_list_from_ ## TYPE ## _array( TYPE *p, unsigned n) \
PyObject *make_list_from_ ## TYPE ## _array( TYPE *p, size_t n) \
{ \
size_t i; \
PyObject *list = PyList_New(n); \