stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] [PATCH] Use PPCRE for rules matching instead of the "..." sy


From: Shawn
Subject: Re: [STUMP] [PATCH] Use PPCRE for rules matching instead of the "..." syntax.
Date: Fri, 07 Nov 2008 16:40:18 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Lionel Flandrin <address@hidden> writes:

> +(defvar *rule-scanners-cache* (make-hash-table :test 'equal)
> +  "A cache for the ppcre scanners")
> +
> +(defun get-or-create-rule-scanner (regex)
> +  (or (gethash regex *rule-scanners-cache*)
> +      (setf (gethash regex *rule-scanners-cache*)
> +         (ppcre:create-scanner regex))))
> +

Now that I've applied the patch, this part has come to my attention
which I blindly skipped when I looked at it the first time.

This is, of course, nasty and ugly and should be fixed by compiling
the regexp at the proper point in time by either getting the user to
do it and/or using compiler macros at the right spots or perhaps by
other methods.

All that said, it does work with minimal disruption so I'm gonna keep
it in there and expect a sweeeeeet ammendment patch at some point.

-Shawn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]