+
+ parent_def_scope = NULL;
+ if (stream->packet_context_decl) {
+ stream->packet_context =
+ stream->packet_context_decl->definition_new(stream->packet_context_decl,
+ parent_def_scope, 0, 0);
+ set_dynamic_definition_scope(&stream->packet_context->p,
+ stream->packet_context->scope,
+ "stream.packet.context");
+ parent_def_scope = stream->packet_context->scope;
+ declaration_unref(stream->packet_context_decl);
+ }
+ if (stream->event_header_decl) {
+ stream->event_header =
+ stream->event_header_decl->definition_new(stream->event_header_decl,
+ parent_def_scope, 0, 0);
+ set_dynamic_definition_scope(&stream->event_header->p,
+ stream->event_header->scope,
+ "stream.event.header");
+ parent_def_scope = stream->event_header->scope;
+ declaration_unref(stream->event_header_decl);
+ }
+ if (stream->event_context_decl) {
+ stream->event_context =
+ stream->event_context_decl->definition_new(stream->event_context_decl,
+ parent_def_scope, 0, 0);
+ set_dynamic_definition_scope(&stream->event_context->p,
+ stream->event_context->scope,
+ "stream.event.context");
+ parent_def_scope = stream->event_context->scope;
+ declaration_unref(stream->event_context_decl);
+ }
+ stream->definition_scope = parent_def_scope;
+