Rick Delaney | 1 Aug 2004 02:19
Picon

Re: comments at the top of each .c file

On Sat, Jul 31, 2004 at 05:45:48PM +0100, Dave Mitchell wrote:
> ==== //depot/perl/perly.y#56 (text) ====
> 
>  <at>  <at>  -12,6 +12,15  <at>  <at> 
>   * All that is gold does not glitter, not all those who wander are lost.'
>   */
>  
> +/* This file holds the grammar for the Perl language. If edited, you need
> + * to run regen_perly.pl, which re-creates the files perly.h, perly.tab
> + * and perly.act which are derived from this.
> + *
> + * The main job of of this grammar is to call the various newFOO()
> + * functions in op.c to build a syntax tree of OP structs.
> + * It relies in the lexer in toke.c to do the tokenizing.
                ^^
                on
> + */
> +
>  /*  Make the parser re-entrant. */
>  
>  %pure_parser
> 
...
> ==== //depot/perl/utf8.c#207 (text) ====
> 
>  <at>  <at>  -29,6 +29,11  <at>  <at> 
>  /* 
>  =head1 Unicode Support
>  
> +This file contains various utility functions for manipulating UTF8-encoded
(Continue reading)

Yitzchak Scott-Thoennes | 1 Aug 2004 07:55
Favicon
Gravatar

Re: comments at the top of each .c file

On Sat, Jul 31, 2004 at 05:45:48PM +0100, Dave Mitchell <davem <at> iabyn.com> wrote:
> I've just added comments to the top of each .c file that gives
> an overview of what each file is for. Something i wish had happened
> 3 years ago when I first started messing with internals!

I thought that was what the Tolkien quotes were for!
Anyway, thanks a lot.

Marcus Holland-Moritz | 1 Aug 2004 12:46
Picon

SvO?OK_off()'s return value

Seeing

  Change 23177 by davem <at> davem-percy on 2004/07/31 16:27:09

	shut up a warning in mg.c

  [...]

  -	SvOK_off(sv);
  +	(void)SvOK_off(sv);

I was wondering what useful return value SvOK_off could have,
given that exactly _none_ of the documented API *_off functions
return anything.

And here's what it is:

    *drumroll*

        0

All the time. ;-)

SvOK_off calls SvOOK_off, which is

  #define SvOOK_off(sv)		(SvOOK(sv) && sv_backoff(sv))

and sv_backoff() always returns 0.

SvO?OK_off are used 38 times in the core, and 37 times they're
(Continue reading)

Yitzchak Scott-Thoennes | 1 Aug 2004 13:12
Favicon
Gravatar

Re: SvO?OK_off()'s return value

On Sun, Aug 01, 2004 at 12:46:48PM +0200, Marcus Holland-Moritz <mhx-perl <at> gmx.net> wrote:
> The only time where it's used is in sv_release_IVX [1]:
> 
> [1] BTW, I haven't seen any reference to sv_release_IVX() in
>     the core, nor is it documented. Does it serve any purpose?

Used by the SvRELEASE_IVX macro in sv.h, which is used by SvIOK_on and
SvIOKp_on.

Marcus Holland-Moritz | 1 Aug 2004 14:17
Picon

Re: SvO?OK_off()'s return value

On 2004-08-01, at 04:12:56 -0700, Yitzchak Scott-Thoennes wrote:

> On Sun, Aug 01, 2004 at 12:46:48PM +0200, Marcus Holland-Moritz <mhx-perl <at> gmx.net> wrote:
> > The only time where it's used is in sv_release_IVX [1]:
> > 
> > [1] BTW, I haven't seen any reference to sv_release_IVX() in
> >     the core, nor is it documented. Does it serve any purpose?
> 
> Used by the SvRELEASE_IVX macro in sv.h, which is used by SvIOK_on and
> SvIOKp_on.

Yup, thanks. I spotted this shortly after I hit submit.
(I didn't grep the .h files, as Perl rarely uses macros... ;-)

Marcus

--

-- 
checkuary, n:
	The thirteenth month of the year.  Begins New Year's Day and ends
	when a person stops absentmindedly writing the old year on his checks.

kane | 1 Aug 2004 14:55
Picon
Gravatar

Smoke [5.9.2] 23177 FAIL(Fc) bsd/os 4.1 (i386/1 cpu)

Automated smoke report for 5.9.2 patch 23177 on bsd/os - 4.1 (i386/1 cpu)
(fixit.xs4all.nl) using  version 
Report by Test::Smoke v1.18.09 (perl 5.00503) [3 hours]

O = OK  F = Failure(s), extended report at the bottom
X = test(s) failed under TEST but not under harness
? = still running or test results not (yet) available
Build failures during:       - = unknown or N/A
c = Configure, m = make, M = make (after miniperl), t = make test-prep

   23177     Configuration (common) none
------------ ----------------------------------------------------------------
F F - -
- - - -      -Duse64bitint
c c c c      -Duselongdouble
c c c c      -Dusemorebits
- - - -      -Duseithreads
- - - -      -Duseithreads -Duse64bitint
c c c c      -Duseithreads -Duselongdouble
c c c c      -Duseithreads -Dusemorebits
| | | +----- PERLIO = perlio -DDEBUGGING
| | +------- PERLIO = stdio  -DDEBUGGING
| +--------- PERLIO = perlio
+----------- PERLIO = stdio

Summary: FAIL(Fc)

Failures:

bsdos       [stdio/perlio]
(Continue reading)

Randal L. Schwartz | 1 Aug 2004 17:23
Favicon
Gravatar

perl6 style BEGIN {} anyone?


How tough would it be to graft in the Perl6-style BEGIN block into the
5.8.x codebase, as in:

        my $foo = BEGIN { 3 + 4 + -s "/etc/passwd" };

I don't believe there'll be any backward compatibility problems, as
all existing BEGIN blocks are in void context, which would still
work in the new scheme.

If my C-fu was better, I'd probably just submit a patch.  Anyone
else with some spare time, this is much cleaner than the current
scheme:

        my $foo;
        BEGIN { $foo = ... }

Thanks.

--

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn <at> stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Rafael Garcia-Suarez | 1 Aug 2004 17:31
Favicon

Re: perl6 style BEGIN {} anyone?

Randal L. Schwartz wrote:
> 
> How tough would it be to graft in the Perl6-style BEGIN block into the
> 5.8.x codebase, as in:
> 
>         my $foo = BEGIN { 3 + 4 + -s "/etc/passwd" };
> 
> I don't believe there'll be any backward compatibility problems, as
> all existing BEGIN blocks are in void context, which would still
> work in the new scheme.
> 
> If my C-fu was better, I'd probably just submit a patch.  Anyone
> else with some spare time, this is much cleaner than the current
> scheme:
> 
>         my $foo;
>         BEGIN { $foo = ... }

And what if the my declaration is in a for loop? This clues me in
thinking that the return value of the BEGIN block must be
constant-folded at compile-time. Might not be very difficult.
Probably a thing for blead, anyway.

Randal L. Schwartz | 1 Aug 2004 17:35
Favicon
Gravatar

Re: perl6 style BEGIN {} anyone?

>>>>> "Rafael" == Rafael Garcia-Suarez <rgarciasuarez <at> mandrakesoft.com> writes:

Rafael> And what if the my declaration is in a for loop? This clues me in
Rafael> thinking that the return value of the BEGIN block must be
Rafael> constant-folded at compile-time. Might not be very difficult.
Rafael> Probably a thing for blead, anyway.

Well, it should do whatever the Perl6 doc says it does. :-)

Yes, I envision this as a constant-folding operation, similar
to empty-prototyped subroutines now.

--

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn <at> stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Dave Mitchell | 1 Aug 2004 19:16

Re: comments at the top of each .c file

On Sat, Jul 31, 2004 at 09:54:07PM +0000, Nigel Sandever wrote:
> On Sat, 31 Jul 2004 17:45:48 +0100, davem <at> iabyn.com (Dave Mitchell) wrote:
> Nice. Any chance that this could also form the basis of a 'roadmap' type 
> document? Perlroadmap.pod 
> 
> Unless something similar already exists that I've missed.

perlhack and perlguts?

--

-- 
Standards (n). Battle insignia or tribal totems.


Gmane