ppapi/generate_ppapi_size_checks.py
def WriteArchSpecificCode(types, root, filename):
  """Write a header file that contains a compile-time assertion for the size of
     each of the given typeinfos, in to a file named filename rooted at root.
  """
  assertion_lines = [ToAssertionCode(typeinfo) for typeinfo in types]
  assertion_lines.sort()
  outfile = open(os.path.join(root, filename), "w")
  header_guard = "PPAPI_TESTS_" + filename.upper().replace(".", "_") + "_"
  outfile.write(COPYRIGHT_STRING_C)
  outfile.write('#ifndef ' + header_guard + '\n')
  outfile.write('#define ' + header_guard + '\n\n')
  outfile.write('#include "ppapi/tests/test_struct_sizes.c"\n\n')
  for line in assertion_lines:
    outfile.write(line)
  outfile.write('\n#endif  /* ' + header_guard + ' */\n')
Write a header file that contains a compile-time assertion for the size of
     each of the given typeinfos, in to a file named filename rooted at root.
  
Write a header file that contains a compile-time assertion for the size of
each of the given typeinfos, in to a file named filename rooted at root.
Write a header file that contains a compile - time assertion for the size of each of the given typeinfos in to a file named filename rooted at root .
def WriteArchSpecificCode(types, root, filename):
  assertion_lines = [ToAssertionCode(typeinfo) for typeinfo in types]
  assertion_lines.sort()
  outfile = open(os.path.join(root, filename), "w")
  header_guard = "PPAPI_TESTS_" + filename.upper().replace(".", "_") + "_"
  outfile.write(COPYRIGHT_STRING_C)
  outfile.write('#ifndef ' + header_guard + '\n')
  outfile.write('#define ' + header_guard + '\n\n')
  outfile.write('#include "ppapi/tests/test_struct_sizes.c"\n\n')
  for line in assertion_lines:
    outfile.write(line)
  outfile.write('\n#endif  /* ' + header_guard + ' */\n')
def WriteArchSpecificCode ( types , root , filename ) : assertion_lines = [ ToAssertionCode ( typeinfo ) for typeinfo in types ] assertion_lines . sort ( ) outfile = open ( os . path . join ( root , filename ) , "w" ) header_guard = "PPAPI_TESTS_" + filename . upper ( ) . replace ( "." , "_" ) + "_" outfile . write ( COPYRIGHT_STRING_C ) outfile . write ( '#ifndef ' + header_guard + '\n' ) outfile . write ( '#define ' + header_guard + '\n\n' ) outfile . write ( '#include "ppapi/tests/test_struct_sizes.c"\n\n' ) for line in assertion_lines : outfile . write ( line ) outfile . write ( '\n#endif  /* ' + header_guard + ' */\n' )
Write a header file that contains a compile-time assertion for the size of
each of the given typeinfos, in to a file named filename rooted at root.
Write a header file that contains a compile - time assertion for the size of each of the given typeinfos in to a file named filename rooted at root .
"""Write a header file that contains a compile-time assertion for the size of
     each of the given typeinfos, in to a file named filename rooted at root.
  """
types
root
filename