Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/perl5Public

Perl_do_print: stringify an SVt_IV IV/UV more efficiently#22927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
richardleach merged 5 commits intoPerl:bleadfromrichardleach:hydahy/iv2buf
Feb 10, 2025
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
uiv_2buf: code quality improvements suggested in GH#22927
  • Loading branch information
@richardleach
richardleach committedFeb 9, 2025
commit78e213803da3d2d316064b0698945e63d55e0345
25 changes: 13 additions & 12 deletionssv.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2817,8 +2817,8 @@ Perl_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, char **const
{
char *ptr = buf + TYPE_CHARS(UV);
char * const ebuf = ptr;
int sign;
U16*word_ptr, *word_table;
U16 *word_ptr;
U16const *word_table;

PERL_ARGS_ASSERT_UIV_2BUF;

Expand All@@ -2827,16 +2827,17 @@ Perl_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, char **const
/* we are going to read/write two bytes at a time */
word_ptr = (U16*)ptr;
word_table = (U16*)int2str_table.arr;

if (UNLIKELY(is_uv))
sign = 0;
else if (iv >= 0) {
uv = iv;
sign = 0;
} else {
/* Using 0- here to silence bogus warning from MS VC */
uv = (UV) (0 - (UV) iv);
sign = 1;
bool sign = false;
if (LIKELY(!is_uv)) {
if (iv >= 0) {
uv = iv;
} else {
/* This is NEGATE_2UV(iv), which can be found in handy.h. */
/* sv_inline.h does not include handy.h because the latter
* would then get included twice into .c files. */
uv = (ASSUME((iv) < 0), (UV)-((iv) + 1) + 1U);
sign = 1;
}
}

while (uv > 99) {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp