parameters: (apiversion, codegen_dir)
docstring: Emits a MismacthCAPIWarning if the C API version needs updating.
docstring_summary: Emits a MismacthCAPIWarning if the C API version needs updating.
docstring_tokens: Emits a MismacthCAPIWarning if the C API version needs updating .
function: def check_api_version(apiversion, codegen_dir):
      """Emits a MismacthCAPIWarning if the C API version needs updating."""
      curapi_hash, api_hash = get_api_versions(apiversion, codegen_dir)
  
      # If different hash, it means that the api .txt files in
      # codegen_dir have been updated without the API version being
      # updated. Any modification in those .txt files should be reflected
      # in the api and eventually abi versions.
      # To compute the checksum of the current API, use
      # code_generators/cversions.py script
      if not curapi_hash == api_hash:
          msg = "API mismatch detected, the C API version " \
                "numbers have to be updated. Current C api version is %d, " \
                "with checksum %s, but recorded checksum for C API version %d in " \
                "codegen_dir/cversions.txt is %s. If functions were added in the " \
                "C API, you have to update C_API_VERSION  in %s."
          warnings.warn(msg % (apiversion, curapi_hash, apiversion, api_hash,
                               __file__),
                        MismatchCAPIWarning)
function_tokens: def check_api_version ( apiversion , codegen_dir ) : curapi_hash , api_hash = get_api_versions ( apiversion , codegen_dir ) # If different hash, it means that the api .txt files in # codegen_dir have been updated without the API version being # updated. Any modification in those .txt files should be reflected # in the api and eventually abi versions. # To compute the checksum of the current API, use # code_generators/cversions.py script if not curapi_hash == api_hash : msg = "API mismatch detected, the C API version " "numbers have to be updated. Current C api version is %d, " "with checksum %s, but recorded checksum for C API version %d in " "codegen_dir/cversions.txt is %s. If functions were added in the " "C API, you have to update C_API_VERSION  in %s." warnings . warn ( msg % ( apiversion , curapi_hash , apiversion , api_hash , __file__ ) , MismatchCAPIWarning )