Replace pcre with pcre2

Closes: https://github.com/swaywm/sway/issues/6838
This commit is contained in:
ndren 2022-03-12 13:02:32 +00:00 committed by GitHub
parent 04676936e7
commit f614f35e73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 53 additions and 43 deletions

View file

@ -1,7 +1,8 @@
#ifndef _SWAY_CRITERIA_H
#define _SWAY_CRITERIA_H
#include <pcre.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
#include "config.h"
#include "list.h"
#include "tree/view.h"
@ -15,13 +16,13 @@ enum criteria_type {
};
enum pattern_type {
PATTERN_PCRE,
PATTERN_PCRE2,
PATTERN_FOCUSED,
};
struct pattern {
enum pattern_type match_type;
pcre *regex;
pcre2_code *regex;
};
struct criteria {