mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-04 14:20:26 +02:00
bugfix: don't dynamic link if we found a registered extension
* libguile/extensions.c (load_extension): Don't do dynamic linking if we actually did find an extension in the list.
This commit is contained in:
parent
7496b0397a
commit
1bfae3ccf7
2 changed files with 6 additions and 0 deletions
1
NEWS
1
NEWS
|
@ -11,6 +11,7 @@ Changes in 1.8.8 (since 1.8.7)
|
||||||
|
|
||||||
** Fix possible buffer overruns when parsing numbers
|
** Fix possible buffer overruns when parsing numbers
|
||||||
** Avoid clash with system setjmp/longjmp on IA64
|
** Avoid clash with system setjmp/longjmp on IA64
|
||||||
|
** Don't dynamically link an extension that is already registered
|
||||||
|
|
||||||
|
|
||||||
Changes in 1.8.7 (since 1.8.6)
|
Changes in 1.8.7 (since 1.8.6)
|
||||||
|
|
|
@ -76,6 +76,7 @@ load_extension (SCM lib, SCM init)
|
||||||
{
|
{
|
||||||
extension_t *ext;
|
extension_t *ext;
|
||||||
char *clib, *cinit;
|
char *clib, *cinit;
|
||||||
|
int found = 0;
|
||||||
|
|
||||||
scm_dynwind_begin (0);
|
scm_dynwind_begin (0);
|
||||||
|
|
||||||
|
@ -89,10 +90,14 @@ load_extension (SCM lib, SCM init)
|
||||||
&& !strcmp (ext->init, cinit))
|
&& !strcmp (ext->init, cinit))
|
||||||
{
|
{
|
||||||
ext->func (ext->data);
|
ext->func (ext->data);
|
||||||
|
found = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
scm_dynwind_end ();
|
scm_dynwind_end ();
|
||||||
|
|
||||||
|
if (found)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dynamically link the library. */
|
/* Dynamically link the library. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue