Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better way to convert between Python dicts and nvlists (in and out) #7

Open
avg-I opened this issue Aug 6, 2015 · 0 comments
Open

Comments

@avg-I
Copy link
Contributor

avg-I commented Aug 6, 2015

Currently a programmer has to use nvlist_in and nvlist_out that introduce Python objects corresponding to C nvlist_t objects (or placeholders) to a local namespace.
It would be better to use a proxy object that would transparently convert the Python dict arguments as
necessary that invoke a proper C function (via cffi) passing appropriate nvlist_t * and nvlist_t ** arguments to it. cffi provides necessary introspection tools to find out which arguments need translation.
An example of this idea could be seen here: ac179a2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant