Re: [BUG] [2.5.49] symbol_get doesn't work

Rusty Russell (rusty@rustcorp.com.au)
Fri, 29 Nov 2002 14:29:38 +1100


In message <buohee16u19.fsf@mcspd15.ucom.lsi.nec.co.jp> you write:
> Rusty Russell <rusty@rustcorp.com.au> writes:
> > > > int *ptr = symbol_get(their_integer);
> > > > if (!ptr) ...
> >
> > That's because it's a new primitive. Very few places really want to
> > use it, they usually just want to use the symbol directly. However,
> > there are some places where such a dependency is too harsh: it's more
> > "if I can get this, great, otherwise I'll do something else".
>
> I find the name a bit wierd, BTW -- it sounds like it's going to return
> the _value_ of the symbol. How about something like `symbol_addr' instead?

I agree, the names are a bit wierd (there were earlier get_symbol()
implementations I cribbed off), but the compiler should catch most
bugs (a void * variable being the exception).

And I already have a symbol_put_addr() separate from symbol_put(), so
I'd have to rethink the whole naming scheme, and it's a Friday 8)

Thanks,
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/