Add static extensions before those in modules

Make sure we add static extensions before anything in a module.  This is
more or less a no-op at the moment, but will come in handy later when
extension dependency sorting is removed.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Daniel Stone 2012-07-10 02:03:19 +01:00 • committed by Keith Packard
commit 2fba9445a0
3 changed files with 29 additions and 11 deletions

View file

@ -180,6 +180,11 @@ typedef struct {
extern _X_EXPORT ExtensionModule *ExtensionModuleList;
/* This really shouldn't be here, but gets moved in about three commits'
* time. So odds are the only people who ever see this comment are doing
* patch review, in which case, thanks! */
extern _X_EXPORT void AddStaticExtensions(void);
/* Prototypes for Loader functions that are exported to modules */
extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **,
const char **, pointer,

View file

@ -49,6 +49,10 @@ NewExtensionModule(void)
ExtensionModule *save = ExtensionModuleList;
int n;
/* Make sure built-in extensions get added to the list before those
* in modules. */
AddStaticExtensions();
/* Sanity check */
if (!ExtensionModuleList)
numExtensionModules = 0;