|
8 | 8 | * * patterns - A non-associative list of strings to search for |
9 | 9 | * * replacements - Default replacements for this automaton, used with rustg_acreplace |
10 | 10 | */ |
11 | | -#define rustg_setup_acreplace(key, patterns, replacements) call(RUST_G, "setup_acreplace")(key, json_encode(patterns), json_encode(replacements)) |
| 11 | +#define rustg_setup_acreplace(key, patterns, replacements) RUSTG_CALL(RUST_G, "setup_acreplace")(key, json_encode(patterns), json_encode(replacements)) |
12 | 12 |
|
13 | 13 | /** |
14 | 14 | * Sets up the Aho-Corasick automaton using supplied options. |
|
20 | 20 | * * patterns - A non-associative list of strings to search for |
21 | 21 | * * replacements - Default replacements for this automaton, used with rustg_acreplace |
22 | 22 | */ |
23 | | -#define rustg_setup_acreplace_with_options(key, options, patterns, replacements) call(RUST_G, "setup_acreplace")(key, json_encode(options), json_encode(patterns), json_encode(replacements)) |
| 23 | +#define rustg_setup_acreplace_with_options(key, options, patterns, replacements) RUSTG_CALL(RUST_G, "setup_acreplace")(key, json_encode(options), json_encode(patterns), json_encode(replacements)) |
24 | 24 |
|
25 | 25 | /** |
26 | 26 | * Run the specified replacement engine with the provided haystack text to replace, returning replaced text. |
|
29 | 29 | * * key - The key for the automaton |
30 | 30 | * * text - Text to run replacements on |
31 | 31 | */ |
32 | | -#define rustg_acreplace(key, text) call(RUST_G, "acreplace")(key, text) |
| 32 | +#define rustg_acreplace(key, text) RUSTG_CALL(RUST_G, "acreplace")(key, text) |
33 | 33 |
|
34 | 34 | /** |
35 | 35 | * Run the specified replacement engine with the provided haystack text to replace, returning replaced text. |
|
39 | 39 | * * text - Text to run replacements on |
40 | 40 | * * replacements - Replacements for this call. Must be the same length as the set-up patterns |
41 | 41 | */ |
42 | | -#define rustg_acreplace_with_replacements(key, text, replacements) call(RUST_G, "acreplace_with_replacements")(key, text, json_encode(replacements)) |
| 42 | +#define rustg_acreplace_with_replacements(key, text, replacements) RUSTG_CALL(RUST_G, "acreplace_with_replacements")(key, text, json_encode(replacements)) |
0 commit comments