Possible API/ABI incompatibility with SDL2-ttf
Manuel A. Fernandez Montecelo
manuel.montezelo at gmail.com
Tue Jan 26 18:45:43 UTC 2016
Hi,
We're more than halfway there upgrading packages of the latest
upstream releases to Debian.
When reviewing the changes to the -ttf module, I noticed the diff below.
I don't think that the change of arguments in TTF_GetFontKerningSize()
is ABI compatible, specially in not-so-mainstream architectures, or
with big endian architectures (and we have a bunch of those).
Even if the caller has to provide a parameter which is big enough in
the old ABI, maybe the new code of -ttf would modify bits of the
memory space of the bigger variable that then the caller doesn't
interpret correctly (it reads a number which is different from the
correct one).
There are several packages of Debian using that code:
https://codesearch.debian.net/perpackage-results/TTF_GetFontKerningSize/2/page_0
Can you please review and comment?
===============================
diff --git a/SDL_ttf.h b/SDL_ttf.h
index 1c7a801..f79bd90 100644
--- a/SDL_ttf.h
+++ b/SDL_ttf.h
@@ -1,6 +1,6 @@
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
- Copyright (C) 2001-2013 Sam Lantinga <slouken at libsdl.org>
+ Copyright (C) 2001-2016 Sam Lantinga <slouken at libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -39,7 +39,7 @@ extern "C" {
*/
#define SDL_TTF_MAJOR_VERSION 2
#define SDL_TTF_MINOR_VERSION 0
-#define SDL_TTF_PATCHLEVEL 12
+#define SDL_TTF_PATCHLEVEL 13
/* This macro can be used to fill a version structure with the compile-time
* version of the SDL_ttf library.
@@ -248,7 +248,7 @@ extern DECLSPEC void SDLCALL TTF_Quit(void);
extern DECLSPEC int SDLCALL TTF_WasInit(void);
/* Get the kerning size of two glyphs */
-extern DECLSPEC int TTF_GetFontKerningSize(TTF_Font *font, int
prev_index, int index);
+extern DECLSPEC int TTF_GetFontKerningSize(TTF_Font *font, Uint16
previous_ch, Uint16 ch);
/* We'll use SDL for reporting errors */
#define TTF_SetError SDL_SetError
===============================
--
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
More information about the Pkg-sdl-maintainers
mailing list