kernel: replace more C string manipulation by GAP string objects #4675
Labels
kind: enhancement
Label for issues suggesting enhancements; and for pull requests implementing enhancements
topic: kernel
Right now, the kernel still does quite a bit of mucking around with C strings, using strlcpy, strlcat, etc. -- a big part of that is for dealing with GAP roots, in
src/sysroots.c
. This cold could be made considerably easier (and safer) if it used GAP string and list objects for this.However, we have a chicken-and-egg problem here: to use objects, the GAP memory manager needs to be initialized. But that requires us to have parsed command line arguments (CLAs). But the code parsing the CLAs in particular adds new sysroots...
To break this, I propose that we simply parse the CLAs twice: the first time around, we only look for options affecting the memory manager; then we set up the memory manager; and now parse the CLAs a second time, this time ignoring the complement of what was ignored before, i.e., only those for the memory manager.
The text was updated successfully, but these errors were encountered: