Skip to content

Conversation

@Krastanov
Copy link
Member

No description provided.

@Krastanov
Copy link
Member Author

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 5.29%. Comparing base (50dc68e) to head (769c417).

Additional details and impacted files
@@            Coverage Diff            @@
##           master     #28      +/-   ##
=========================================
- Coverage    6.47%   5.29%   -1.19%     
=========================================
  Files           8       8              
  Lines        4342    4310      -32     
=========================================
- Hits          281     228      -53     
- Misses       4061    4082      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@subbarayudu8660
Copy link

_ No description provided. _

struct igraph_eit_t
type::igraph_eit_type_t
pos::igraph_int_t
start::igraph_int_t
_end::igraph_int_t
vec::Ptr{igraph_vector_int_t}
end

this is immutable right
so i dont think macros can work on it

@Krastanov
Copy link
Member Author

You can use backtics ``` to format your code in comments to make it easier to understand.

I am not sure what you mean by "macros can not work on it". Julia and C macros just transform syntax, nothing more. So if you have symbol in your code corresponding to something, macros can be applied to that symbol to modify it into a different expression (before the compiler touches these expressions).

Maybe you are referring that Julia immutable objects are stack allocated so you do not really have a pointer that you can provide to a C function that is meant to act on them. That is true, and it might indeed cause you trouble. But the C macros we were discussing had to be translated manually to julia functions anyway, so that should not be a problem. The julia code can do whatever it wants to Julia structures, mutable or not.

If you have questions, could you provide a bigger, more complete snippet of code describing what you have tried.

@subbarayudu8660
Copy link

    quote
        $eit[].pos >= $eit[].end
    end
end

macro IGRAPH_EIT_NEXT(eit)
    quote
        $eit[].pos += 1
    end
end

macro IGRAPH_EIT_GET(eit)
    quote
        if $eit[].type == LibIGraph.IGRAPH_EIT_RANGE
            $eit[].pos
        else
            unsafe_load($eit[].vec.stor_begin, $eit[].pos + 1)
        end
    end
end```
this is what ive tried

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants