Skip to content

Cleanup source_t codebase & fix usage #193

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

ChAoSUnItY
Copy link
Collaborator

@ChAoSUnItY ChAoSUnItY commented Apr 27, 2025

Previously SOURCE is overhauled with a dynamic array implementation, but parser.c and inliner.c didn't actually benefited from it, and could still cause overflow if size exceeds capacity.

In this patch, now extending source_t respects computed result size and expands if need. inliner.c's implementation is now also replaced with dynamic array implementation.

Additionally, few functions are renamed to keep function naming convention.

Summary by Bito

This pull request enhances the `source_t` structure by implementing a dynamic array for better memory management and preventing overflow issues. It also renames several functions for consistency, improving code clarity and maintainability across `parser.c` and `inliner.c`.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 2 - The changes are straightforward and primarily involve structural improvements and renaming, making the review process relatively simple.

Previously SOURCE is overhauled with a dynamic array implementation,
but parser.c and inliner.c didn't actually benefited from it, and
could still cause overflow if size exceeds capacity.

In this patch, now extending source_t respects computed result size
and expands if need. inliner.c's implementation is now also replaced
with dynamic array implementation.

Additionally, few functions are renamed to keep function naming
convention.
@jserv jserv merged commit 793531c into sysprog21:master Apr 28, 2025
6 checks passed
@jserv
Copy link
Collaborator

jserv commented Apr 28, 2025

Thank @ChAoSUnItY for contributing!

@ChAoSUnItY ChAoSUnItY deleted the fix/source_ext branch April 28, 2025 17:21
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.

3 participants