Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters with filename tag must be declared as Path | String #136

Open
hugopl opened this issue Nov 23, 2023 · 0 comments
Open

Parameters with filename tag must be declared as Path | String #136

hugopl opened this issue Nov 23, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@hugopl
Copy link
Owner

hugopl commented Nov 23, 2023

Current generated code for Gio::File#new_for_path is:

def self.new_for_path(path : ::String) : Gio::File
  # g_file_new_for_path: (None)
  # @path:
  # Returns: (transfer full)

  # C call
  _retval = LibGio.g_file_new_for_path(path)

  # Return value handling
  Gio::AbstractFile.new(_retval, GICrystal::Transfer::Full)
end

But it must be:

def self.new_for_path(path : ::String | ::Path) : Gio::File
  # g_file_new_for_path: (None)
  # @path:
  # Returns: (transfer full)

  path = path.to_s

  # C call
  _retval = LibGio.g_file_new_for_path(path)

  # Return value handling
  Gio::AbstractFile.new(_retval, GICrystal::Transfer::Full)
end

Return values with filename tag must remains as Path only.

@hugopl hugopl added bug Something isn't working good first issue Good for newcomers labels Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant