Skip to content

Add nullable annotations, excepting in/out

For #291 (closed)

Sorry for the delay since reporting the bug. This MR does the bare minimum of what we discussed in that issue. It adds nullable annotations to every parameter and return value I could find that mentioned "null" in its docstring but didn't have an annotation. This does not account for optional out parameters or out parameters with nullable value. I also did not add annotations to any error or cancellable parameters, per the discussion.

I have a couple questions I couldn't figure out on my own:

  • Is the return value in e_phone_number_get_country_code nullable?
  • e_book_client_view_set_fields_of_interest: is fields_of_interest nullable?
  • e_book_meta_backend_split_changes_sync: is there a way to to specify that the elements of each GSList can be null?
  • e_book_sqlite_new: is return value nullable?
  • e_cal_client_generate_instances: is the destroy_cb_data function nullable? (This applies to other function parameters. Are they marked as nullable or optional?)
  • Any of the parameters in camel_key_file_read
  • Is camel_folder_search_search:uids nullable? It appears so, but to be sure.
  • Most properties in camel-message-info.c have nullable default values, but no mention of NULL in documentation. Which are nullable, and which are not?
  • Is e_backend_set_connectable:connectable nullable or optional?
    • Same for EDBusServer::bus-name-lost:connection
  • Is e_source_goa_get_account_id return value nullable? It's not mentioned in the docstring but is returned from g_return_val_if_fail
    • Same for e_source_goa_dup_account_id, e_source_registry_ref_default_address_book, e_source_registry_ref_default_calendar, e_source_registry_ref_default_mail_account, e_webdav_session_new_request, e_webdav_discover_content_get_base_url (and potentially others)
  • I don't understand e_time_parse_date_and_time_ex:two_digit_year
Edited by Michael McClurg

Merge request reports