Re: GRegex

Il giorno mar, 24/10/2006 alle 22.31 +0200, Murray Cumming ha scritto:
> > 1) Please don't name variables 'string', as there may be a conflict
> > > with C++'s std::string
> > 
> > I think they were called "string" in the original version of GRegex
> > written by Scott Wimer in 1999. PCRE calls the string "subject".
> > 
> > However it's not a problem with C++, this program is valid:
> > [...]
> It's not necessary to challenge every compiler and every build
> environment with that. A rename is easy.

IMHO string is the easier to understand than subject or any other name.

There are lots of functions using parameters called string, such as
g_strsplit, g_string_append, g_pattern_match or g_quark_from_string.
> > I added _ref and _unref because the only two programs that are currently
> > using my modified version of EggRegex are GtkSourceView and MooEdit.Both
> > programs need reference counting for regular expressions.
> [snip]
> Do they need to reference count plain strings too?

GtkSourceView needs only to have regexes ref counted.

Marco Barisione

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