-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Adding hashmap and map initialization functions with data #1402
Conversation
Can we do the following changes:
|
I'm running into a bit of a strange issue when I rename the functions, in the form of some kind of name clash. When I rename
If I temporarily change either I can replicate this in this manner:
foo.c3
bar.c3
Result is
If I remove the generic part of
I realize this could very well deserve a bug report and I can certainly file one with the small test case. |
Do you need to have those in different files, or can you reproduce it with module sections, so basically pasting everything in a single file one after the other? |
Single file seems to reproduce it as well.
|
If I remove the generic aspect it works for the single file version (and that behavior is the same for the multi file version).
|
Please try it now, it ought to work. |
Good news/bad news. Good news, the changes to c3c makes the single-file sample code work (like your added test case). Follow-up to this. Is it desirable that a macro can shadow a function with the same name? Bad news, I was looking at too many functions at a time, and mistook my first problem to be between a
The desired call would be to print What had intended to ask in my first comment showing the original problem was whether the |
I thought right, but just had a total brain meltdown when I made the "solution". |
It's fixed now from what I can tell, and I also fixed another issue as well. |
It works successfully now for the real case and my test case to narrow down the issue. However, I'm unhappy with how my updated commit happened here which pulled in your changes and makes it look like I added a bunch more when most of it are your changes. :( Let me know if you want me to redo something. |
You could rebase on origin-master and use squash on all your changes, then force push that to you map-init- branch. That should remove all duplicate changes. This is my method when I run into something and it's turned out to be very simple and safe. |
68b1ee8
to
2e09754
Compare
I have hopefully fixed up the branch now. I see some build errors in CI, but I don't think it's related. Some CMake issue with finding curl stuff. |
I have a lot to learn still about the language.
Should I therefore make one more change to the names of my macros that takes keys and values using Sorry again for the need to clean up the branch with squash |
Thank you! |
Adding some functions to initialize HashMap and Map structures with data.