<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ctypes_ex_compatvars(executable):
 """Returns a list of code lines for signature matching variables, and pointer saving variables. """

    result = []
    for p in executable.ordered_parameters:
        _ctypes_code_parameter(result, p, "regular")
        _ctypes_code_parameter(result, p, "saved")

    if type(executable).__name__ == "Function":
        _ctypes_code_parameter(result, executable, "regular")
        _ctypes_code_parameter(result, executable, "saved")

    return result