@lower_setattr_generic(types.Record)
def record_setattr(context, builder, sig, args, attr):
 (typ, valty) = sig.args
 (target, val) = args
 context.sentry_record_alignment(typ, attr)
 offset = typ.offset(attr)
 elemty = typ.typeof(attr)
 dptr = cgutils.get_record_member(builder, target, offset, context.get_data_type(elemty))
 val = context.cast(builder, val, valty, elemty)
 align = (None if typ.aligned else 1)
 context.pack_value(builder, elemty, val, dptr, align=align)

@ lower_setattr_generic ( types . Record ) def record_setattr ( context , builder , sig , args , attr ) : ( typ , valty ) = sig . args ( target , val ) = args context . sentry_record_alignment ( typ , attr ) offset = typ . offset ( attr ) elemty = typ . typeof ( attr ) dptr = cgutils . get_record_member ( builder , target , offset , context . get_data_type ( elemty ) ) val = context . cast ( builder , val , valty , elemty ) align = ( None if typ . aligned else 1 ) context . pack_value ( builder , elemty , val , dptr , align = align )
generic setattr() implementation for records: set the given record member .