summaryrefslogtreecommitdiff
path: root/pango/pango-language.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-05-23 01:07:33 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-05-23 01:07:33 +0000
commit8759c47c758e5ee31d96fcf4936cf900f9a9fb08 (patch)
tree42e690fdb37c19415cc47f72f072ca1277fef498 /pango/pango-language.c
parentbd30ee7a7a43ee687bf1881e2f4d9f3461954b7d (diff)
downloadpango-8759c47c758e5ee31d96fcf4936cf900f9a9fb08.tar.gz
Bug 440603 – Minor ABI change
2007-05-22 Behdad Esfahbod <behdad@gnome.org> Bug 440603 – Minor ABI change * pango/pango-language.c (pango_language_includes_script): * pango/pango-ot-tag.c (pango_ot_tag_from_language): Accept language == NULL as legitimate input. svn path=/trunk/; revision=2315
Diffstat (limited to 'pango/pango-language.c')
-rw-r--r--pango/pango-language.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pango/pango-language.c b/pango/pango-language.c
index 89518845..a74f666d 100644
--- a/pango/pango-language.c
+++ b/pango/pango-language.c
@@ -415,7 +415,7 @@ script_for_lang_compare (gconstpointer key,
/**
* pango_language_includes_script:
- * @language: a #PangoLanguage
+ * @language: a #PangoLanguage, or %NULL
* @script: a #PangoScript
*
* Determines if @script is one of the scripts used to
@@ -430,7 +430,8 @@ script_for_lang_compare (gconstpointer key,
* applications in most circumstances.
*
* Return value: %TRUE if @script is one of the scripts used
- * to write @language, or if nothing is known about @language,
+ * to write @language or if nothing is known about @language
+ * (including the case that @language is %NULL),
* %FALSE otherwise.
*
* Since: 1.4
@@ -443,12 +444,10 @@ pango_language_includes_script (PangoLanguage *language,
unsigned int j;
const char *lang_str;
- g_return_val_if_fail (language != NULL, FALSE);
-
#define REAL_SCRIPT(script) \
((script) > PANGO_SCRIPT_INHERITED)
- if (!REAL_SCRIPT (script))
+ if (language == NULL || !REAL_SCRIPT (script))
return TRUE;
lang_str = pango_language_to_string (language);