Re: regexpr name clashes with re_match

Guido.van.Rossum@cwi.nl
Mon, 25 Jul 1994 23:04:34 +0200

> The files regexpr.[hc] have name clashes with libsys on NEXTSTEP, and I
> suppose on other BSD systems as well.
>
> re_match is the main problem, I think. In regexpr it is defined as:
> int re_match(regexp_t compiled, char *string, int size, int pos,
> regexp_registers_t regs);
>
> while in regex.h on my system it is:
> extern int re_match(char *string, struct regex *r);

Actuyally I've heard this complaint only about Next systems, so I
suspect it's a Next-ism. Also, I don't see where the Next's re_match
would be used.

> Is there any chance that this could be changed in the Python distribution
> so that there isn't this name clash?

I am currently source compatible with the Emacs regex implementation
-- if you want faster regexp's you can replace my regexpr.c (actually
by Tatu Ylonen <ylo@ngs.fi>) with the Emacs file. (I don't use the
Emacs one because I am not a fan of the GNU copyright. No flames
please: this policy has earned Python a lot of points in some
commercial environments.)

So changing the names isn't really an option. Can't you add
-Dre_match=reg_match to CFLAGS?

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>