Skip to content

Commit

Permalink
fix formating in C-API and add TessChoiceIteratorDelete
Browse files Browse the repository at this point in the history
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1092 d0cd1f9f-072b-0410-8dd7-cf729c803f20
  • Loading branch information
zdenop committed May 3, 2014
1 parent f86e9d8 commit bc09cd9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 10 additions & 4 deletions api/capi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,9 @@ TESS_API const TessPageIterator* TESS_CALL TessResultIteratorGetPageIteratorCons

TESS_API const TessChoiceIterator* TESS_CALL TessResultIteratorGetChoiceIterator(const TessResultIterator* handle)
{
return new TessChoiceIterator(*handle);
return new TessChoiceIterator(*handle);
}

TESS_API BOOL TESS_CALL TessResultIteratorNext(TessResultIterator* handle, TessPageIteratorLevel level)
{
return handle->Next(level);
Expand Down Expand Up @@ -788,17 +789,22 @@ TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsDropcap(const TessResultIterat
return handle->SymbolIsDropcap() ? TRUE : FALSE;
}

TESS_API void TESS_CALL TessChoiceIteratorDelete(TessChoiceIterator* handle)
{
delete handle;
}

TESS_API BOOL TESS_CALL TessChoiceIteratorNext(TessChoiceIterator* handle)
{
return handle->Next();
return handle->Next();
}

TESS_API const char* TESS_CALL TessChoiceIteratorGetUTF8Text(const TessChoiceIterator* handle)
{
return handle->GetUTF8Text();
return handle->GetUTF8Text();
}

TESS_API float TESS_CALL TessChoiceIteratorConfidence(const TessChoiceIterator* handle)
{
return handle->Confidence();
return handle->Confidence();
}
1 change: 1 addition & 0 deletions api/capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsSuperscript(const TessResultI
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsSubscript(const TessResultIterator* handle);
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsDropcap(const TessResultIterator* handle);

TESS_API void TESS_CALL TessChoiceIteratorDelete(TessChoiceIterator* handle);
TESS_API BOOL TESS_CALL TessChoiceIteratorNext(TessChoiceIterator* handle);
TESS_API const char* TESS_CALL TessChoiceIteratorGetUTF8Text(const TessChoiceIterator* handle);
TESS_API float TESS_CALL TessChoiceIteratorConfidence(const TessChoiceIterator* handle);
Expand Down

0 comments on commit bc09cd9

Please sign in to comment.