Klemens Böswirth

Results 411 comments of Klemens Böswirth
trafficstars

Note: I edited the top command, since `user:/%` is not a valid escaped name. I also thought about and experimented with some alternative APIs: 1. Only allow setting key name...

> what about `keyAddName`? `keyAddName` (possibly renamed) could be moved to the new library. I think for most clients (that don't involve user interaction) `keyAddBaseName` should be good enough. The...

> we saw such a code recently in qt-gui The Qt-GUI is user-interaction, but yes I see that linking another library just for `keyAddName` might not be a good solution....

> Why would that be better? If you use `keyAddName` you do not have any hassles with memory management. It's C, you _always_ have to deal with memory management. But...

> I mean something like: Yes, in this case the memory management is hidden inside the library. Sidenote: That line will actually fail horribly, if `elektraNi_GetName` returns an invalid escaped...

> failing is also not a good option, as it would make it impossible to fix any errors In this case it is the correct option. If the file contains...

> Can you give an example how it would look like without the macro? Basically, ignore the macro and write the array casting bit yourself. I added an example [to...

> And it doesn't yield any warning/error? Is there a possibility to make a sentinel for that? AFAIK there is no way to tell the compiler to check for `NULL`...

In https://github.com/ElektraInitiative/libelektra/pull/3606#issuecomment-753629132 the idea for a `keyEmpty()` function came up. @markus2330 responded: > We can add something like this in private headers or in libease. But I do not think...

1. "empty key" is not new terminology I want to introduce. `keyEmpty()` is just a name. I'd be fine with another name like `keyNull()` as well. (Although I don't quite...