lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Introducing basic_free_stack_if_not_null

Open anutosh491 opened this issue 10 months ago • 2 comments

Addressing https://github.com/lcompilers/lpython/issues/2614#issuecomment-2035025925

We have been using the basic_free_stack out of symengine's C wrapper untill now. But before freeing out variables we need to check if they have been stack allocated previously. Hence this PR aims to replace every basic_free_stack call with

    if (var != NULL) {
        basic_free_stack(var);
    }

anutosh491 avatar Apr 06 '24 08:04 anutosh491

I tried approach 1 & 2 as mentioned here (https://github.com/lcompilers/lpython/issues/2614#issuecomment-2009981787) but haven't been able to address the example in consideration fully. cc @Thirumalai-Shaktivel could you try helping me out here ?

anutosh491 avatar Apr 08 '24 06:04 anutosh491

@anutosh491 what is the status here --- can you describe what the problem is?

Are you trying to address this comment: https://github.com/lcompilers/lpython/issues/2614#issuecomment-2035025925 ?

certik avatar Apr 29 '24 19:04 certik