summaryrefslogtreecommitdiff
path: root/perlapi.c
Commit message (Collapse)AuthorAgeFilesLines
* [PATHC] sharedsv.[c|h]Jarkko Hietaniemi2001-08-131-0/+51
| | | | | | | | | | | | | | | | | | | | | | From: "Artur Bergman" <artur@contiller.se> Date: Mon, 13 Aug 2001 14:38:41 +0200 Message-ID: <005401c123f4$e1f53360$21000a0a@vogw2kdev> Subject: [PATCH] embed.pl From: Arthur Bergman <arthur@contiller.se> Date: Mon, 13 Aug 2001 14:38:14 +0200 Message-ID: <B79D96D6.3088%arthur@contiller.se> Subject: [PATCH] sharedsv cleanups From: "Arthur Bergman" <arthur@contiller.se> Date: Mon, 13 Aug 2001 15:14:25 +0200 Message-ID: <005a01c123f9$dfe525d0$21000a0a@vogw2kdev> Plus few tweaks: _init needs to be Adp, the prototypes should not be revealed unless using ithreads, #endif FOO must be #endif /* FOO */, adding (parentheses) around do { } while doesn't work too well. p4raw-id: //depot/perl@11659
* Make perl fork()-safe (in a slightly limited way) even onGurusamy Sarathy2001-07-201-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | platforms that don't have pthread_atfork() (extension of the fix in change#11151). Note that this will not help extensions that call fork() directly in C, or that link to libraries that call fork() directly. Such cases must be fixed to either call PerlProc_fork(), or call atfork_lock() in parent before the calling the function that forks and call atfork_unlock() in both parent and child immediately after the fork(). (There are no worries if C code calls exec() in the child immediately after a fork(). Only cases where the child calls perl's API functions (including New()) after the fork() are problematic.) This change also eliminates the use of vfork() from perl, since all such uses were violating the severe restrictions on modifying the state of the process between the vfork() and the exec(). This is a modified version of patches suggested by Abhijit Menon-Sen and Richard Soderberg. p4raw-link: @11151 on //depot/perl: 50dd6e574ff39b609595ddb16b2fe9f625a26f8c p4raw-id: //depot/perl@11423
* Perl_re_dup()Abhijit Menon-Sen2001-07-121-2/+2
| | | | | Message-ID: <20010712235432.J24707@lustre.dyn.wiw.org> p4raw-id: //depot/perl@11321
* rename s/sv_getcwd/getcwd_sv/ for better conformance to existingGurusamy Sarathy2001-07-021-3/+3
| | | | | | | | | | naming discipline win32 fix: enable getcwd_sv() to work on windows (POSIX.t was failing because of this) fix a warning about "fd" being used without being set in Cwd.xs p4raw-id: //depot/perl@11067
* Retract the #10417 mg.c and embed.pl parts because ofJarkko Hietaniemi2001-06-211-1/+1
| | | | | | strange SEGVs in 64bit x86 FreeBSD observed by Nicholas Clark. p4raw-id: //depot/perl@10798
* Regen headers.Jarkko Hietaniemi2001-06-201-14/+14
| | | p4raw-id: //depot/perl@10758
* Replace our implementation of realpath() with OpenBSD'sJarkko Hietaniemi2001-06-201-7/+0
| | | | | (src/lib/libc/stdlib/realpath.c 1.4). p4raw-id: //depot/perl@10750
* After some reading I don't think we can blindlyJarkko Hietaniemi2001-06-201-2/+2
| | | | | | | | | use systems' realpath(). Too many security problems, too many buggy implementations. TODO: the realpath() emulation code in util.c doesn't seem fully operational? (readlink(), for example?) p4raw-id: //depot/perl@10744
* Split off the pack/unpack code, from Nicholas Clark.Jarkko Hietaniemi2001-06-181-0/+2
| | | p4raw-id: //depot/perl@10685
* splitting util.cHugo van der Sanden2001-06-131-0/+2
| | | | | Message-Id: <200106132341.AAA24935@crypt.compulink.co.uk> p4raw-id: //depot/perl@10579
* Small bcopy cleanupAndy Dougherty2001-06-131-1/+1
| | | | | Message-ID: <Pine.SOL.4.10.10106121706360.11034-100000@maxwell.phys.lafayette.edu> p4raw-id: //depot/perl@10542
* Move the grok_number and its lieutenant grok_numeric_radixJarkko Hietaniemi2001-06-101-1/+15
| | | | | from sv.c statics to util.c and public. p4raw-id: //depot/perl@10505
* APIfy op_clear Simon Cozens2001-06-031-1/+14
| | | | | | | Message-ID: <20010603135146.A9984@deep-dark-truthful-mirror.pmb.ox.ac.uk> (despite the subject line, op_null is APIfied by the patch) p4raw-id: //depot/perl@10400
* Re: [ID 20010529.006] String plus zero inconsistent across platformsHugo van der Sanden2001-06-011-0/+7
| | | | | Message-Id: <200105311949.UAA02798@crypt.compulink.co.uk> p4raw-id: //depot/perl@10379
* [patch] Cwd.xs optimizations/abstractionDoug MacEachern2001-06-011-0/+14
| | | | | Message-ID: <Pine.LNX.4.21.0105311733270.732-100000@mako.covalent.net> p4raw-id: //depot/perl@10369
* Re: 5.6.*, bleadperl: bugs in pp_concatHugo van der Sanden2001-05-261-0/+42
| | | | | Message-Id: <200105261605.RAA12295@crypt.compulink.co.uk> p4raw-id: //depot/perl@10223
* Regen headers for #10221.Jarkko Hietaniemi2001-05-261-0/+7
| | | p4raw-id: //depot/perl@10222
* Change PL_numeric_radix to PL_numeric_radix_sv (and leave inJarkko Hietaniemi2001-04-301-2/+23
| | | | | | a dummy for PL_numeric_radix); no pressing reason to break binary compatibility; regen API. p4raw-id: //depot/perl@9910
* Integrate changes #9584,9587 from maintperl into mainline.Jarkko Hietaniemi2001-04-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | keep eval"" CVs alive until the end of the statement in which they're called add README.macos (from Chris Nandor) tyop in change#9555 p4raw-link: @9587 on //depot/maint-5.6/perl: d72c2fc956b5cb46ede17d06f89a463c78f1cf5f p4raw-link: @9584 on //depot/maint-5.6/perl: e6fbcc36a54a8afd8dbcdcb9a8d8e178df530b97 p4raw-link: @9555 on //depot/perl: 6a0af2f17bcde4767b90a72eff7083c5effff21d p4raw-id: //depot/perl@9588 p4raw-branched: from //depot/maint-5.6/perl@9583 'branch in' README.macos p4raw-integrated: from //depot/maint-5.6/perl@9583 'copy in' pod/perlfaq9.pod (@9585..) 'merge in' scope.h (@8568..) pod/perl.pod (@8986..) MANIFEST (@9227..) win32/Makefile (@9286..) pp_ctl.c scope.c (@9288..) global.sym (@9289..) embed.h embed.pl objXSUB.h perlapi.c proto.h (@9292..) pod/buildtoc.PL (@9312..) win32/makefile.mk (@9495..) sv.c (@9496..) pod/perlguts.pod (@9514..)
* Generated files.Nick Ing-Simmons2001-03-241-0/+7
| | | p4raw-id: //depot/perlio@9319
* Integrate change #9154 from maintperl to mainline.Jarkko Hietaniemi2001-03-141-0/+12
| | | | | | | | | | | | PerlIO_stdoutf() wasn't properly supported under PERL_IMPLICIT_SYS (caused Storable 1.0.10 to break on windows) p4raw-link: @9154 on //depot/maint-5.6/perl: 241ea079897f140daac27d059c9935e78ec152ec p4raw-id: //depot/perl@9156 p4raw-integrated: from //depot/maint-5.6/perl@9155 'copy in' globals.c (@5902..) 'merge in' global.sym (@8599..) iperlsys.h (@8800..) objXSUB.h perlapi.c (@8993..) embed.h embed.pl proto.h (@9108..)
* EBCDIC sanity - phase INick Ing-Simmons2001-03-101-9/+30
| | | | | | | | | | | | | | - rename utf8/uv functions to indicate what sort of uv they provide (uvuni/uvchr) - use utf8n_xxxx (c.f. pvn) for forms which take length. - back out vN.N and $^V exceptions to e2a/a2e - make "locale" isxxx macros be uvchr (may be redundant?) Not clear yet that toUPPER_uni et. al. return being handled correctly. The tr// and rexexp stuff still needs an audit, assumption is they are working in Unicode space. Need to provide v5.6 names for XS modules (decide is uni or chr ?). p4raw-id: //depot/perlio@9096
* Encode API documentation nd tidy up.Nick Ing-Simmons2001-02-241-2/+2
| | | | | | | Minor additions to test. Tweaks sv_utf8_upgrade() to force SvPV, and always SvUTF8_on and return length. Adds STRLEN to standard typemap. p4raw-id: //depot/perlio@8923
* [patch] perlio + useithreadsDoug MacEachern2001-02-231-2/+0
| | | | | | | Message-ID: <Pine.LNX.4.21.0102222356460.14249-100000@mako.covalent.net> Gets things running but not complete. p4raw-id: //depot/perl@8912
* Put back the #8840, it was innocent.Jarkko Hietaniemi2001-02-211-0/+7
| | | p4raw-id: //depot/perl@8870
* Retract the #8838 and #8840 for now because ofJarkko Hietaniemi2001-02-201-7/+0
| | | | | the DB_File tie problem. p4raw-id: //depot/perl@8846
* [patch] add sv_setref_uvDoug MacEachern2001-02-191-0/+7
| | | | | Message-ID: <Pine.LNX.4.21.0102181448290.10021-100000@mako.covalent.net> p4raw-id: //depot/perl@8840
* [patch] -WallDoug MacEachern2001-02-171-0/+4
| | | | | Message-ID: <Pine.LNX.4.21.0102161519500.30352-100000@mako.covalent.net> p4raw-id: //depot/perl@8815
* Merge ebcdic.c (only one function, ebcdic_control()) into util.c.Jarkko Hietaniemi2001-02-131-0/+2
| | | p4raw-id: //depot/perl@8783
* Generated files form 8713 etc.Nick Ing-Simmons2001-02-081-0/+14
| | | p4raw-id: //depot/perl@8716
* Patch from Inaba Hiroto:Jarkko Hietaniemi2001-01-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | - canonical UTF-8 hash keys: if a key string for a hash is UTF8-on, try downgrade the string and use it if unicode::distinct is not in effect. For the task, I added a function bytes_from_utf8() to utf8.c. It might resemble utf8_to_bytes() but it is not convenient to the task. Made a test for it and added to t/op/each.t - Changed do_print in doio.c to apply sv_utf8_(downgrade|upgrade) to the mortal copy of the argument SV. And changed t/io/utf8.t test 18 which expects print() to upgrade its argument. - re-implement sv_eq with bytes_from_utf8() - some bug fixes - tr/// does not handle UTF8 range (\x{}-\x{}) - \ before raw UTF8 character produced "Malformed UTF-8 character" warning. - "\x{100}\N{CENT SIGN}" is Malformed. Added tests for these 3. - and one silly bug (by me) with qu operator. p4raw-id: //depot/perl@8583
* RE: [PATCH perl@8269] Corrections for Perl_yylex_r (used by a reentrant ↵Roca, Ignasi2001-01-231-1/+0
| | | | | | | parser as Bison) Message-ID: <5930DC161690D21196670090271575470397E915@madt009a.siemens.es> p4raw-id: //depot/perl@8532
* Infrastructure to allow:Nick Ing-Simmons2001-01-201-0/+7
| | | | | | | | | | open($fh,"|-",@array); to be implemented i.e. mark pp_open as needing a stack mark, and make pp_open process its args in that style (and pass them _all_ to tied handles OPEN). Invent do_openn() which takes SV ** at allow it to see multiple args. Note this does not _do_ anything yet. p4raw-id: //depot/perlio@8484
* Integrate mainline.Nick Ing-Simmons2000-12-191-0/+16
| | | p4raw-id: //depot/perlio@8202
* Move the proto of start_glob() to a better place; regen api files.Jarkko Hietaniemi2000-12-131-1/+1
| | | p4raw-id: //depot/perl@8101
* Change PerlIO_(get|set)pos to take SV *Nick Ing-Simmons2000-12-071-0/+14
| | | | | Should fix, OS/2, VMS, (sfio??) p4raw-id: //depot/perlio@8025
* dTHR is a nop in 5.6.0 onwards. Ergo, it can go.Jarkko Hietaniemi2000-12-051-5/+5
| | | p4raw-id: //depot/perl@7984
* C<foreach my $x ...> in pseudo-fork()ed process may diddleGurusamy Sarathy2000-11-251-0/+7
| | | | | | | | | | parent's memory; fix it by keeping track of the actual pad offset rather than a raw pointer (this change is probably also relevant to non-ithreads case to avoid fallout from reallocs of the pad array, but is currently only enabled for the ithreads case in the interests of minimal disruption to existing "well tested" code) p4raw-id: //depot/perl@7858
* Introduce Perl_utf8_length(). Use it.Jarkko Hietaniemi2000-11-181-0/+7
| | | p4raw-id: //depot/perl@7744
* Integrate perlio:Jarkko Hietaniemi2000-11-041-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 7539] PerlIO infrastructure complete. [ 7538] Type tweaks + less contorted allocation scheme [ 7537] Fix for stdio as default "discipline" - PerlIO_init() was fdopen(2,"w")'ing a fresh FILE * rather than re-using stderr. Which meant PerlIO_stderr() was fully buffered rather than unbuffered (on Solaris, Linux seemed to do something sensible) which lead to some interesting fails. [ 7535] Implement stack of layers - (perlio.c _is_ derived from the old file honest...) - Works on Linux with perlio + unix stdio - Works on Solaris with perlio + unix - Fails ONE test (print to STDIN should fail) on Solaris with stdio. - Fails (hangs in openpid) if you try and stack perlio + stdio - Linux stdio's read() logic is hanging. [ 7492] Change files which are mysteriously different to mainline to be copies of mainline. [ 7491] Perlio fixes discovered on big-endian & very traditional Solaris: - typo in endian code in putc. - Don't allow read of write-only files and vice-versa - and off-by-one in flush-all loop. Remove debug calls as they were using GCC specific features. [ 7484] PerlIO passes all tests. [ 7482] Include <unistd.h> to get correct lseek() prototype etc. (I thought perl.h did that) - down to two fails - comp/require.t (last test) - lib/io_xs.t - possibly import/export of FILE * ? [ 7480] Fixed two bugs: - error code not being set on close (of broken pipe) - append mode was truncating. At least one seek/tell bug remains. [ 7479] Prototype (stdio-like) PerlIO passing basic tests. Checked in in case of accidents. Still several worrying fails, no line disciplines yet. p4raw-link: @7539 on //depot/perlio: f3862f8bcf6d3aa824432654b287f4ebd64db17f p4raw-link: @7538 on //depot/perlio: 05d1247b4b0324742a6edccf90ff347d8905fcdb p4raw-link: @7537 on //depot/perlio: c7fc522f3f7e35723803aaacf8c326dac22dae76 p4raw-link: @7535 on //depot/perlio: 9e353e3b7330a59ca210e75e4484e7762fcd1ce4 p4raw-link: @7492 on //depot/perlio: e9e021e644582e6ca1e9f6b4c1f1a8a7c7e2a58d p4raw-link: @7491 on //depot/perlio: f89522bf4daaf3c639b016283ffbace973e9c323 p4raw-link: @7484 on //depot/perlio: b1ef6e3bd726972447a8b536231f096656903bb3 p4raw-link: @7482 on //depot/perlio: 02f66e2f9235025f08502389e56df70aa71733c0 p4raw-link: @7480 on //depot/perlio: bb9950b796df42e2f824a072ae878c87e977be20 p4raw-link: @7479 on //depot/perlio: 6f9d8c32c6a78a47c6088f50d7051d779f712ee1 p4raw-id: //depot/perl@7547
| * Change files which are mysteriously different to mainline to beNick Ing-Simmons2000-10-301-1/+1
|/ | | | | copies of mainline. p4raw-id: //depot/perlio@7492
* Continue the internal UTF-8 API tweaking.Jarkko Hietaniemi2000-10-251-7/+7
| | | | | | | | Rename utf8_to_uv_chk() back to utf8_to_uv() because it's used much more than the simpler API, now called utf8_to_uv_simple(). Still not quite happy with API, too much partial duplication of functionality. p4raw-id: //depot/perl@7439
* Make the UTF-8 decoding stricter and more verbose whenJarkko Hietaniemi2000-10-241-6/+6
| | | | | | | | | | | | malformation happens. This involved adding an argument to utf8_to_uv_chk(), which involved changing its prototype, and prefer STRLEN over I32 for the UTF-8 length, which as a domino effect necessitated changing the prototypes of scan_bin(), scan_oct(), scan_hex(), and reg_uni(). The stricter UTF-8 decoding checking uses Markus Kuhn's UTF-8 Decode Stress Tester from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt p4raw-id: //depot/perl@7416
* Re: Creating const subs for constants.John Tobey2000-10-211-2/+2
| | | | | Message-Id: <m13mo0N-000FObC@feynman.localnet> p4raw-id: //depot/perl@7389
* Make scan_num() reëntrant, as suggested inRoca, Ignasi2000-10-201-2/+2
| | | | | | Subject: [PATCH perl@7229] Rentrant parser and yylex() Message-ID: <5930DC161690D211966700902715754702DA09CD@madt009a.siemens.es> p4raw-id: //depot/perl@7382
* Re-instate Perl_utf8_to_uv without checking parameter - added in change 7075.Nick Ing-Simmons2000-09-301-2/+9
| | | | | | | i.e. rename Simon's function to Perl_utf8_to_uv_chk, change all calls to it to use new name and add Perl_utf8_to_uv() as a wrapper which calls it passing 0 to checking to get the warning. p4raw-id: //depot/perl@7096
* utf8.c apidocSimon Cozens2000-09-141-2/+2
| | | | | Message-ID: <20000914234657.A13953@deep-dark-truthful-mirror.perlhacker.org> p4raw-id: //depot/perl@7087
* Hash lookup of constant strings optimization:Nick Ing-Simmons2000-09-031-1/+8
| | | | | | | | | | Introduce SvREADONLY && SvFAKE to flag an SV which has SvPVX pointing to string table (as per sharepvn). Add newSV_pvn_share to create such a thing. Make hv.c compare addresses of strings and skip string compare if equal. Make method_named and helem ops use these shared-string SVs when arg is constant. Make keys op return shared-string SVs (less clearly a win). p4raw-id: //depot/perl@7016
* Fix vec() / utf8 (was Re: bitvec ops still broken with utf8 -- or not?)Mike Guy2000-09-011-1/+1
| | | | | Message-Id: <E13Utuf-0004Bw-00@draco.cus.cam.ac.uk> p4raw-id: //depot/perl@6988
* Do away with array context, from Daniel Chetlin <daniel@chetlin.com>Jarkko Hietaniemi2000-08-081-0/+14
| | | | | | (either perlbug or p5p ate the original), plus regen perlapi and perltoc. p4raw-id: //depot/perl@6553