Re: GRegex

On 10/24/06, Behdad Esfahbod <behdad behdad org> wrote:
On Tue, 2006-10-24 at 16:05 -0400, Marco Barisione wrote:
> If you prefer you can pass --enable-system-pcre to use the
> system-supplied library but, if it's compiled without utf-8 support,
> g_regex_new fails.

This is broken.  It should err at configure time, not run time.  The
user shouldn't need to check the output of g_regex_new for failures,
just like any other thing we do with glib.

It should be possible to write an auto* check that basically checks
whether something like:

#include <pcre.h>
int main(int argc, char ** argv) {
int has_utf8_support;
if(pcre_config(PCRE_CONFIG_UTF8,  &has_utf8_support))
  return has_utf8_support;
return 0;

returns '1' or '0'. If so, we should probably favor the system
installation of PCRE over the glib-supplied one.

Counting bodies like sheep to the rhythm of the war drums.

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