How to deprecate PangoScript?



Hi,

I want to release Pango 1.18 early next week.  The only pending item is
how to deprecate PangoScript in favor of the newly added GUnicodeScript?
I'm particularly interested to hear what not to do from binding people.

Possibilities I see:

  1. Do nothing: document that PangoScript and GUnicodeScript are
interchangable and add values to both enums as new scripts are encoded
in Unicode in the future.  The main problem with this approach is that
as pango_script_for_unichar() will be just a wrapper around
g_unichar_get_script(), if you install newer GLib,
pango_script_for_unichar() may return values that are not in the
PangoScript enum.  That's not good.

  2. Leave PangoScript as is, mark it deprecated, and change all public
Pango API to use GUnicodeScript.  I assume this breaks at least C++ code
using those API, so this probably is not an option.

  3. #define PangoScript GUnicodeScript and #define the currently
defined PANGO_SCRIPT_ values to respective G_UNICODE_SCRIPT_ values.
Maybe add new ones in the future, maybe not.

  4. Like 3, but also go ahead and change PangoScript uses to
GUnicodeScript in public Pango API (and internally too).  This doesn't
have the C++ problem because PangoScript and GUnicodeScript will be the
same thing as far as the compiler is concerned.  The gobject type name
for PangoScript changes though as we should make pango_script_get_type()
to just return g_unicode_script_get_type().  Right?

  5. ??


I'm particularly looking for a short-term solution to put in 1.18, and
possibly a longer-term solution for 1.20.  One safe short-term solution
can be don't do anything for 1.18 (not even make
pango_script_for_unichar() use g_unichar_script()).  Given that we are
in API/ABI freeze already, that may be the most reasonable solution for
1.18.

Please discuss.

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]