-
Notifications
You must be signed in to change notification settings - Fork 160
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
Refactor Python loader code #94
Comments
Respect to the second point, I have used C89 mostly because I was wondering MetaCall may work with cases like COBOL migrations. For very old computers, maybe this standard may be needed. I don't know if this restriction does pay off. I think it is too restrictive and makes the code much more uglier. Most runtimes won't work anyway with that kind of old computers so it does not make sense to continue like that. In the first point you are right, I have avoided This happens in the whole codebase. If you start refactoring the Python Loader, it can be a great advance. Later on we can start moving to the Core. Respect to the commit you listed, yes, that's the proper way of doing it, feel free to refactor. The only thing I request to you is to validate that all tests work and pass AddressSanitizer and Valgrind to verify you do not create new memory leaks, specially in fail-path tests. We just have added new PR and Issue templates, and also you can check here how to enable Asan and Valgrind for testing: https://github.com/metacall/core/blob/develop/docs/README.md#63-debugging |
Great! I'll get started on the refactor. |
@Encrylize Are you going to continue with this or can I close the issue? |
@viferga Let's just close it for now. :) |
I am currently reading through the code for the Python loader and have found a few recurring patterns that I believe could be improved:
goto
to localize the cleanup code (see this link for an example).If you agree with these observations, I will start working on implementing them in the codebase. Please see this commit for an example of how these changes might be implemented.
The text was updated successfully, but these errors were encountered: