lpython
lpython copied to clipboard
Fix logical comparsion for string
Fixes #2615
The problem is that _lpython_str_compare_eq
requires pointer to pointer to char as parameters. However, the previous implementation passed a null pointer, leading to a segmentation fault.
Thanks for this @hankluo6! The PR looks good! :+1:
Thank you @anutosh491! I raised an issue #2708 for this.
Could you maybe add a TODO here saying that we can add the C backend once the above issue you raised has been fixed ? https://github.com/lcompilers/lpython/blob/fbbdbdd83e866a4ebbb7a5541bd7989be60c5fe1/integration_tests/CMakeLists.txt#L768-L769
I guess that would be sufficient enough to merge this !