diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-10-01 16:41:52 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-10-01 16:41:52 +0000 |
commit | 5723ff83f7797c61b3ec5c872bf3b78873d3adaa (patch) | |
tree | 05309282019367356d0a1a6c2c37b979d5655b11 /pango/pango-script.c | |
parent | 47e04408669687d29444b57c2a92018f4beaef7e (diff) | |
download | pango-5723ff83f7797c61b3ec5c872bf3b78873d3adaa.tar.gz |
Fix a c99-ism, include stdlib.h for bsearch. (#123616, Kaushal Kumar)
Wed Oct 1 12:40:38 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-script.c (pango_script_get_sample_language):
Fix a c99-ism, include stdlib.h for bsearch.
(#123616, Kaushal Kumar)
Diffstat (limited to 'pango/pango-script.c')
-rw-r--r-- | pango/pango-script.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pango/pango-script.c b/pango/pango-script.c index 73e86ff0..c489a2e7 100644 --- a/pango/pango-script.c +++ b/pango/pango-script.c @@ -53,6 +53,7 @@ * or other dealings in this Software without prior written authorization * of the copyright holder. */ +#include <stdlib.h> #include <string.h> #include "pango-script.h" @@ -507,10 +508,12 @@ pango_script_get_sample_language (PangoScript script) "", /* PANGO_SCRIPT_TAI_LE */ "uga", /* PANGO_SCRIPT_UGARITIC */ }; - + const char *sample_language; + g_return_val_if_fail (script >= 0, NULL); g_return_val_if_fail (script < G_N_ELEMENTS (sample_languages), NULL); - const char *sample_language = sample_languages[script]; + + sample_language = sample_languages[script]; if (!sample_language[0]) return NULL; |