-%{
-static PyObject *bt_py3_plugin_ptrs_list_from_bt_plugins(struct bt_plugin **plugins)
-{
- PyObject *py_plugin_ptrs = NULL;
- struct bt_plugin **plugin_at;
-
- if (!plugins) {
- goto error;
- }
-
- py_plugin_ptrs = PyList_New(0);
- if (!py_plugin_ptrs) {
- goto error;
- }
-
- plugin_at = plugins;
-
- while (*plugin_at) {
- struct bt_plugin *plugin = *plugin_at;
- PyObject *py_plugin_ptr;
- int ret;
-
- py_plugin_ptr = SWIG_NewPointerObj(SWIG_as_voidptr(plugin),
- SWIGTYPE_p_bt_plugin, 0);
- if (!py_plugin_ptr) {
- goto error;
- }
-
- ret = PyList_Append(py_plugin_ptrs, py_plugin_ptr);
- Py_DECREF(py_plugin_ptr);
- if (ret < 0) {
- goto error;
- }
-
- plugin_at++;
- }
-
- goto end;
-
-error:
- Py_XDECREF(py_plugin_ptrs);
- py_plugin_ptrs = Py_None;
- Py_INCREF(py_plugin_ptrs);
-
- if (plugins) {
- /*
- * Put existing plugin references since they are not
- * moved to the caller.
- */
- plugin_at = plugins;
-
- while (*plugin_at) {
- bt_put(*plugin_at);
- plugin_at++;
- }
- }
-
-end:
- PyErr_Clear();
- free(plugins);
- return py_plugin_ptrs;
-}
-
-static PyObject *bt_py3_plugin_create_all_from_file(const char *path)
-{
- return bt_py3_plugin_ptrs_list_from_bt_plugins(
- bt_plugin_create_all_from_file(path));
-}
-
-static PyObject *bt_py3_plugin_create_all_from_dir(const char *path,
- bool recurse)
-{
- return bt_py3_plugin_ptrs_list_from_bt_plugins(
- bt_plugin_create_all_from_dir(path, recurse));
-}
-%}
-
-PyObject *bt_py3_plugin_create_all_from_file(const char *path);
-PyObject *bt_py3_plugin_create_all_from_dir(const char *path,
- bool recurse);
+/* Plugin set functions */
+int64_t bt_plugin_set_get_plugin_count(struct bt_plugin_set *plugin_set);
+struct bt_plugin *bt_plugin_set_get_plugin(struct bt_plugin_set *plugin_set,
+ uint64_t index);