parameters: (all_structs)
docstring: Wire up recursive references for all TStruct definitions inside of each thrift_spec.
docstring_summary: Wire up recursive references for all TStruct definitions inside of each thrift_spec.
docstring_tokens: Wire up recursive references for all TStruct definitions inside of each thrift_spec .
function: def fix_spec(all_structs):
      """Wire up recursive references for all TStruct definitions inside of each thrift_spec."""
      for struc in all_structs:
          spec = struc.thrift_spec
          for thrift_spec in spec:
              if thrift_spec is None:
                  continue
              elif thrift_spec[TYPE_IDX] == TType.STRUCT:
                  other = thrift_spec[SPEC_ARGS_IDX][SPEC_ARGS_CLASS_REF_IDX].thrift_spec
                  thrift_spec[SPEC_ARGS_IDX][SPEC_ARGS_THRIFT_SPEC_IDX] = other
              elif thrift_spec[TYPE_IDX] in (TType.LIST, TType.SET):
                  _fix_list_or_set(thrift_spec[SPEC_ARGS_IDX])
              elif thrift_spec[TYPE_IDX] == TType.MAP:
                  _fix_map(thrift_spec[SPEC_ARGS_IDX])
function_tokens: def fix_spec ( all_structs ) : for struc in all_structs : spec = struc . thrift_spec for thrift_spec in spec : if thrift_spec is None : continue elif thrift_spec [ TYPE_IDX ] == TType . STRUCT : other = thrift_spec [ SPEC_ARGS_IDX ] [ SPEC_ARGS_CLASS_REF_IDX ] . thrift_spec thrift_spec [ SPEC_ARGS_IDX ] [ SPEC_ARGS_THRIFT_SPEC_IDX ] = other elif thrift_spec [ TYPE_IDX ] in ( TType . LIST , TType . SET ) : _fix_list_or_set ( thrift_spec [ SPEC_ARGS_IDX ] ) elif thrift_spec [ TYPE_IDX ] == TType . MAP : _fix_map ( thrift_spec [ SPEC_ARGS_IDX ] )