At 05:39 PM 8/2/00 +0100, Tim Bunce wrote:
>On Wed, Aug 02, 2000 at 12:05:20PM -0400, Dan Sugalski wrote:
> >
> > Reference counting is going to be a fun one, that's for sure.
> >
> > I'd like the interface to be something like:
> >
> > stat = perl_get_value(sv *, int what, &destination)
>
>And what type is perl_get_value declared as returning?
An integer--it is a status value after all...
The real data's returned in whatever the third parameter points to.
Parameter two is the thing we're looking for--integer, pointer to the
internal string, a pointer to a copy of the internal string, a float, a
filehandle... whatever.
>I can't imagine actually using it. Let's forget that one till we
>know more about how Svs will be implemented.
It probably won't be for the common types. I don't think I want to have a
zillion get_whatever calls, though, and if we have one it can be easily
extended by taking additional values.
> > with shortcut functions for the common cases (int, float, string) of:
> >
> > stat = perl_get_int(sv *, &destination)
>
>I'd suggest just a bunch of perl_get_foo funcs. There aren't that many.
Now, no. Later? Hard to say. If scalars get beefed as much as seems
possible, it's not that much of a stretch to think that we'll add in a
dozen or two distinct types of things that scalars can hold. (Whether
that's call for therapy or not is a separate question, of course)
> > Now if you'd all excuse me, I've a bunch of RFCs to get written. :)
>
>Get to it!
Argh! E-mail's luring be back to the dark side... :)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk