diff options
author | Adam Jackson <ajax@redhat.com> | 2008-02-01 17:21:34 +1100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-02-14 08:21:44 +1100 |
commit | e91ff09568c5579818b6641e88e95c6fe122cbe7 (patch) | |
tree | 86c27ab6eb83c9c2c67f55037f0afe3a5797c117 /hw/xfree86/common | |
parent | 0bdd20a0454c94f902fd4874855125bf7510fcf5 (diff) |
Friends don't let friends call xf86AddModuleInfo.
That code only existed to leak memory. It can go now, thanks.
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r-- | hw/xfree86/common/xf86.h | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Globals.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Helper.c | 24 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Priv.h | 3 | ||||
-rw-r--r-- | hw/xfree86/common/xf86str.h | 2 |
5 files changed, 5 insertions, 30 deletions
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 4e7d914bf..4b3e10463 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -337,8 +337,8 @@ int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, pointer value); Bool xf86IsUnblank(int mode); -void xf86AddModuleInfo(ModuleInfoPtr info, pointer module); -void xf86DeleteModuleInfo(int idx); +_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); +_X_DEPRECATED void xf86DeleteModuleInfo(int idx); void xf86getsecs(long *, long *); /* xf86Debug.c */ diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index ba603f4df..0dc42c66b 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -153,8 +153,6 @@ DriverPtr *xf86DriverList = NULL; int xf86NumDrivers = 0; InputDriverPtr *xf86InputDriverList = NULL; int xf86NumInputDrivers = 0; -ModuleInfoPtr *xf86ModuleInfoList = NULL; -int xf86NumModuleInfos = 0; int xf86NumScreens = 0; const char *xf86VisualNames[] = { diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index ec524e63c..8978f8206 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -170,37 +170,17 @@ xf86LookupInput(const char *name) return NULL; } +/* ABI stubs of despair */ _X_EXPORT void -xf86AddModuleInfo(ModuleInfoPtr info, pointer module) +xf86AddModuleInfo(pointer info, pointer module) { - /* Don't add null entries */ - if (!module) - return; - - if (xf86ModuleInfoList == NULL) - xf86NumModuleInfos = 0; - - xf86NumModuleInfos++; - xf86ModuleInfoList = xnfrealloc(xf86ModuleInfoList, - xf86NumModuleInfos * sizeof(ModuleInfoPtr)); - xf86ModuleInfoList[xf86NumModuleInfos - 1] = xnfalloc(sizeof(ModuleInfoRec)); - *xf86ModuleInfoList[xf86NumModuleInfos - 1] = *info; - xf86ModuleInfoList[xf86NumModuleInfos - 1]->module = module; - xf86ModuleInfoList[xf86NumModuleInfos - 1]->refCount = 0; } _X_EXPORT void xf86DeleteModuleInfo(int idx) { - if (xf86ModuleInfoList[idx]) { - if (xf86ModuleInfoList[idx]->module) - UnloadModule(xf86ModuleInfoList[idx]->module); - xfree(xf86ModuleInfoList[idx]); - xf86ModuleInfoList[idx] = NULL; - } } - /* Allocate a new ScrnInfoRec in xf86Screens */ _X_EXPORT ScrnInfoPtr diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 4723f5aba..32801cb3f 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2002 by The XFree86 Project, Inc. * @@ -97,8 +96,6 @@ extern Bool xf86SupportedMouseTypes[]; extern int xf86NumMouseTypes; extern DriverPtr *xf86DriverList; -extern ModuleInfoPtr *xf86ModuleInfoList; -extern int xf86NumModuleInfos; extern int xf86NumDrivers; extern Bool xf86Resetting; extern Bool xf86Initialising; diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index 2e0213597..fc94284cb 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -348,7 +348,7 @@ typedef struct _DriverRec { * functions to configuration tools, the Xserver, or any other * application/module interested in such information. */ -typedef struct _ModuleInfoRec { +_X_DEPRECATED typedef struct _ModuleInfoRec { int moduleVersion; char * moduleName; pointer module; |