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

Check if URL type is redefined #407

Closed
wants to merge 2 commits into from
Closed

Conversation

JakobDev
Copy link
Contributor

@JakobDev JakobDev commented Jun 3, 2022

This checks, if a URL type is used more than once. The code is based on c6e5d65. It is tested and it works. Hope I got everything right.

@ximion
Copy link
Owner

ximion commented Jun 4, 2022

This should definitely be done using a bitfield, or at the very least by using GHashTable as a set, rather than a map. But the bitfield method would be a lot nicer (and crazy efficient compared to the rather wasteful hash table).

@JakobDev
Copy link
Contributor Author

JakobDev commented Jun 7, 2022

Could you provide a example for bitfield?

@ximion
Copy link
Owner

ximion commented Jun 13, 2022

Check out https://en.wikipedia.org/wiki/Bit_field, but the linked commit that implements this is probably a lot better as a reference. AppStream has a few macros which make bitwise operations easier as well :-)

@ximion ximion closed this in ec583c1 Jun 13, 2022
@JakobDev JakobDev deleted the urldouble branch March 17, 2023 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants