summaryrefslogtreecommitdiff
path: root/mathoms.c
Commit message (Collapse)AuthorAgeFilesLines
* explicitly ignore the result of sv_utf8_downgrade()Tony Cook2022-08-081-1/+1
| | | | | | | Coverity complains about this because most other calls are checked. CIDs 353483, 353003, 353000, 352998, 352995
* Partially revert remove deprecated functions"Karl Williamson2022-06-281-0/+75
| | | | | | | | | | | This partially reverts commit 7008caa915ad99e650acf2aea40612b5e48b7ba2. Another portion was reverted by f847c0b367a25dc6028136ddc7085a7301da7a82. It turns out that two more of the removed functions are still used in cpan in several places. Revert their removal for now until a better alternative than any existing is in place and backported in ppport.h.
* Revert "Partially remove deprecated functions"Karl Williamson2022-06-251-0/+25
| | | | | | | | | | | This partially reverts commit 7008caa915ad99e650acf2aea40612b5e48b7ba2. It turns out that one of the removed functions, utf8n_to_uvuni(), is still used in cpan in several prominent places. In thinking about this, I believe we should write a better API function to recommend to these distros to change to, before we remove the deprecated one. I will start an investigation.
* Restore wrongly deleted pod for sv_pvutf8Karl Williamson2022-06-101-3/+9
|
* Remove pod for non-existent functionsKarl Williamson2022-06-101-19/+0
| | | | | 7008caa915ad99e650acf2aea40612b5e48b7ba2 removed several deprecated functions, but did not remove all the pods thereof.
* Remove deprecated functionsKarl Williamson2022-06-051-532/+0
| | | | | Most of these have been deprecated for a long time; and we've never bothered to follow through in removing them. This commit does that.
* mathoms.c: Comment about PERL_NO_SHORT_NAMESKarl Williamson2022-05-081-0/+3
|
* perlapi: Consolidate sv_usepvn(_flags)? entriesKarl Williamson2022-05-081-19/+0
|
* perlapi,perlintern: Add tainting sectionKarl Williamson2022-05-061-1/+1
| | | | | | Tainting is so specialized that things dealing with it are better gathered together in one place. This commit moves the existing docs for such API into the new section
* mathoms.c pod: Add perlapi section namesKarl Williamson2022-05-061-0/+22
| | | | | | | | | | | | | | This adds section names of what section each non-adjacent function should go into in perlapi, perlintern. Sections are in effect until the next command changing it. As functions are added/removed from this file, they may inadvertently get placed in the wrong api section by virtue of inheriting the previous section name. Guard against that by specifying the proper section the pod for each function that is not in the same pod /* comment */ as another function. This change fixed a bug where one function was shown in the wrong section in perlapi.
* replace all instances of PERL_IMPLICIT_CONTEXT with MULTIPLICITYTomasz Konojacki2021-06-091-2/+2
| | | | | | | | | | | | Since the removal of PERL_OBJECT (acfe0abcedaf592fb4b9cb69ce3468308ae99d91) PERL_IMPLICIT_CONTEXT and MULTIPLICITY have been synonymous and they're being used interchangeably. To simplify the code, this commit replaces all instances of PERL_IMPLICIT_CONTEXT with MULTIPLICITY. PERL_IMPLICIT_CONTEXT will stay defined for compatibility with XS modules.
* style: Detabify indentation of the C code maintained by the core.Michael G. Schwern2021-01-171-47/+47
| | | | | | | | | | | This just detabifies to get rid of the mixed tab/space indentation. Applying consistent indentation and dealing with other tabs are another issue. Done with `expand -i`. * vutil.* left alone, it's part of version. * Left regen managed files alone for now.
* perlapi: Note proper rplcemnt for pad_compname_typeKarl Williamson2020-11-221-0/+2
|
* perlapi: Consolidate sv_catsv-ish entriesKarl Williamson2020-11-171-8/+0
|
* perlapi: Consolidate sv_catpvn-ish entriesKarl Williamson2020-11-171-8/+0
|
* sv.c: Change some formal param names for clarity, consistencyKarl Williamson2020-11-091-10/+10
| | | | | | The names previously indicated some things were strings that weren't necessarily so. Some nearly identical functions had varying parameter names.
* autodoc.pl: Enhance apidoc_section featureKarl Williamson2020-11-061-6/+6
| | | | | | | | | | | This feature allows documentation destined for perlapi or perlintern to be split into sections of related functions, no matter where the documentation source is. Prior to this commit the line had to contain the exact text of the title of the section. Now it can be a $variable name that autodoc.pl expands to the title. It still has to be an exact match for the variable in autodoc, but now, the expanded text can be changed in autodoc alone, without other files needing to be updated at the same time.
* Cast parameters to instr, strstrKarl Williamson2020-11-021-1/+1
| | | | | This code isn't apparently compiled on modern platforms, as when I tried to force them to compile, I had to do this.
* perlapi: deprecate pack_cat() (a mathoms func)Karl Williamson2020-09-051-1/+1
|
* Reorganize perlapiKarl Williamson2020-09-041-1/+7
| | | | | This uses a new organization of sections that I came up with. I asked for comments on p5p, but there were none.
* Fix a bunch of repeated-word typosDagfinn Ilmari Mannsåker2020-05-221-1/+1
| | | | | Mostly in comments and docs, but some in diagnostic messages and one case of 'or die die'.
* Move some obsolete UTF-8 handling fcns to mathomsKarl Williamson2020-02-191-0/+96
| | | | | Two of the functions are internal to the core; the third has long been deprecated.
* mathoms.c,utf8.c: Update to use UTF8_CHK_SKIPKarl Williamson2019-11-031-2/+3
| | | | | This new macro expands to what these did. Update to use the common code.
* PATCH: Character class code broke MSWin32 compilationKarl Williamson2019-11-031-152/+0
| | | | | | | | | I'm not sure why this didn't show up elsewhere, but we have embed.fnc entries for non-existent functions that should have been removed in dd1a3ba7882ca70c1e85b0fd6c03d07856672075. In addition, I see several more functions that should have been removed, and this commit removes them.
* Rmv more deprecated characlassify/case change macrosKarl Williamson2019-10-311-88/+0
| | | | These were missed by 059703b088f44d5665f67fba0b9d80cad89085fd.
* mathoms: Restore fcns accidentally deletedKarl Williamson2019-09-301-0/+72
| | | | | | | | | Commit x059703b088f44d5665f67fba0b9d80cad89085fd removed more code than was intended. This commit restores the missing functions. This showed up in MSWin32 builds, I presume VMS as well. Spotted by Tony Cook
* Remove deprecated character classification/case changing macrosKarl Williamson2019-09-291-305/+0
| | | | | | | | | | | | | | It has been deprecated since 5.26 to use various macros that deal with UTF-8 inputs but don't have a parameter indicating the maximum length beyond which we should not look. This commit changes all such macros, as threatened in existing documentation and warning messages, to have an extra parameter giving the length. This was originally scheduled to happen in 5.30, but was delayed because it broke some CPAN modules, and there wasn't really a good way around it. But now that Devel::PPPort 3.54 is out, ppport.h has new facilities for getting modules making these changes to work with older Perl releases.
* embed.fnc: Change some 'x' marked fcns to 'C'Karl Williamson2019-09-151-2/+2
| | | | | | | The previous commit added the C flag, which is better to use in many instances than x. This commit changes the x entries in embed.fnc that I'm pretty sure would be better off being C, and removes some 'x' entries for internal only functions
* mathoms.c: Add commentKarl Williamson2019-09-151-0/+4
|
* PATCH: [perl #134405] Compiler warnings in bleadKarl Williamson2019-09-121-0/+6
| | | | | | | | | | | | | | This was caused by functions that should have been deprecated all along, and now are. But they are still called in places. In most instances one deprecated function is a wrapper for another. In one instance, the calling of the function is to just make sure that mathoms.o gets linked to. The solution adopted here, some of which was suggested by Tony Cook, is to use #pragmas to silence the warnings. By doing this around the entirety of mathoms.c, future issues will most likely be avoided. And there are unlikely to enough future cases outside of mathoms to cause a problem.
* Implement SvPVutf8_nomg and SvPVbyte_nomgPali2019-09-021-0/+16
|
* Implement sv_utf8_downgrade_nomgPali2019-09-021-0/+8
|
* Remove redundant info on =for apidoc linesKarl Williamson2019-05-301-1/+1
| | | | | | | | | This information is already in embed.fnc, and we know it compiles. Some of this information is now out-of-date. Get rid of it. There was one bit of information that was (apparently) wrong in embed.fnc. The apidoc line asked that there be no usage example generated for newXS. I added that flag to the embed.fnc entry.
* Add newSVsv_nomg() macro which is like newSVsv() but does not process get magicPali2019-02-251-0/+6
| | | | Both newSVsv() and newSVsv_nomg() are now implemented via new Perl_newSVsv_flags() function.
* Eliminated 3 '-Wparentheses' warnings detected by g++-8.James E Keenan2018-10-101-2/+2
| | | | For: RT # 133557
* mathoms.c: Use my_strnlen, not strnlenKarl Williamson2018-08-041-1/+1
| | | | Spotted by H. Merijn Brand.
* mathoms.c: Make safer a deprecated functionKarl Williamson2018-08-031-2/+3
| | | | | | | This function is deprecated because it is lacking a length parameter, so malformed UTF-8 may cause it to read beyond the buffer. This commit causes it to not read beyond a NUL character, which makes it safe for the common case that the input is a C string.
* Revert "Remove some deprecated functions from mathoms.c"Karl Williamson2018-07-191-0/+241
| | | | | | This reverts commit e6e9f5a198d7e054e6857a9c6e99a07d639f7f3c. I think it best to revert this until I'm ready for stating in perldelta exactly the options for replacing uses of these functions.
* Remove some deprecated functions from mathoms.cKarl Williamson2018-06-281-241/+0
| | | | | These have been deprecated since 5.18, and have security issues, as they can try to read beyond the end of the buffer.
* fix -DNO_MATHOMS build, mathomed syms were not removed from perldll.defDaniel Dragan2018-04-151-0/+2
| | | | | | | | | | | | | | | | | | | Commit 3f1866a8f6 assumed "A" flag means a function can't be mathomed. Not true. Many funcs were listed in embed.fnc as "A" yet were in mathoms.c. This caused a missing symbol link failure on Win32 with -DNO_MATHOMS, since the "A" mathomed funcs were now put into perlldll.def while previously they were parsed out of mathoms.c by makedef.pl. Revise the logic so "b" means instant removal from the export list on a no mathoms build. embed.fnc "b" flag adds were generated from a missing symbol list from my linker, some funcs not in my build/platform config might need to be "b" flagged in future. Some funcs like ASCII_TO_NEED were already marked "b" but still being by mistake exported because they were also "A". sv_2bool, sv_eq and sv_collxfrm also needed a "p" flag or a Perl_-less symbol was declared in proto.h. sv_2bool and sv_collxfrm also failed porting/args_assert.t so add those macros to mathoms.c
* Move utf8_to_uvchr out of mathoms.cKarl Williamson2018-04-151-30/+0
| | | | | | This function can't be in mathoms because of its use in Devel::PPPort. I tried fixing that, but the tools just hung, so this commit moves it back to utf8.c, while still deprecated.
* widen size-type variables in pack/unpackZefram2017-12-161-1/+1
| | | | | | Most size-type variables in pp_pack.c were of type I32, with a smattering of other types. Use SSize_t in place of I32, and generally use size_t-width variables as appropriate. Fixes [perl #119367].
* Use cBOOL() instead of ? TRUE : FALSEDagfinn Ilmari Mannsåker2017-01-251-4/+2
| | | | Except under cpan/ and dist/
* regcomp.c, mathoms.c: Convert to use preferred macroKarl Williamson2016-12-231-4/+4
| | | | Better to use the macro than to directly call the function it wraps
* Clean up warnings uncovered by 'clang -Weverything'.Andy Lester2016-12-051-0/+2
| | | | For: RT #130195
* inline.h: Add 'const's; avoid hiding outer variableKarl Williamson2016-09-171-1/+1
| | | | | This changes some formal parameters to be const, and avoids reusing the same variable name within an inner block, to avoid confusion
* mathoms.c: Restore previous behaviour of sv_copypvFather Chrysostomos2016-08-111-1/+1
| | | | | | | | | | | | | | | This commit made it a simple wrapper around the new sv_copypv_flags: commit 4bac9ae47b5ad7845a24e26b0e95609805de688a Author: Chip Salzenberg <chip@pobox.com> Date: Fri Jun 22 15:18:18 2012 -0700 Magic flags harmonization. But in so doing it changed the behaviour of the functional version (Perl_sv_copypv), while preserving the existing behaviour in the new macro (sv_copypv). The latter invokes get-magic, while the former used to but stopped doing so.
* Unmathomize save_ivFather Chrysostomos2016-07-271-11/+0
| | | | I need to call it from toke.c.
* mv function from locale.c to mathoms.cKarl Williamson2016-05-241-0/+12
| | | | | | The previous commit causes this function being moved to be just a wrapper not called in core. Just in case someone is calling it, it is retained, but moved to mathoms.c
* mathoms.c: Remove obsolete textKarl Williamson2016-05-241-3/+0
| | | | | makedef.pl no longer needs special handling for any functions that get moved to mathoms.c