summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-05-03 23:56:50 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2014-05-03 23:56:50 +0200
commitf6527cc4f7625eb5283eee5392312ad5df70e0f3 (patch)
tree3818e4732447d3cbeb6e1696144732a84896e130
parent2060510aaafcc7eb27fac071334b4f8aa1f3cab2 (diff)
downloadlibsigrokdecode-f6527cc4f7625eb5283eee5392312ad5df70e0f3.tar.gz
libsigrokdecode-f6527cc4f7625eb5283eee5392312ad5df70e0f3.zip
Move srd_check_init() to decoder.c and make it static.
The function srd_check_init() is only used in decoder.c.
-rw-r--r--decoder.c10
-rw-r--r--libsigrokdecode-internal.h1
-rw-r--r--srd.c10
3 files changed, 10 insertions, 11 deletions
diff --git a/decoder.c b/decoder.c
index 4b32638..79ba8ef 100644
--- a/decoder.c
+++ b/decoder.c
@@ -47,12 +47,22 @@ extern GSList *searchpaths;
/* session.c */
extern GSList *sessions;
+extern int max_session_id;
/* module_sigrokdecode.c */
extern SRD_PRIV PyObject *mod_sigrokdecode;
/** @endcond */
+static gboolean srd_check_init(void)
+{
+ if (max_session_id < 0) {
+ srd_err("Library is not initialized.");
+ return FALSE;
+ } else
+ return TRUE;
+}
+
/**
* Returns the list of supported/loaded protocol decoders.
*
diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h
index 1fe19ca..f386cd7 100644
--- a/libsigrokdecode-internal.h
+++ b/libsigrokdecode-internal.h
@@ -37,7 +37,6 @@ struct srd_session {
/* srd.c */
SRD_PRIV int srd_decoder_searchpath_add(const char *path);
-SRD_PRIV gboolean srd_check_init(void);
/* session.c */
SRD_PRIV int session_is_valid(struct srd_session *sess);
diff --git a/srd.c b/srd.c
index 9d04a8e..61280ef 100644
--- a/srd.c
+++ b/srd.c
@@ -261,14 +261,4 @@ SRD_PRIV int srd_decoder_searchpath_add(const char *path)
return SRD_OK;
}
-/** @private */
-SRD_PRIV gboolean srd_check_init(void)
-{
- if (max_session_id < 0) {
- srd_err("Library is not initialized.");
- return FALSE;
- } else
- return TRUE;
-}
-
/** @} */