mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 17:12:51 +02:00
Regexp ignores are now compiled when they're created, not every time
they're checked (every time a new line is received). This should reduce some CPU load when using them. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@812 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
6cc6f90468
commit
4301e04791
2 changed files with 20 additions and 3 deletions
|
|
@ -2,6 +2,9 @@
|
|||
#define __IGNORE_H
|
||||
|
||||
#include "servers.h"
|
||||
#ifdef HAVE_REGEX_H
|
||||
# include <regex.h>
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
char *mask; /* nick mask */
|
||||
|
|
@ -18,6 +21,10 @@ typedef struct {
|
|||
int regexp:1;
|
||||
int fullword:1;
|
||||
int replies:1; /* ignore replies to nick in channel */
|
||||
#ifdef HAVE_REGEX_H
|
||||
int regexp_compiled:1; /* should always be TRUE, unless regexp is invalid */
|
||||
regex_t preg;
|
||||
#endif
|
||||
} IGNORE_REC;
|
||||
|
||||
extern GSList *ignores;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue