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

Add primitive type to struct when installing #50

Merged
merged 2 commits into from
Feb 10, 2025
Merged

Conversation

beardhatcode
Copy link
Contributor

The types of the primitives seem not to be stored by the install macro. This PR fixes that.

@beardhatcode beardhatcode requested a review from tolauwae April 14, 2022 14:05
@tolauwae
Copy link
Member

Strangely, the Types are all still zero initialized when resolving the primitives. Same situation in the install_primitive macro.

bool resolve_primitive(char *symbol, Primitive *val) {
debug("Resolve primitives (%d) for %s \n", ALL_PRIMITIVES, symbol);
for (auto &primitive : primitives) {
// printf("Checking %s = %s \n", symbol, primitive.name);
if (!strcmp(symbol, primitive.name)) {
debug("FOUND PRIMITIVE\n");
*val = primitive.f;
return true;
}
}
FATAL("Could not find primitive %s \n", symbol);
return false;
}

@tolauwae tolauwae changed the base branch from master to main October 19, 2022 09:04
@tolauwae tolauwae force-pushed the main branch 2 times, most recently from 29000c0 to adee735 Compare July 4, 2023 11:40
@tolauwae tolauwae added the on hold Awaiting analysis on how to proceed label Aug 11, 2023
@tolauwae tolauwae force-pushed the main branch 2 times, most recently from 1996698 to 5d87aad Compare September 3, 2024 12:15
@tolauwae tolauwae force-pushed the fix/primitive-types branch from e148919 to b653eb9 Compare February 10, 2025 06:53
@tolauwae tolauwae removed the on hold Awaiting analysis on how to proceed label Feb 10, 2025
Copy link
Member

@tolauwae tolauwae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of a primitive had to be a pointer. The assignment is fixed now.

@tolauwae tolauwae merged commit fbff3da into main Feb 10, 2025
19 checks passed
@tolauwae tolauwae deleted the fix/primitive-types branch February 10, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants