def to_c_assignment(uuid_, var):
    """Returns an array of strings, each of which contain a C statement.  The
    statements assign 'uuid_' to a "struct uuid" as defined in Open vSwitch
    lib/uuid.h."""

    hex_string = uuid_.hex
    return ["%s.parts[%d] = 0x%s;" % (var, x, hex_string[x * 8:(x + 1) * 8])
            for x in range(4)]