[JDEV] why mod_basic_*?
Russell Nelson
nelson at crynwr.com
Sun Jan 30 21:49:25 CST 2000
Thomas Charron <tcharron at ductape.net> writes:
> Quoting Russell Nelson <nelson at crynwr.com>:
> > Why does jabber-transport/modules/basic/*.c name all its functions
> > "mod_basic_FOO"? By virtue of being in basic, the function should be
> > assumed to be part of the basic module. Why not just call the
> > function "FOO"?
>
> You very well could. But for simplicity, since we *ARE* dealing with shared
> libraries here, it's better when looking at logs, etc, to be able to have the
> module data along with the function. We may have 5 modules loaded, and looking
> at the debugging data is a whole lot easier if we can see the module in the
> function name.. Otherwise, you may get two or three messages from different
> modules, all with the same function name, and be rather hard to debug.
Well, I was just looking at writing an LDAP module, and it looks like
I could share a bunch of code, only ... I can't, because all the
filenames contain the module name. So, fine, then I copy the files
over and edit the name, and if something changes in the module API,
the code maintainer has to change every otherwise-identical file.
Been there, done that with packet drivers; it gets old.
--
-russ nelson <sig at russnelson.com> http://russnelson.com
Crynwr sells support for free software | PGPok | "Ask not what your country
521 Pleasant Valley Rd. | +1 315 268 1925 voice | can force other people to
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | do for you..." -Perry M.
More information about the JDev
mailing list