This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years agoperlport: remove perlapollo link
Karl Williamson [Sat, 16 Jul 2011 18:22:08 +0000 (12:22 -0600)]
perlport: remove perlapollo link

10 years agopodcheck.t: Reword instructions slightly
Karl Williamson [Wed, 6 Jul 2011 03:05:45 +0000 (21:05 -0600)]
podcheck.t: Reword instructions slightly

This is to emphasize that things may be false positives, and
instead of jumping through hoops to shut it up, all you have
to do is --regen things.

10 years agoMore apidoc entries need \n\n before =cut
Father Chrysostomos [Sat, 16 Jul 2011 19:49:47 +0000 (12:49 -0700)]
More apidoc entries need \n\n before =cut

10 years agoImprove wrapping of arguments in perlintern.pod
Father Chrysostomos [Sat, 16 Jul 2011 19:45:04 +0000 (12:45 -0700)]
Improve wrapping of arguments in perlintern.pod

Commit dee6204dc made a huge improvement to the formatting of argument
lists in perlapi (except for one pesky little entry, namely caller_cx,
that is 81 columns).

But I forgot to look through perlintern.

This just looks comical:

                       struct refcounted_he * refcounted_he_new_pv(struct refcounted_he *parent,
                                                                   const char *key,
                                                                   U32 hash,
                                                                   SV *value,
                                                                   U32 flags)

On an eighty-column terminal that wraps like this:

                       struct refcounted_he * refcounted_he_new_pv(struct refcoun
ted_he *parent,
                                                                   const char *k
ey,
                                                                   U32 hash,
                                                                   SV *value,
                                                                   U32 flags)

Ugh!!

So, for entries with individual arguments that don’t fit, this commit
wraps them like this:

                       struct refcounted_he * refcounted_he_new_pv(
                                                  struct refcounted_he *parent,
                                                  const char *key, U32 hash,
                                                  SV *value, U32 flags
                                              )

10 years agore_eval: clear lexicals in the right pad
David Mitchell [Sat, 16 Jul 2011 10:45:53 +0000 (11:45 +0100)]
re_eval: clear lexicals in the right pad

(?{...}) deliberately doesn't introduce a new scope (so that the affects of
local() can accumulate across multiple calls to the code). This also means
that the SAVEt_CLEARSVs pushed onto the save stack by lexical declarations
(i.e. (?{ my $x; ... }) also accumulate, and are only processed en-mass at
the end, on exit from the regex. Currently they are usually processed in
the wrong pad (the caller of the pattern, rather than the pads of the
individual code block(s)), leading to random misbehaviour and SEGVs.

Hence the long-standing advice to avoid lexical declarations within
re_evals.

We fix this by wrapping a pair of SAVECOMPPADs around each call to a code
block. Eventually the save stack will be a long accumulation of
SAVEt_CLEARSV's interspersed with SAVEt_COMPPAD's, that when popped
en-mass should unwind in the right order with the right pad at the right
time.

The price to pay for this is two extra additions to the save stack (which
accumulate) for each code call.

A few TODO tests in reg_eval_scope.t now pass, so I'm probably doing the
right thing ;-)

10 years agoav.c: Add blank line before =cut
Father Chrysostomos [Sat, 16 Jul 2011 05:08:25 +0000 (22:08 -0700)]
av.c: Add blank line before =cut

to fix the generated pod

10 years agoWrap argument lists in perl{api,intern}.pod
Father Chrysostomos [Sat, 16 Jul 2011 05:06:49 +0000 (22:06 -0700)]
Wrap argument lists in perl{api,intern}.pod

10 years agoAdd PL_valid_types_{IVX,NVX,PVX,RV,IV_set,NV_set} into globar.sym.
Nicholas Clark [Fri, 15 Jul 2011 18:25:48 +0000 (20:25 +0200)]
Add PL_valid_types_{IVX,NVX,PVX,RV,IV_set,NV_set} into globar.sym.

f1fb874192252653 added these 6 new global variables, but omitted to add them
to the list of exported symbols.

10 years agoSort globvar.sym lexically.
Nicholas Clark [Fri, 15 Jul 2011 18:05:04 +0000 (20:05 +0200)]
Sort globvar.sym lexically.

10 years agoreplace many SvTYPE assertions with lookup tables
David Mitchell [Fri, 15 Jul 2011 15:45:34 +0000 (16:45 +0100)]
replace many SvTYPE assertions with lookup tables

Under a DEBUGGING build, this reduces the size of the perl binary by about
10%, and reduces the time to run the test suite by about 10-20%% (!)

10 years agoUpdate CPANPLUS to CPAN version 0.9108
Chris 'BinGOs' Williams [Fri, 15 Jul 2011 15:08:44 +0000 (16:08 +0100)]
Update CPANPLUS to CPAN version 0.9108

  [DELTA]

  Changes for 0.9108      Fri Jul 15 15:15:06 2011
  ================================================
  * Always use INSTALLER_MM for Module-Build

10 years agoensure SVs_PADTMP and SVs_PADTMP not both on
David Mitchell [Fri, 15 Jul 2011 13:46:46 +0000 (14:46 +0100)]
ensure SVs_PADTMP and SVs_PADTMP not both on

There's no reason for these two flags to ever both be on.
Fix the one place that was doing this, and assert that this never happens.

If this doesn't break anything, it opens the door to freeing a bit in
SvFLAGS. (woo hoo!)

10 years agoChange sv_eq_pvn_flags()'s parameter pvlen from I32 to STRLEN.
Nicholas Clark [Fri, 15 Jul 2011 12:46:30 +0000 (14:46 +0200)]
Change sv_eq_pvn_flags()'s parameter pvlen from I32 to STRLEN.

Change its return type to bool from I32, as it only returns truth or falsehood.

10 years agoChange was_lvalue_sub back to X; spell out the only use of it
Father Chrysostomos [Fri, 15 Jul 2011 04:49:08 +0000 (21:49 -0700)]
Change was_lvalue_sub back to X; spell out the only use of it

OK, now I understand what’s happening.

If there is a public macro (PUSHSUB) that contains a call to a pri-
vate function (was_lvalue_sub), that function has to be exported, so
that non-core code can call it.  But if it is marked X, there is no
was_lvalue_sub shorthand macro visible to non-core code, so when the
PUSHSUB macro is expanded in such code, the was_lvalue_sub(...) bit
becomes a call to the function literally named was_lvalue_sub, as
opposed to Perl_lvalue_sub (and is compiled that way on forgiving
platforms).  Making it A makes that macro available to non-core code,
but also implies that it is available for direct use by extensions,
which is not the case with was_lvalue_sub.

So, this commit makes it X again, but spells it out in PUSHSUB, so
there is no need for the function’s macro to be available when
PUSHSUB is expanded.

Hence, there is no need for the was_lvalue_sub macro to exist, so this
commit also removes it.

See also these three commits:

c73b0699db
7b70e81778
777d901444

10 years agoA typemap is a file, not a directory.
Craig A. Berry [Thu, 14 Jul 2011 22:20:41 +0000 (17:20 -0500)]
A typemap is a file, not a directory.

10 years agoPerldelta for Dave's short-circuit optimization
Steffen Mueller [Thu, 14 Jul 2011 17:25:02 +0000 (19:25 +0200)]
Perldelta for Dave's short-circuit optimization

10 years agofully short-circuit &&, ||, //
David Mitchell [Thu, 14 Jul 2011 15:35:26 +0000 (16:35 +0100)]
fully short-circuit &&, ||, //

Currently in an expression like (A || B || C || D), if A is true, then
B, C and D aren't evaluated, but the 2nd, 3rd and 4th OR ops are *still*
executed. Use the peephole optimiser to bypass them.

i.e. change the op tree from

    - A - OR - OR - OR - X---
            \ /  \ /  \ /
             B    C    D
to
    - A - OR --------------------X---
            \                   /
             B - OR -----------/
           \          /
    C - OR --/
          \ /
   D

With this, the following code's execution time reduces from 1.6s to 0.9s
approx on my system:

    my $a = 1; my $b = 0; my $x = 0;
    for (1..10_000_000) {
if ($a || $b || $b || $b || $b || $b) {
    $x++;
}
    }

10 years agoMake prototypes and declarations for Perl_pad_add_name_{pv,pvn,sv} agree.
Nicholas Clark [Thu, 14 Jul 2011 16:02:55 +0000 (18:02 +0200)]
Make prototypes and declarations for Perl_pad_add_name_{pv,pvn,sv} agree.

cc76b5cc1552a605 added all 3 functions to the API, but declared prototypes
with const U32 flags, whilst the definitions had that parameter non-const.
Some compilers issue warnings about this inconsistency.

10 years agoAdd Porting/acknowledgements.pl to generate perldelta acknowledgements
Leon Brocard [Thu, 14 Jul 2011 14:00:07 +0000 (15:00 +0100)]
Add Porting/acknowledgements.pl to generate perldelta acknowledgements

10 years agoreduce size of threads.t test
David Mitchell [Thu, 14 Jul 2011 12:51:58 +0000 (13:51 +0100)]
reduce size of threads.t test

Commit 3c78429c102e0fe2ad30c60dfe52636b6071ef19 introduced a new test
that constructed and then evaled a very long string. Make that string less
long, as evaling it was consuming 100Mb on my debugging build, and a
smaller string still exercises the behaviour (i.e. fails on older perls).

10 years agoAdded -r option to corelist
Chris 'BinGOs' Williams [Thu, 14 Jul 2011 12:30:34 +0000 (13:30 +0100)]
Added -r option to corelist

This will display the release date of a given perl release.

If no perl release is specified, will list all perl releases
and release dates.

10 years agoUpdate POD for 'corelist' so that the help page is more actual than illustrative
H.Merijn Brand [Thu, 14 Jul 2011 10:22:12 +0000 (11:22 +0100)]
Update POD for 'corelist' so that the help page is more actual than illustrative

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
10 years agomake peep optimiser recurse mostly only shallowly
David Mitchell [Tue, 5 Jul 2011 14:53:34 +0000 (15:53 +0100)]
make peep optimiser recurse mostly only shallowly

Long blocks of code that include logical or loop ops (i.e. those with
multiple 'branches' of ops, such as op_other, op_redo etc) cause
Perl_rpeep to recurse deeply and eventaully SEGV.

For example this crashes, due to the ENTERLOOP:

    eval ("{\$x = 1 }\n" x 10000)

The deep recursion happens because the processing of the entire rest of
the code occurs in within the nested call. For example in the code

    A && B; C; D; E;

the ops are structured as

A -> AND -> C -> D -> E
       \   /
         B

where AND->op_next points to C, while AND->op_other points to B.
rpeep() would normally process each op in the op_next sequence in turn
(i.e. A/AND/C/D/E), but when it reaches AND, it recursively calls
rpeep(B), which happens to then process B/C/D/E. Finally it returns,
and the parent rpeep processes C, finds it's already done, and exits.

Clearly, if C,D,E etc also contain conditional/loop ops, then the
recursion level gradually stacks up.

The fix for this is to add a small deferred queue to rpeep().
Whenever rpeep wants to recurse with op_other or op_lastop etc,
it instead adds it to the deferred queue. Only if the queue is full is
rpeep actually called. The hope is that by deferring, when we do
eventually process it, enough of the main op_next chain has already been
processed to ensure that the child rpeep returns very early.

In the example above, processing of AND causes B to be added to the queue,
and the main rpeep process continues processing C, D etc. Sometime later,
the queue becomes full and B is processed via a recursive call to rpeep.
B is processed, and op_next is followed to C, but C is marked as already
processed, so the child rpeep returns almost immediately.

For LOOP ops, I've stopped following op_redoop and op_nextop, since
AFAIKT the ops these point to will also be reachable vie op_next anyway.
op_lastop is the exception; in while(1){..} only op_lastop points to the
rest of the code block.

Note that this commit doesn't guarantee only shallow recursion, it just
makes deep recursion fairly unlikely.

Note also that this commit causes the order of the processing of op_next
chains to be altered; this can affect the ordering of compiler warnings
and fatal messages among potentially other things.

10 years agoOnly add Perl_pad_setsv to the list of symbols if -DDEBUGGING is true.
Nicholas Clark [Wed, 13 Jul 2011 20:39:15 +0000 (22:39 +0200)]
Only add Perl_pad_setsv to the list of symbols if -DDEBUGGING is true.

This is needed on Win32 since cc76b5cc1552a605, which make Perl_pad_setsv part
of the public API, and thereby exported for the first time.

10 years ago[perl #93324] Don’t autovivify *B:: in Carp
Father Chrysostomos [Thu, 14 Jul 2011 05:35:13 +0000 (22:35 -0700)]
[perl #93324] Don’t autovivify *B:: in Carp

While this may be bending over backwards, this avoids causing problems
for the Perl compiler suite and also for various CPAN modules that use
A, B and C packages for testing.

10 years agoperldelta update
Father Chrysostomos [Thu, 14 Jul 2011 05:14:49 +0000 (22:14 -0700)]
perldelta update

10 years agoAhem, 0fce7163 was not enough
Father Chrysostomos [Thu, 14 Jul 2011 05:14:30 +0000 (22:14 -0700)]
Ahem, 0fce7163 was not enough

10 years agoFix a compiler warning
Florian Ragwitz [Wed, 13 Jul 2011 17:22:52 +0000 (19:22 +0200)]
Fix a compiler warning

gimme is being set by POPBLOCK, but otherwise unused. PERL_UNUSED_VAR stops the
warning gcc generates for that.

10 years agoRemove an unused variable
Florian Ragwitz [Wed, 13 Jul 2011 17:22:41 +0000 (19:22 +0200)]
Remove an unused variable

10 years agoDon't include libutil.h on Linux
Florian Ragwitz [Wed, 13 Jul 2011 17:05:01 +0000 (19:05 +0200)]
Don't include libutil.h on Linux

All it does is cause warnings on recent systems with that header installed. It's
required for some variants of FreeBSD only.

10 years agoDual-life Term::Complete
Florian Ragwitz [Wed, 13 Jul 2011 15:26:42 +0000 (17:26 +0200)]
Dual-life Term::Complete

10 years agoperldelta for the SvIsCOW fix
Father Chrysostomos [Wed, 13 Jul 2011 15:39:14 +0000 (08:39 -0700)]
perldelta for the SvIsCOW fix

10 years agoperldelta for recent SvREADONLY fixes
Father Chrysostomos [Wed, 13 Jul 2011 15:33:04 +0000 (08:33 -0700)]
perldelta for recent SvREADONLY fixes

10 years agoMerge UTF8 pad stuff
Father Chrysostomos [Wed, 13 Jul 2011 04:50:35 +0000 (21:50 -0700)]
Merge UTF8 pad stuff

The series of commits in this branch add pad functions to the API and
make the pad fully UTF8-aware.

Previously, ‘use utf8; my $фу’ used to store raw UTF8 bytes in the
pad, without marking them as such.  So things sort of worked ‘by
accident’.

10 years agoFix perlintern links; regen known pod issues
Father Chrysostomos [Wed, 13 Jul 2011 04:38:17 +0000 (21:38 -0700)]
Fix perlintern links; regen known pod issues

10 years agoAdd a test count to fresh_perl_utf8.t
Father Chrysostomos [Wed, 13 Jul 2011 04:32:06 +0000 (21:32 -0700)]
Add a test count to fresh_perl_utf8.t

10 years agoAdd Brian Fraser to AUTHORS
Father Chrysostomos [Wed, 13 Jul 2011 03:41:57 +0000 (20:41 -0700)]
Add Brian Fraser to AUTHORS

10 years agoThis cleans the "Can't localize lexical variable" error.
Brian Fraser [Thu, 16 Jun 2011 10:57:22 +0000 (07:57 -0300)]
This cleans the "Can't localize lexical variable" error.

Plus the test case from t/run/fresh_perl.t, but in UTF-8,
in t/op/fresh_perl_utf8.t
That file currently has only that test, but I intend to
port others from fresh_perl.t to test clean stashes/GVs.

10 years agoCleaned up warning messages in pad.c, plus related tests.
Brian Fraser [Sat, 11 Jun 2011 18:53:43 +0000 (15:53 -0300)]
Cleaned up warning messages in pad.c, plus related tests.

10 years agoTests for the pad cleanup.
Brian Fraser [Sat, 11 Jun 2011 18:38:11 +0000 (15:38 -0300)]
Tests for the pad cleanup.

10 years agoCleanup of pad fetching and storing. This version normalizes the data on both sides...
Brian Fraser [Sat, 11 Jun 2011 18:12:44 +0000 (15:12 -0300)]
Cleanup of pad fetching and storing. This version normalizes the data on both sides, which isn't required, but may be more efficient than leaving it to the comparison function.

10 years agoAdded sv_eq_pvn_flags to pad.c, which will be used by later commits.
Brian Fraser [Sat, 11 Jun 2011 17:39:00 +0000 (14:39 -0300)]
Added sv_eq_pvn_flags to pad.c, which will be used by later commits.

10 years agoPassing the flag to the pad functions in toke.c
Brian Fraser [Sat, 11 Jun 2011 17:34:51 +0000 (14:34 -0300)]
Passing the flag to the pad functions in toke.c

10 years agoHandling of the flag parameter in Perl_allocmy, instead of looking at the global...
Brian Fraser [Sat, 11 Jun 2011 17:05:29 +0000 (14:05 -0300)]
Handling of the flag parameter in Perl_allocmy, instead of looking at the global flag.

10 years agopad.c: flags checking for the UTF8 flag when necessary
Brian Fraser [Sun, 10 Jul 2011 18:06:47 +0000 (11:06 -0700)]
pad.c: flags checking for the UTF8 flag when necessary

10 years agopad.h: Added a padadd_UTF8_NAME flag for pad_add_name_pvn.
Brian Fraser [Sat, 11 Jun 2011 16:34:06 +0000 (13:34 -0300)]
pad.h: Added a padadd_UTF8_NAME flag for pad_add_name_pvn.

10 years agoAdded a flags parameter to pad_findlex.
Brian Fraser [Sat, 11 Jun 2011 16:29:54 +0000 (13:29 -0300)]
Added a flags parameter to pad_findlex.

10 years agoAPI tests for pad_findmy_*()
Zefram [Sun, 12 Dec 2010 21:10:22 +0000 (21:10 +0000)]
API tests for pad_findmy_*()

10 years agoAPI test for find_rundefsv()
Zefram [Sun, 12 Dec 2010 20:09:00 +0000 (20:09 +0000)]
API test for find_rundefsv()

10 years agoAPIify pad functions
Zefram [Sun, 12 Dec 2010 16:08:14 +0000 (16:08 +0000)]
APIify pad functions

Move several pad functions into the core API.  Document the pad
functions more consistently for perlapi.  Fix the interface issues
around delimitation of lexical variable names, providing _pvn, _pvs,
_pv, and _sv forms of pad_add_name and pad_findmy.

10 years agoStop buildtoc from generating trailing whitespace
Florian Ragwitz [Tue, 12 Jul 2011 21:51:38 +0000 (23:51 +0200)]
Stop buildtoc from generating trailing whitespace

In win32/pod.mak, at least.

10 years agoMove perlxs{,tut}.pod into the ExtUtils-ParseXS dist
Florian Ragwitz [Tue, 12 Jul 2011 20:59:56 +0000 (22:59 +0200)]
Move perlxs{,tut}.pod into the ExtUtils-ParseXS dist

10 years agoSkip .xs files in t/ dirs when comparing versions
Florian Ragwitz [Tue, 12 Jul 2011 21:20:12 +0000 (23:20 +0200)]
Skip .xs files in t/ dirs  when comparing versions

10 years agopodcheck.t --regen after the ParseXS merge
Florian Ragwitz [Tue, 12 Jul 2011 21:18:06 +0000 (23:18 +0200)]
podcheck.t --regen after the ParseXS merge

10 years agoA perltodone! ExtUtils::ParseXS uses strict
Steffen Mueller [Tue, 12 Jul 2011 20:23:01 +0000 (22:23 +0200)]
A perltodone! ExtUtils::ParseXS uses strict

This is thanks to James Keenan's work! Finally!

10 years agoFill in ExtUtils::ParseXS versions in delta
Steffen Mueller [Tue, 12 Jul 2011 20:10:56 +0000 (22:10 +0200)]
Fill in ExtUtils::ParseXS versions in delta

10 years agoMerge branch 'smueller/eu_typemap' into blead
Steffen Mueller [Tue, 12 Jul 2011 20:02:24 +0000 (22:02 +0200)]
Merge branch 'smueller/eu_typemap' into blead

Much of ExtUtils::ParseXS was rewritten and cleaned up.
It has been made somewhat more extensible and now finally
uses strictures.

The logic for parsing, merging, and dumping XS typemaps was extracted
from ExtUtils::ParseXS into a module of its own, ExtUtils::Typemaps.
ExtUtils::Typemaps offers an interface to typemap handling outside of
the scope of the XS compiler itself.

As a first use case of the improved API an extensibility, typemaps can now
be included inline into XS code with a HEREDOC-like syntax:

  TYPEMAP: <<END_TYPEMAP
  MyType    T_IV
  END_TYPEMAP

10 years agoIncrease $Storable::VERSION
Father Chrysostomos [Tue, 12 Jul 2011 20:01:58 +0000 (13:01 -0700)]
Increase $Storable::VERSION

The recent CPAN release of 2.30 did not include the last two
changes to Storable.xs, so blead needs a new number.

10 years agoMake Internals::SvREADONLY smarter
Father Chrysostomos [Tue, 12 Jul 2011 18:54:15 +0000 (11:54 -0700)]
Make Internals::SvREADONLY smarter

(aka: More fun with Hash::Util)

$ perl -lMHash::Util=lock_value
$h{a} = __PACKAGE__; lock_value %h, a; $h{a} = "3"; print $h{a}'
^D
3

OK, so it didn’t really lock it. Now for more fun:

$ perl -lMHash::Util=unlock_value
$h{a} = __PACKAGE__; unlock_value %h, a; $h{a} =~ y/ia/ao/;
print __PACKAGE__
^D
moan

There are three different ways to fix this:
1) Add an SvFAKE function to Internals:: (not *more* ‘internals’ for
   people [ahem, Const::Fast, ahem] to abuse!)
2) Use B::* functions in Hash::Util to check the flags (too slow)
3) Make Internals::SvREADONLY less ‘internal’, by having it deal with
   readonliness in general, rather than just the SVf_READONLY flag.

The third approach seems the most logical, so that’s what this
commit does.

There is one test in t/op/tr.t that uses Internals::SvREADONLY to
detect bovinity, so I’ve changed it to use B instead, as that will
have no effect on post-install efficiency.

(This approach also fixes Const::Fast’s bugginess, but that is purely
accidental.)

10 years agoMake SvIsCOW honest about globs
Father Chrysostomos [Tue, 12 Jul 2011 19:24:29 +0000 (12:24 -0700)]
Make SvIsCOW honest about globs

SvIsCOW was ignoring the fact that it might be passed a
typeglob, which made its behaviour contradict its docs.

This fixes that and, in doing so, simplifies the
upcoming Internals::SvREADONLY fix.

10 years agoMake it possible to have read-only glob copies
Father Chrysostomos [Tue, 12 Jul 2011 18:13:31 +0000 (11:13 -0700)]
Make it possible to have read-only glob copies

(aka Fun with Hash::Util)

This script gives ‘Modification of a read-only value’:

use Hash::Util lock_value;
*foo::; # autovivify
lock_value %::, foo::::;
*foo:: = [];

So far so good.  That’s to be expected.  But this one crashes:

use Hash::Util lock_value;
$a{h} = *foo;
lock_value %a, h;
$a{h} = [];

Under debugging builds, it gives assertion failures.

Anyone who knows how the flags work will see immediately what’s wrong,
but for the sake of those who don’t:

The SVf_FAKE flag is set on a copy of a typeglob, meaning that assign-
ing something other than a glob to it will overwrite the glob, instead
of writing to one of its slots.

The SVf_FAKE flag on a read-only (SVf_READONLY-flagged) string means
that it’s not actually read-only, but a copy-on-write string.

SVf_READONLY on a glob means that you can’t even assign *through* it.
See the first Hash::Util example above.

The crashing occurs when the two flags are combined.
sv_force_normal_flags assumes that anything marked fake AND read-only
is a copy-on-write string, so it proceeds to gut it, even if it’s
actually just corrupting a glob.

So this commit changes that check to take typeglobs into account.

10 years agoDocument full changeset in ExtUtils::ParseXS
Steffen Mueller [Tue, 12 Jul 2011 19:57:49 +0000 (21:57 +0200)]
Document full changeset in ExtUtils::ParseXS

10 years agoBump ExtUtils::ParseXS version to a dev version
Steffen Mueller [Tue, 12 Jul 2011 19:52:51 +0000 (21:52 +0200)]
Bump ExtUtils::ParseXS version to a dev version

10 years agoDocument the TYPEMAP XS keyword
Steffen Mueller [Tue, 12 Jul 2011 19:42:52 +0000 (21:42 +0200)]
Document the TYPEMAP XS keyword

It can be used for embedding typemaps in XS code. Very convenient
when generating XS!

10 years agoDocument the ExtUtils::ParseXS changes in perldelta
Steffen Mueller [Tue, 12 Jul 2011 19:22:52 +0000 (21:22 +0200)]
Document the ExtUtils::ParseXS changes in perldelta

10 years agoAttempt band-aid fix for win32 build failure
Steffen Mueller [Mon, 16 May 2011 18:24:33 +0000 (20:24 +0200)]
Attempt band-aid fix for win32 build failure

10 years agoAdd is_empty method to EU::Typemaps
Steffen Mueller [Sun, 17 Apr 2011 15:13:43 +0000 (17:13 +0200)]
Add is_empty method to EU::Typemaps

10 years agoUse lower case method name for current_line_number
Steffen Mueller [Sun, 17 Apr 2011 12:16:36 +0000 (14:16 +0200)]
Use lower case method name for current_line_number

My fault for botching this up originally, sorry.

10 years agoLose $Fallback global
Steffen Mueller [Sun, 17 Apr 2011 11:37:27 +0000 (13:37 +0200)]
Lose $Fallback global

10 years agoLose the $Overload global
Steffen Mueller [Sun, 17 Apr 2011 11:36:22 +0000 (13:36 +0200)]
Lose the $Overload global

10 years agoRemove superfluous global "$errors"
Steffen Mueller [Sun, 17 Apr 2011 11:18:13 +0000 (13:18 +0200)]
Remove superfluous global "$errors"

10 years agoMake $FH no longer a global
Steffen Mueller [Sun, 17 Apr 2011 11:15:52 +0000 (13:15 +0200)]
Make $FH no longer a global

This is lying of course. It's now in the global $self->{FH},
but this is still the first step to fix its globalness.

10 years agoFix some error messages
Steffen Mueller [Sun, 17 Apr 2011 09:14:22 +0000 (11:14 +0200)]
Fix some error messages

10 years agoError handling/message improvements
Steffen Mueller [Sat, 16 Apr 2011 14:58:57 +0000 (16:58 +0200)]
Error handling/message improvements

- Move line number calculation to separate method
- Make death/Warn/blurt proper methods
  They pretended to be methods all along, but never were.
- Pass XS file name and line no. to typemap parser
  ... for better error messages from the typemap parser in
  case of embedded typemaps

10 years agoAllow overriding line numbers and files while parsing strings
Steffen Mueller [Sat, 16 Apr 2011 14:57:36 +0000 (16:57 +0200)]
Allow overriding line numbers and files while parsing strings

When parsing typemaps from strings, we used to print in-string
line numbers and <string> as the file name. In case of embedded
typemaps in XS code, we really want to refer back to the line
number and name of the XS file. This is now possible.

10 years agoSupport for embedded typemaps in XS
Steffen Mueller [Sat, 16 Apr 2011 13:39:18 +0000 (15:39 +0200)]
Support for embedded typemaps in XS

This implements embedded typemap documents with a heredoc-like
syntax. In your XS, use a block like the following:

TYPEMAP: <<END
Foo* T_SOMETHING

INPUT
T_SOMETHING
code
END

10 years agoUpdate docs and exports to be in line with reality
Steffen Mueller [Sat, 16 Apr 2011 12:57:14 +0000 (14:57 +0200)]
Update docs and exports to be in line with reality

10 years agocheck_conditional_preprocessor_statements is not a method
Steffen Mueller [Sat, 19 Feb 2011 16:01:26 +0000 (17:01 +0100)]
check_conditional_preprocessor_statements is not a method

Also, lose some unsightly undef()s.

10 years agoMake get_alias (nee GetAlias) a method
Steffen Mueller [Sat, 19 Feb 2011 15:55:34 +0000 (16:55 +0100)]
Make get_alias (nee GetAlias) a method

10 years agoMake print_section a method
Steffen Mueller [Sat, 19 Feb 2011 15:51:18 +0000 (16:51 +0100)]
Make print_section a method

As with previous changes, checking whether a localization of $_ or
something along those lines is acceptable remains to be done.

10 years agoTransform FOO_handlers to methods
Steffen Mueller [Sat, 19 Feb 2011 15:49:24 +0000 (16:49 +0100)]
Transform FOO_handlers to methods

10 years agoMore methods (merge_section)
Steffen Mueller [Sat, 19 Feb 2011 15:38:13 +0000 (16:38 +0100)]
More methods (merge_section)

10 years agoMake PushXSStack a method
Steffen Mueller [Sat, 19 Feb 2011 15:36:43 +0000 (16:36 +0100)]
Make PushXSStack a method

10 years agoTransform some functions into methods on the proto-object
Steffen Mueller [Sat, 19 Feb 2011 15:34:57 +0000 (16:34 +0100)]
Transform some functions into methods on the proto-object

10 years agoSome simple tests for errors
Steffen Mueller [Sat, 19 Feb 2011 13:02:03 +0000 (14:02 +0100)]
Some simple tests for errors

10 years agoBetter error checking/handling
Steffen Mueller [Sat, 19 Feb 2011 13:01:48 +0000 (14:01 +0100)]
Better error checking/handling

10 years agoEliminate four unsightly magical hash refs
Steffen Mueller [Fri, 18 Feb 2011 21:18:02 +0000 (22:18 +0100)]
Eliminate four unsightly magical hash refs

Previously, we'd be generating and passing around four lookup tables for
C-type to XS-type (type kind), C-type to prototype, XS-type to input map
code, and XS-type to output map code. This is now all handled by
ExtUtils::Typemaps.

10 years agoMake trailing whitespace a newline at all times
Steffen Mueller [Sat, 19 Feb 2011 13:01:25 +0000 (14:01 +0100)]
Make trailing whitespace a newline at all times

10 years agouse warnings
Steffen Mueller [Fri, 18 Feb 2011 21:17:50 +0000 (22:17 +0100)]
use warnings

10 years agoMake get_(in|out)putmap more flexible
Steffen Mueller [Fri, 18 Feb 2011 20:36:32 +0000 (21:36 +0100)]
Make get_(in|out)putmap more flexible

They now also accept ctypes which are resolved to xstypes via the
typemap section.

10 years agoAdd targetable method
Steffen Mueller [Sun, 13 Feb 2011 22:30:56 +0000 (23:30 +0100)]
Add targetable method

This does the same thing for a simple output map as the make_targetable
function in ExtUtils::ParseXS::Utilities does for all output maps. The
latter function is intended to be superseded by this new method.

10 years agoAdd comment explaining where terrible code comes from
Steffen Mueller [Sun, 13 Feb 2011 10:22:15 +0000 (11:22 +0100)]
Add comment explaining where terrible code comes from

... and it is not brought by the stork.

10 years agoDocument inception of EU::Typemaps
Steffen Mueller [Fri, 11 Feb 2011 18:01:18 +0000 (19:01 +0100)]
Document inception of EU::Typemaps

10 years agoBless singleton
Steffen Mueller [Fri, 11 Feb 2011 17:42:53 +0000 (18:42 +0100)]
Bless singleton

10 years agoNah, implicit is bad
Steffen Mueller [Fri, 11 Feb 2011 17:37:41 +0000 (18:37 +0100)]
Nah, implicit is bad

10 years agoLose now obsolete process_single_typemap()
Steffen Mueller [Fri, 11 Feb 2011 17:35:31 +0000 (18:35 +0100)]
Lose now obsolete process_single_typemap()

This was the actual typemap parser. It is now parsed by
ExtUtils::Typemaps, so we don't need it any more!

10 years agoMake ExtUtils::ParseXS use ExtUtils::Typemaps
Steffen Mueller [Fri, 11 Feb 2011 17:31:44 +0000 (18:31 +0100)]
Make ExtUtils::ParseXS use ExtUtils::Typemaps

This is just the quick'n'dirty conversion to make it use
EU::Typemaps. Eventually, we want to use it in its full object-oriented
goodness!

10 years agoDo not use Carp, fix propagation of replace/skip
Steffen Mueller [Sun, 13 Feb 2011 20:00:53 +0000 (21:00 +0100)]
Do not use Carp, fix propagation of replace/skip

Using Carp in a module this early in the toolchain can cause ugly
failure. Carp can trigger loading overload. overload::StrVal can trigger
loading Scalar::Util. Scalar::Util::PP requires B. miniperl doesn't like
loading shared libraries.

This problem with Carp just shadowed the underlying problem that the
replace/skip options weren't propagated correctly.

10 years agoDefer loading main module
Steffen Mueller [Sun, 13 Feb 2011 19:22:03 +0000 (20:22 +0100)]
Defer loading main module

10 years agoMore whitespace bug-compatibility
Steffen Mueller [Sun, 13 Feb 2011 19:13:45 +0000 (20:13 +0100)]
More whitespace bug-compatibility