[liblouis-liblouisxml] Re: LoadLibrary and ABI

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Sat, 27 Jun 2009 22:51:26 +0100

Hello,
My thoughts on the API version stuff, can't we just use the output from the lou_version function to determine whether the bindings and library match?

Michael Whapples
On 26/06/09 01:22, James Teh wrote:
In Windows, we currently build liblouis as just liblouis.dll. However, with this patch, maybe we can go back to liblouis-x.dll; we may not even need the Unix/Windows conditional, as I assume LIBLOUIS_SONAME will resolve to liblouis-x.dll on Windows.

Thoughts from other Windows users? Appending the version suffix is still generally non-standard on Windows, but this would help to solve the ABI change problem.

Jamie

On 26/06/2009 10:10 AM, Samuel Thibault wrote:
Hello,

The python bindings of liblouis uses LoadLibrary then ctypes to access
liblouis' functions. However, this does not handle the case when the
library ABI changes (e.g. if length parameters were turned into size_t)
and both new versions of the library and old versions of the library
co-exist. Also, some systems do not use the .so extension, but .dylib,
etc. The attached subversion patch extracts the precise name of the
library that the python bindings was built with, to make sure to load
the correct file. It assumes that you have run

svn mv __init__.py __init__.py.in

Samuel


For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts: