return;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
lttng_log_level_rule_destroy(python_logging->log_level_rule);
free(python_logging->pattern);
goto end;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
/* Required field. */
if (!python_logging->pattern) {
header_offset = payload->buffer.size;
DBG("Serializing python_logging event rule.");
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
pattern_len = strlen(python_logging->pattern) + 1;
bool is_equal = false;
struct lttng_event_rule_python_logging *a, *b;
- a = container_of(_a, struct lttng_event_rule_python_logging, parent);
- b = container_of(_b, struct lttng_event_rule_python_logging, parent);
+ a = lttng::utils::container_of(_a, <tng_event_rule_python_logging::parent);
+ b = lttng::utils::container_of(_b, <tng_event_rule_python_logging::parent);
/* Quick checks. */
LTTNG_ASSERT(rule);
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
status = lttng_event_rule_python_logging_get_filter(rule, &filter);
if (status == LTTNG_EVENT_RULE_STATUS_UNSET) {
struct lttng_event_rule_python_logging *python_logging;
LTTNG_ASSERT(rule);
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
return python_logging->internal_filter.filter;
}
struct lttng_event_rule_python_logging *python_logging;
LTTNG_ASSERT(rule);
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
return python_logging->internal_filter.bytecode;
}
{
unsigned long hash;
struct lttng_event_rule_python_logging *tp_rule =
- container_of(rule, typeof(*tp_rule), parent);
+ lttng::utils::container_of(rule, <tng_event_rule_python_logging::parent);
hash = hash_key_ulong((void *) LTTNG_EVENT_RULE_TYPE_PYTHON_LOGGING,
lttng_ht_seed);
enum lttng_event_rule_status status;
const struct lttng_log_level_rule *log_level_rule;
- python_logging = container_of(
- rule, const struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
local_event = zmalloc<lttng_event>();
if (!local_event) {
goto end;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
pattern_copy = strdup(pattern);
if (!pattern_copy) {
status = LTTNG_EVENT_RULE_STATUS_ERROR;
goto end;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
if (!python_logging->pattern) {
status = LTTNG_EVENT_RULE_STATUS_UNSET;
goto end;
goto end;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
expression_copy = strdup(expression);
if (!expression_copy) {
PERROR("Failed to copy filter expression");
enum lttng_event_rule_status lttng_event_rule_python_logging_get_filter(
const struct lttng_event_rule *rule, const char **expression)
{
- struct lttng_event_rule_python_logging *python_logging;
+ const struct lttng_event_rule_python_logging *python_logging;
enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
if (!rule || !IS_PYTHON_LOGGING_EVENT_RULE(rule) || !expression) {
goto end;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
if (!python_logging->filter_expression) {
status = LTTNG_EVENT_RULE_STATUS_UNSET;
goto end;
goto end;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
if (!log_level_rule_valid(log_level_rule)) {
status = LTTNG_EVENT_RULE_STATUS_INVALID;
goto end;
}
- python_logging = container_of(
- rule, struct lttng_event_rule_python_logging, parent);
+ python_logging = lttng::utils::container_of(
+ rule, <tng_event_rule_python_logging::parent);
if (python_logging->log_level_rule == NULL) {
status = LTTNG_EVENT_RULE_STATUS_UNSET;
goto end;