Closed hrszpuk closed 10 months ago
Jesus christ what have I woken up to
Okay so the rawptr implementation worked but now any kind of manual memory management causes a segfault...
I've done goofed scoob
(refactoring the messy code, fixed the segfaults 😌)
Note to self...
Had issues with CommandLineFlagData.value resetting to 0 after the parse function has ended. I expected the value to remain 100 but alas, after many hours of debugging, I give up.
Work around: Instead of storing .value as
any
I used arawptr
and did some pointer magic to get integers working. The same work around should work for other data types too.Work around ##2: If that doesn't work out then I also found storing the value as it's basic type with some kind of composition and multiple CommandLineFlagData structs to be undesirable but functional.