Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread chromatic
On Friday 22 June 2007 11:25:11 Mark Glines wrote: > Since I have a little more time, this patch is the same thing, but I > used a slightly less stupid regex for my search/replace this time, so > it caught more cases. (Previous regex was too dependent on commas and > missed things like string_from

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread chromatic
On Friday 22 June 2007 10:42:35 Mark Glines wrote: > Great! Here's a reissued patch with the name changed to > string_from_literal(). I have a meeting in 30 seconds, but I'll review the patch and apply it afterward. Oops, -10 seconds. -- c

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread Mark Glines
On Fri, 22 Jun 2007 10:35:00 -0700 chromatic <[EMAIL PROTECTED]> wrote: > > > If we're passing in a string literal, it seems silly to pass in a > > > length of 0, as we're recalculating a constant on every call. I > > > don't see that this macro fixes that. > > > It uses sizeof, not strlen. So,

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread chromatic
On Friday 22 June 2007 09:30:40 Mark Glines wrote: > > If we're passing in a string literal, it seems silly to pass in a > > length of 0, as we're recalculating a constant on every call. I > > don't see that this macro fixes that. > It uses sizeof, not strlen. So, it pushes the calculation to >

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread Mark Glines
On Fri, 7 Nov 2008 15:28:40 -0700 chromatic <[EMAIL PROTECTED]> wrote: > On Friday 22 June 2007 02:07:32 Nicholas Clark wrote: > > I think that you need something like this > > > > /* concatenating with "" ensures that only literal strings are > > accepted as argument */ #define STR_WITH_LEN(s) (s

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread Nicholas Clark
On Fri, Nov 07, 2008 at 03:28:40PM -0700, chromatic wrote: > On Friday 22 June 2007 02:07:32 Nicholas Clark wrote: > > > > We have a lot of string_from_cstring() calls with constant second > > > parameters and third parameters of 0 that could use updating. There's no > > > sense in calling strlen

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread Patrick R. Michaud
On Fri, Jun 22, 2007 at 09:30:40AM -0700, Mark Glines wrote: > On Fri, 7 Nov 2008 15:28:40 -0700 > chromatic <[EMAIL PROTECTED]> wrote: > > On Friday 22 June 2007 02:07:32 Nicholas Clark wrote: > > > I think that you need something like this > > > /* concatenating with "" ensures that only literal

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread Mark Glines
On Fri, 22 Jun 2007 11:36:28 -0500 "Patrick R. Michaud" <[EMAIL PROTECTED]> wrote: > > Also, using sizeof() will fix some cases that strlen() doesn't > > handle correctly, specifically, strings containing explicit null > > characters. src/objects.c has a few examples of that. > > string_to_cstring(

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread Mark Glines
On Fri, 22 Jun 2007 10:07:32 +0100 Nicholas Clark <[EMAIL PROTECTED]> wrote: > > We have a lot of string_from_cstring() calls with constant second > > parameters and third parameters of 0 that could use updating. > > There's no sense in calling strlen() all the time. > > I think that you need some

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-22 Thread Nicholas Clark
On Thu, Jun 21, 2007 at 11:08:25PM -0700, chromatic wrote: > On Thursday 21 June 2007 17:44:38 Mark Glines wrote: > > > On Thu, 21 Jun 2007 17:38:15 -0700 > > > > chromatic <[EMAIL PROTECTED]> wrote: > > > > -return string_from_cstring(INTERP, "Str", 3); > > > > +return str

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-21 Thread chromatic
On Thursday 21 June 2007 17:44:38 Mark Glines wrote: > On Thu, 21 Jun 2007 17:38:15 -0700 > > chromatic <[EMAIL PROTECTED]> wrote: > > > -return string_from_cstring(INTERP, "Str", 3); > > > +return string_from_cstring(INTERP, "Bool", 3); > > > return SUPER(); > > >

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-21 Thread Mark Glines
On Thu, 21 Jun 2007 17:38:15 -0700 chromatic <[EMAIL PROTECTED]> wrote: > > -return string_from_cstring(INTERP, "Str", 3); > > +return string_from_cstring(INTERP, "Bool", 3); > > return SUPER(); > > } > > That 3 looks like it should be 4. Yep, fixed in r19238

Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc

2007-06-21 Thread chromatic
On Thursday 21 June 2007 12:05:35 [EMAIL PROTECTED] wrote: > Log: > [perl6]: > * Fix incorrect get_string() value in perl6bool.pmc (Infinoid++) > > > Modified: trunk/languages/perl6/src/pmc/perl6bool.pmc > === >=== --- trunk/l