Skip to content

Commit

Permalink
Tweak rustllvm bindings to work on linux, where bool != LLVMBool.
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon committed Mar 26, 2011
1 parent 24a75ee commit fb08ef4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rustllvm/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI) {
delete unwrap(SI);
}

bool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMSectionIteratorRef SI) {
return *unwrap(SI) == unwrap(ObjectFile)->end_sections();
return (*unwrap(SI) == unwrap(ObjectFile)->end_sections()) ? 1 : 0;
}

void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) {
Expand Down
2 changes: 1 addition & 1 deletion src/rustllvm/include/llvm-c/Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void LLVMDisposeObjectFile(LLVMObjectFileRef ObjectFile);

LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile);
void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI);
bool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMSectionIteratorRef SI);
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI);
const char *LLVMGetSectionName(LLVMSectionIteratorRef SI);
Expand Down

0 comments on commit fb08ef4

Please sign in to comment.