* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
#include <glib.h>
/** @cond PRIVATE */
-/* session.c */
-extern GSList *sessions;
-extern int max_session_id;
-
-/* decoder.c */
-extern SRD_PRIV GSList *pd_list;
+/* Python module search paths */
+SRD_PRIV GSList *searchpaths = NULL;
-/* module_sigrokdecode.c */
-extern PyMODINIT_FUNC PyInit_sigrokdecode(void);
+/* session.c */
+extern SRD_PRIV GSList *sessions;
+extern SRD_PRIV int max_session_id;
/** @endcond */
srd_session_destroy((struct srd_session *)l->data);
srd_decoder_unload_all();
- g_slist_free(pd_list);
- pd_list = NULL;
+ g_slist_free_full(searchpaths, g_free);
+ searchpaths = NULL;
/* Py_Finalize() returns void, any finalization errors are ignored. */
Py_Finalize();
PySys_SetPath(wc_new_path);
g_string_free(new_path, TRUE);
g_free(wc_new_path);
+ searchpaths = g_slist_append(searchpaths, g_strdup(path));
return SRD_OK;
}