Get pyxpcom building and working again, at least on Windows. file test

fails, but we can live with that for now.  Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@134454 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2002-11-26 11:39:07 +00:00
parent 6d8229ae4a
commit f4be74069c
8 changed files with 83 additions and 110 deletions

View File

@@ -42,28 +42,27 @@ class Module:
# We can ignore the IID - the auto-wrapp process will automatically QI us.
return factory.Factory(klass)
def registerSelf(self, compMgr, location, registryLocation, componentType):
def registerSelf(self, compMgr, location, loaderStr, componentType):
# void function.
fname = os.path.basename(location.path)
for klass in self.components.values():
print "Registering: %s" % (klass.__name__,)
reg_contractid = klass._reg_contractid_
print "Registering '%s' (%s)" % (reg_contractid, fname)
reg_desc = getattr(klass, "_reg_desc_", reg_contractid)
compMgr.registerComponentWithType(klass._reg_clsid_,
compMgr = compMgr.queryInterface(components.interfaces.nsIComponentRegistrar)
compMgr.registerFactoryLocation(klass._reg_clsid_,
reg_desc,
reg_contractid,
location,
registryLocation,
1,
1,
loaderStr,
componentType)
# See if this class nominates custom register_self
extra_func = getattr(klass, "_reg_registrar_", (None,None))[0]
if extra_func is not None:
extra_func(klass, compMgr, location, registryLocation, componentType)
print "Registered %d Python components in %s" % (len(self.components),os.path.basename(location.path))
extra_func(klass, compMgr, location, loaderStr, componentType)
def unregisterSelf(self, compMgr, location, registryLocation):
def unregisterSelf(self, compMgr, location, loaderStr):
# void function.
for klass in self.components.values():
ok = 1
@@ -75,7 +74,7 @@ class Module:
extra_func = getattr(klass, "_reg_registrar_", (None,None))[1]
if extra_func is not None:
try:
extra_func(klass, compMgr, location, registryLocation)
extra_func(klass, compMgr, location, loaderStr)
except Exception:
ok = 0
if ok: