Father Chrysostomos [Sun, 17 Jul 2011 05:13:54 +0000 (22:13 -0700)]
Skip tests sub_lval.t when attributes.pm cannot load
(e.g., under miniperl)
Father Chrysostomos [Sun, 17 Jul 2011 05:09:46 +0000 (22:09 -0700)]
Correct skip count in perlio.t
This makes it pass under miniperl again.
Father Chrysostomos [Sun, 17 Jul 2011 04:11:01 +0000 (21:11 -0700)]
perldelta update
Father Chrysostomos [Sun, 17 Jul 2011 02:14:23 +0000 (19:14 -0700)]
porting/rmg: Expand on CoreList version bump
Father Chrysostomos [Sun, 17 Jul 2011 01:42:59 +0000 (18:42 -0700)]
Rename store/fetch_cop_label as cop_*
This makes them consistent with other functions that put the basic
datum type first (like hv_*, sv_*, cophh_*).
Since fetch_cop_label is marked as experimental (M), this change
should be OK.
Reini Urban [Tue, 21 Jun 2011 12:55:56 +0000 (07:55 -0500)]
Export store_cop_label for the perl compiler
Father Chrysostomos [Sat, 16 Jul 2011 21:33:27 +0000 (14:33 -0700)]
Clean up magic_methcall docs
This is rather unsightly, don’t you think?
magic_methcall
Invoke a magic method (like FETCH).
* sv and mg are the tied thingy and the tie magic; * meth is
the name of the method to call; * argc is the number of args
(in addition to $self) to pass to the method;
the args themselves are any values following the argc
argument. * flags:
G_DISCARD: invoke method with G_DISCARD flag and don’t
return a value
G_UNDEF_FILL: fill the stack with argc pointers to
PL_sv_undef.
Returns the SV (if any) returned by the method, or NULL on
failure.
(That’s the ‘rendered’ nroff output.)
I would have used =over/=item/=back, but autodoc.pl doesn’t seem to
like those.
Karl Williamson [Sat, 16 Jul 2011 19:46:48 +0000 (13:46 -0600)]
perlos2: Fix some link issues
The link to emxbind needs some explanation. Perhaps on an os/2 system,
this command exists, but any link to it is using cpan's search which
doesn't find it
Karl Williamson [Sat, 16 Jul 2011 19:28:38 +0000 (13:28 -0600)]
perl5123delta: should have NAME perl5123delta
Karl Williamson [Sat, 16 Jul 2011 19:20:29 +0000 (13:20 -0600)]
basename: Change C<> to L<>
Karl Williamson [Sat, 16 Jul 2011 18:43:28 +0000 (12:43 -0600)]
perlbeos: change some C<>'s into F<>'s
Karl Williamson [Sat, 16 Jul 2011 18:31:15 +0000 (12:31 -0600)]
README.bs2000: lowercase perlBS200 to unbreak links
Karl Williamson [Sat, 16 Jul 2011 18:22:08 +0000 (12:22 -0600)]
perlport: remove perlapollo link
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.
Father Chrysostomos [Sat, 16 Jul 2011 19:49:47 +0000 (12:49 -0700)]
More apidoc entries need \n\n before =cut
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
)
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 ;-)
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
Father Chrysostomos [Sat, 16 Jul 2011 05:06:49 +0000 (22:06 -0700)]
Wrap argument lists in perl{api,intern}.pod
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.
Nicholas Clark [Fri, 15 Jul 2011 18:05:04 +0000 (20:05 +0200)]
Sort globvar.sym lexically.
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%% (!)
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
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!)
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.
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
Craig A. Berry [Thu, 14 Jul 2011 22:20:41 +0000 (17:20 -0500)]
A typemap is a file, not a directory.
Steffen Mueller [Thu, 14 Jul 2011 17:25:02 +0000 (19:25 +0200)]
Perldelta for Dave's short-circuit optimization
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++;
}
}
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.
Leon Brocard [Thu, 14 Jul 2011 14:00:07 +0000 (15:00 +0100)]
Add Porting/acknowledgements.pl to generate perldelta acknowledgements
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).
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.
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>
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.
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.
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.
Father Chrysostomos [Thu, 14 Jul 2011 05:14:49 +0000 (22:14 -0700)]
perldelta update
Father Chrysostomos [Thu, 14 Jul 2011 05:14:30 +0000 (22:14 -0700)]
Ahem,
0fce7163 was not enough
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.
Florian Ragwitz [Wed, 13 Jul 2011 17:22:41 +0000 (19:22 +0200)]
Remove an unused variable
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.
Florian Ragwitz [Wed, 13 Jul 2011 15:26:42 +0000 (17:26 +0200)]
Dual-life Term::Complete
Father Chrysostomos [Wed, 13 Jul 2011 15:39:14 +0000 (08:39 -0700)]
perldelta for the SvIsCOW fix
Father Chrysostomos [Wed, 13 Jul 2011 15:33:04 +0000 (08:33 -0700)]
perldelta for recent SvREADONLY fixes
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’.
Father Chrysostomos [Wed, 13 Jul 2011 04:38:17 +0000 (21:38 -0700)]
Fix perlintern links; regen known pod issues
Father Chrysostomos [Wed, 13 Jul 2011 04:32:06 +0000 (21:32 -0700)]
Add a test count to fresh_perl_utf8.t
Father Chrysostomos [Wed, 13 Jul 2011 03:41:57 +0000 (20:41 -0700)]
Add Brian Fraser to AUTHORS
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.
Brian Fraser [Sat, 11 Jun 2011 18:53:43 +0000 (15:53 -0300)]
Cleaned up warning messages in pad.c, plus related tests.
Brian Fraser [Sat, 11 Jun 2011 18:38:11 +0000 (15:38 -0300)]
Tests for the pad cleanup.
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.
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.
Brian Fraser [Sat, 11 Jun 2011 17:34:51 +0000 (14:34 -0300)]
Passing the flag to the pad functions in toke.c
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.
Brian Fraser [Sun, 10 Jul 2011 18:06:47 +0000 (11:06 -0700)]
pad.c: flags checking for the UTF8 flag when necessary
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.
Brian Fraser [Sat, 11 Jun 2011 16:29:54 +0000 (13:29 -0300)]
Added a flags parameter to pad_findlex.
Zefram [Sun, 12 Dec 2010 21:10:22 +0000 (21:10 +0000)]
API tests for pad_findmy_*()
Zefram [Sun, 12 Dec 2010 20:09:00 +0000 (20:09 +0000)]
API test for find_rundefsv()
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.
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.
Florian Ragwitz [Tue, 12 Jul 2011 20:59:56 +0000 (22:59 +0200)]
Move perlxs{,tut}.pod into the ExtUtils-ParseXS dist
Florian Ragwitz [Tue, 12 Jul 2011 21:20:12 +0000 (23:20 +0200)]
Skip .xs files in t/ dirs when comparing versions
Florian Ragwitz [Tue, 12 Jul 2011 21:18:06 +0000 (23:18 +0200)]
podcheck.t --regen after the ParseXS merge
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!
Steffen Mueller [Tue, 12 Jul 2011 20:10:56 +0000 (22:10 +0200)]
Fill in ExtUtils::ParseXS versions in delta
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
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.
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.)
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.
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.
Steffen Mueller [Tue, 12 Jul 2011 19:57:49 +0000 (21:57 +0200)]
Document full changeset in ExtUtils::ParseXS
Steffen Mueller [Tue, 12 Jul 2011 19:52:51 +0000 (21:52 +0200)]
Bump ExtUtils::ParseXS version to a dev version
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!
Steffen Mueller [Tue, 12 Jul 2011 19:22:52 +0000 (21:22 +0200)]
Document the ExtUtils::ParseXS changes in perldelta
Steffen Mueller [Mon, 16 May 2011 18:24:33 +0000 (20:24 +0200)]
Attempt band-aid fix for win32 build failure
Steffen Mueller [Sun, 17 Apr 2011 15:13:43 +0000 (17:13 +0200)]
Add is_empty method to EU::Typemaps
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.
Steffen Mueller [Sun, 17 Apr 2011 11:37:27 +0000 (13:37 +0200)]
Lose $Fallback global
Steffen Mueller [Sun, 17 Apr 2011 11:36:22 +0000 (13:36 +0200)]
Lose the $Overload global
Steffen Mueller [Sun, 17 Apr 2011 11:18:13 +0000 (13:18 +0200)]
Remove superfluous global "$errors"
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.
Steffen Mueller [Sun, 17 Apr 2011 09:14:22 +0000 (11:14 +0200)]
Fix some error messages
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
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.
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
Steffen Mueller [Sat, 16 Apr 2011 12:57:14 +0000 (14:57 +0200)]
Update docs and exports to be in line with reality
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.
Steffen Mueller [Sat, 19 Feb 2011 15:55:34 +0000 (16:55 +0100)]
Make get_alias (nee GetAlias) 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.
Steffen Mueller [Sat, 19 Feb 2011 15:49:24 +0000 (16:49 +0100)]
Transform FOO_handlers to methods
Steffen Mueller [Sat, 19 Feb 2011 15:38:13 +0000 (16:38 +0100)]
More methods (merge_section)
Steffen Mueller [Sat, 19 Feb 2011 15:36:43 +0000 (16:36 +0100)]
Make PushXSStack a method
Steffen Mueller [Sat, 19 Feb 2011 15:34:57 +0000 (16:34 +0100)]
Transform some functions into methods on the proto-object
Steffen Mueller [Sat, 19 Feb 2011 13:02:03 +0000 (14:02 +0100)]
Some simple tests for errors
Steffen Mueller [Sat, 19 Feb 2011 13:01:48 +0000 (14:01 +0100)]
Better error checking/handling
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.
Steffen Mueller [Sat, 19 Feb 2011 13:01:25 +0000 (14:01 +0100)]
Make trailing whitespace a newline at all times