Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function

limbsAliasDistinct

Private Function
std.math.big.int.Managed.limbsAliasDistinct
fn limbsAliasDistinct(a: *const Managed, b: *const Managed) bool

True if two distinct Managed parameters share the same limbs buffer.

We specifically exclude the case where @intFromPtr(a) == @intFromPtr(b) (same object). When both pointers refer to the same Managed instance, ensureCapacity can reallocate the buffer (if needed) without creating dangling pointers for that object.

Params

File

math/big/int.zig:3323
3323
3324
3325
    fn limbsAliasDistinct(a: *const Managed, b: *const Managed) bool {
        return @intFromPtr(a) != @intFromPtr(b) and a.limbs.ptr == b.limbs.ptr;
    }