----- Original Message -----
From: "Geoffrey Broadwell" <[EMAIL PROTECTED]>
To: "Peter Gibbs" <[EMAIL PROTECTED]>
Cc: "Christoph Otto" <[EMAIL PROTECTED]>; <perl6-internals@perl.org>
Sent: Friday, July 25, 2008 6:09 PM
Subject: Re: [perl #57260] [BUG] Segfaults in sprintf opcode
On Fri, 2008-07-25 at 13:40 +0200, Peter Gibbs wrote:
+ HUGEINTVAL num;
Does this really need to be a HUGEINTVAL? Why is INTVAL not
sufficient?
Tracking backwards from the assignment in Parrot_sprintf_format:
num = obj->getint(interp, SIZE_XVAL, obj);
obj is a parameter to Parrot_sprintf_format defined by:
ARGIN(SPRINTF_OBJ *obj)
This is defined in include/parrot/misc.h as:
typedef struct sprintf_obj SPRINTF_OBJ;
struct sprintf_obj {
...
sprintf_getint_t getint;
...
}
and finally:
typedef HUGEINTVAL(*sprintf_getint_t) (PARROT_INTERP,INTVAL,
SPRINTF_OBJ *);
So, since obj->getint returns a HUGEINTVAL, I gave it one to store the
result in.
As to why sprintf_obj is defined that way, I have no clue.
Regards
Peter Gibbs