mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Compatibility with Leptonica 1.73
http://www.leptonica.org/source/version-notes.html: Naming changes (to avoid collisions): #defines MALLOC --> LEPT_MALLOC, CALLOC --> LEPT_CALLOC, etc. ByteBuffer --> L_ByteBuffer Introduction of the TESSERACT_LIBLEPT_PREREQ macro allows backward compatibility with Leptonica <1.73.
This commit is contained in:
parent
1826ac140b
commit
6072814fea
@ -19,6 +19,22 @@
|
||||
#include <stdio.h>
|
||||
#include <mach/mach_time.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
Convenience macro to test the version of Leptonica.
|
||||
*/
|
||||
#if defined(LIBLEPT_MAJOR_VERSION) && defined(LIBLEPT_MINOR_VERSION)
|
||||
# define TESSERACT_LIBLEPT_PREREQ(maj, min) \
|
||||
((LIBLEPT_MAJOR_VERSION) > (maj) || ((LIBLEPT_MAJOR_VERSION) == (maj) && (LIBLEPT_MINOR_VERSION) >= (min)))
|
||||
#else
|
||||
# define TESSERACT_LIBLEPT_PREREQ(maj, min) 0
|
||||
#endif
|
||||
|
||||
#if TESSERACT_LIBLEPT_PREREQ(1,73)
|
||||
# define CALLOC LEPT_CALLOC
|
||||
# define FREE LEPT_FREE
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENCL
|
||||
|
||||
#include "opencl_device_selection.h"
|
||||
|
Loading…
Reference in New Issue
Block a user