search for: real_default_export

Displaying 2 results from an estimated 2 matches for "real_default_export".

2020 Aug 27
0
Re: [nbdkit PATCH v2 2/8] api: Add nbdkit_add_default_export
...but with less boilerplate and more convenience (it better handles when default_export() returns NULL, and lets nbdkit cache things so a later call to default_export can reuse the cache). The intended usage is in language bindings, which can do: glue_default_export (readonly, is_tls) { if (real_default_export) return real_default_export(readonly, is_tls) else return ""; } glue_list_exports (readonly, is_tls, exports) { if (real_list_exports) return real_list_exports (readonly, is_tls, exports); else return nbdkit_add_default_export (exports); } rather than this (...
2020 Aug 27
2
Re: [nbdkit PATCH v2 2/8] api: Add nbdkit_add_default_export
On Wed, Aug 26, 2020 at 09:16:46PM -0500, Eric Blake wrote: > Rather than defaulting .list_exports to blindly returning "", it is > nicer to have it reflect the result of .default_export. Meanwhile, > language bindings will have a C callback for both .list_exports and > .default_export, even if the underlying script does not, which means > any logic in plugins.c for