(context, builder)
return meminfo, meminfo_data_ptr
Creates meminfo and sets dtor.
Creates meminfo and sets dtor.
Creates meminfo and sets dtor .
def construct_string_array(context, builder):
    """Creates meminfo and sets dtor.
    """
    alloc_type = context.get_data_type(str_arr_payload_type)
    alloc_size = context.get_abi_sizeof(alloc_type)

    llvoidptr = context.get_value_type(types.voidptr)
    llsize = context.get_value_type(types.uintp)
    dtor_ftype = lir.FunctionType(lir.VoidType(),
                                  [llvoidptr, llsize, llvoidptr])
    dtor_fn = cgutils.get_or_insert_function(builder.module,
        dtor_ftype, name="dtor_string_array")

    meminfo = context.nrt.meminfo_alloc_dtor(
        builder,
        context.get_constant(types.uintp, alloc_size),
        dtor_fn,
    )
    meminfo_data_ptr = context.nrt.meminfo_data(builder, meminfo)
    meminfo_data_ptr = builder.bitcast(meminfo_data_ptr,
                                       alloc_type.as_pointer())

    # Nullify all data
    # builder.store( cgutils.get_null_value(alloc_type),
    #             meminfo_data_ptr)
    return meminfo, meminfo_data_ptr
def construct_string_array ( context , builder ) : alloc_type = context . get_data_type ( str_arr_payload_type ) alloc_size = context . get_abi_sizeof ( alloc_type ) llvoidptr = context . get_value_type ( types . voidptr ) llsize = context . get_value_type ( types . uintp ) dtor_ftype = lir . FunctionType ( lir . VoidType ( ) , [ llvoidptr , llsize , llvoidptr ] ) dtor_fn = cgutils . get_or_insert_function ( builder . module , dtor_ftype , name = "dtor_string_array" ) meminfo = context . nrt . meminfo_alloc_dtor ( builder , context . get_constant ( types . uintp , alloc_size ) , dtor_fn , ) meminfo_data_ptr = context . nrt . meminfo_data ( builder , meminfo ) meminfo_data_ptr = builder . bitcast ( meminfo_data_ptr , alloc_type . as_pointer ( ) ) # Nullify all data # builder.store( cgutils.get_null_value(alloc_type), #             meminfo_data_ptr) return meminfo , meminfo_data_ptr