parameters: (self, short_field, short_size)
docstring: Short size depends on both endianness and a compile-time define.
docstring_summary: Short size depends on both endianness and a compile-time define.
docstring_tokens: Short size depends on both endianness and a compile - time define .
function: def _get_short_size(self, short_field, short_size):
          """Short size depends on both endianness and a compile-time define."""
  
          # If the padding field is present after all this indirection, then string
          # was compiled with _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT defined.
          field = short_field.type.fields()[1].type.fields()[0]
          libcpp_abi_alternate_string_layout = field.name and "__padding" in field.name
  
          # This logical structure closely follows the original code (which is clearer
          # in C++).  Keep them parallel to make them easier to compare.
          if libcpp_abi_alternate_string_layout:
              if _libcpp_big_endian:
                  return short_size >> 1
              else:
                  return short_size
          elif _libcpp_big_endian:
              return short_size
          else:
              return short_size >> 1
function_tokens: def _get_short_size ( self , short_field , short_size ) : # If the padding field is present after all this indirection, then string # was compiled with _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT defined. field = short_field . type . fields ( ) [ 1 ] . type . fields ( ) [ 0 ] libcpp_abi_alternate_string_layout = field . name and "__padding" in field . name # This logical structure closely follows the original code (which is clearer # in C++).  Keep them parallel to make them easier to compare. if libcpp_abi_alternate_string_layout : if _libcpp_big_endian : return short_size >> 1 else : return short_size elif _libcpp_big_endian : return short_size else : return short_size >> 1