Libelektra: keyVInit issues

Created on 12 May 2016  路  2Comments  路  Source: ElektraInitiative/libelektra

@mpranj will do an optimization that a keyNew does not have multiple allocations, but only one which creates one block that includes struct+name+string.

With the current keyVInit API (which already takes an allocated Key) we would need to process the vaargs twice, which is troublesome for some architectures.

Another solution would be that keyVInit also returns a key and does the allocation itself when a null pointer is passed.

@manuelm This would support both use cases well, wouldn't it?
It might break the ABI between your bindings and libelektra, though.

question

Most helpful comment

Implement it and see if it breaks. If it breaks, fix it. There's nothing to ask me for.

All 2 comments

Implement it and see if it breaks. If it breaks, fix it. There's nothing to ask me for.

I hoped we could avoid a break+fix cycle. You investigated some time in keyVInit and I hoped you have some solution which will work for your bindings but allow to pass externally allocated memory.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markus2330 picture markus2330  路  3Comments

e1528532 picture e1528532  路  4Comments

mpranj picture mpranj  路  3Comments

sanssecours picture sanssecours  路  4Comments

sanssecours picture sanssecours  路  3Comments