| 121 | } |
| 122 | |
| 123 | static const char *tp_string(yyjson_val *value, size_t *len) { |
| 124 | const char *text = yyjson_get_str(value); |
| 125 | size_t n = yyjson_get_len(value); |
| 126 | if (!text || !n || strlen(text) != n) |
| 127 | return NULL; |
| 128 | if (len) |
| 129 | *len = n; |
| 130 | return text; |
| 131 | } |
| 132 | |
| 133 | static bool tp_pattern_valid(const char *text, size_t len) { |
| 134 | if (!text || !len || len > TP_MAX_PATTERN || text[0] == '!' || text[0] == '#' || |
no outgoing calls
no test coverage detected