Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | myaddr: fix newSeqUninit polyfill | bptato | 2025-05-01 | 1 | -1/+1 |
| | | | | | | Sometimes it's called with an unsigned len. ref. https://todo.sr.ht/~bptato/chawan/59 | ||||
* | myaddr: backport & switch to newSeqUninit | bptato | 2025-04-30 | 1 | -9/+14 |
| | |||||
* | nanosvg, myaddr: fix obuf type and myaddr shim | bptato | 2024-12-20 | 1 | -2/+2 |
| | | | | | | | this is exactly why I shimmed in unsafeAddr, but the compiler isn't cooperating... :( well, it seems to work with auto. | ||||
* | utils: polyfill addr/unsafeAddr distinction in Nim 2+ | bptato | 2024-04-14 | 1 | -0/+18 |
I wish they didn't change this. unsafeAddr may be a confusing name, but it's more powerful than addr. Merging them violates the principle of least power. e.g. say I get n thru a param, and shadow it proc x(n: int) = var n = n + 1 a screen or two later I call mutates_variable_in_c(addr i) then later I no longer need to add 1, so I remove the var line. In Nim 1.6 the compiler refuses to compile, I can instantly find the bug. In 2.0 it does... whatever?? Maybe for an int it "works", for an object it likely doesn't. Certainly not something I'd enjoy debugging. |