Skip to content

Commit 1a41642

Browse files
committed
Fix part of #1128 by adding a way to retrieve PD search paths
As this uses g_slist_copy_deep(), we now require glib 2.34.
1 parent 8111675 commit 1a41642

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

README

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Requirements
3434
- automake >= 1.11 (only needed when building from git)
3535
- libtool (only needed when building from git)
3636
- pkg-config >= 0.22
37-
- libglib >= 2.28.0
37+
- libglib >= 2.34
3838
- Python >= 3.2
3939
- check >= 0.9.4 (optional, only needed to run unit tests)
4040
- doxygen (optional, only needed for the C API docs)

configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ AC_SUBST([SRD_PKGLIBS])
137137

138138
# Retrieve the compile and link flags for all modules combined.
139139
# Also, bail out at this point if any module dependency is not met.
140-
PKG_CHECK_MODULES([LIBSIGROKDECODE], [glib-2.0 >= 2.28.0 $SRD_PKGLIBS])
140+
PKG_CHECK_MODULES([LIBSIGROKDECODE], [glib-2.0 >= 2.34 $SRD_PKGLIBS])
141141
PKG_CHECK_MODULES([TESTS], [$SRD_PKGLIBS_TESTS glib-2.0 $SRD_PKGLIBS])
142142

143143
srd_glib_version=`$PKG_CONFIG --modversion glib-2.0 2>&AS_MESSAGE_LOG_FD`
@@ -168,7 +168,7 @@ Compile configuration:
168168
- Linker flags.................... $LDFLAGS
169169

170170
Detected libraries (required):
171-
- glib-2.0 >= 2.28.0.............. $srd_glib_version
171+
- glib-2.0 >= 2.34................ $srd_glib_version
172172
$srd_pkglibs_summary
173173
Detected libraries (optional):
174174
$srd_pkglibs_opt_summary

libsigrokdecode.h

+1
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ struct srd_pd_callback {
320320
/* srd.c */
321321
SRD_API int srd_init(const char *path);
322322
SRD_API int srd_exit(void);
323+
SRD_API GSList *srd_searchpaths_get(void);
323324

324325
/* session.c */
325326
SRD_API int srd_session_new(struct srd_session **sess);

srd.c

+5
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ static int print_searchpaths(void)
179179
return SRD_ERR_PYTHON;
180180
}
181181

182+
SRD_API GSList *srd_searchpaths_get(void)
183+
{
184+
return g_slist_copy_deep(searchpaths, (GCopyFunc)g_strdup, NULL);
185+
}
186+
182187
/**
183188
* Initialize libsigrokdecode.
184189
*

0 commit comments

Comments
 (0)