I don't know if this is relevant but it is defined in pobj.h as:
/* Parrot Object - base class for all others */
typedef struct pobj_t {
Parrot_UInt flags;
} PObj;
typedef struct buffer_t {
Parrot_UInt flags;
void * _bufstart;
size_t _buflen;
} Buffer;
#define Buffer_bufstart(buffer) (buffer)->_bufstart
#define Buffer_buflen(buffer) (buffer)->_buflen
so it looks like we are picking up the first character and checking for a
file separator to determine if we have a full path or not.
(I had to add a cast to get it compile with g++ (r42976))
the function is actually passed a const STRING *file so it should pick up
the start of that STRING.
cheers,
Michael (mikehh)
2009/12/10 Andrew Dougherty <[email protected]>
> I'm a little suspicious of the change in r42961, which essentially does
>
> - const char * const file_name = file->strstart;
> + const char * const file_name = Buffer_bufstart(file);
>
> In general, I don't think bufstart is necessarily the same as strstart.
> At least some years ago it wasn't supposed to always be the same. For
> example, if a user did a substr(), strstart might actually point somewhere
> within the buffer, not just at the start. At least that was my
> understanding from some time ago. I didn't create a ticket in case my
> memory was faulty or the rules have changed, but did want to ask another
> pair of eyes to check it out.
>
> Thanks,
>
> --
> Andy Dougherty [email protected]
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
--
Michael H. Hind
Tel: +44 (0) 1224 443 570
Cell: +44 (0) 7877 224 745
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev