extern SRD_PRIV GSList *pd_list;
/* module_sigrokdecode.c */
-/* FIXME: SRD_PRIV causes issues on MinGW. Investigate. */
extern PyMODINIT_FUNC PyInit_sigrokdecode(void);
/* type_logic.c */
g_string_free(new_path, TRUE);
g_free(wc_new_path);
-//#ifdef _WIN32
-// gchar **splitted;
-//
-// /*
-// * On Windows/MinGW, Python's sys.path needs entries of the form
-// * 'C:\\foo\\bar' instead of '/foo/bar'.
-// */
-//
-// splitted = g_strsplit(DECODERS_DIR, "/", 0);
-// path = g_build_pathv("\\\\", splitted);
-// g_strfreev(splitted);
-//#else
-// path = g_strdup(DECODERS_DIR);
-//#endif
-
return SRD_OK;
}
if (PyDict_SetItemString(py_di_options, key, py_optval) == -1)
goto err_out;
g_free(key);
+ key = NULL;
}
ret = SRD_OK;
}
/** @private */
-SRD_PRIV void *srd_pd_output_callback_find(int output_type)
+SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find(int output_type)
{
GSList *l;
- struct srd_pd_callback *pd_cb;
- void *(cb);
+ struct srd_pd_callback *tmp, *pd_cb;
- cb = NULL;
+ pd_cb = NULL;
for (l = callbacks; l; l = l->next) {
- pd_cb = l->data;
- if (pd_cb->output_type == output_type) {
- cb = pd_cb->cb;
+ tmp = l->data;
+ if (tmp->output_type == output_type) {
+ pd_cb = tmp;
break;
}
}
- return cb;
+ return pd_cb;
}
/* This is the backend function to Python sigrokdecode.add() call. */