Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use base 2**30 for Python longs, when possible #49553

Closed
loewis mannequin opened this issue Feb 17, 2009 · 4 comments
Closed

Use base 2**30 for Python longs, when possible #49553

loewis mannequin opened this issue Feb 17, 2009 · 4 comments

Comments

@loewis
Copy link
Mannequin

loewis mannequin commented Feb 17, 2009

BPO 5303
Nosy @loewis, @mdickinson

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2009-02-17.22:42:04.128>
created_at = <Date 2009-02-17.22:39:20.364>
labels = ['invalid']
title = 'Use base 2**30 for Python longs, when possible'
updated_at = <Date 2009-02-18.06:21:31.013>
user = 'https://github.com/loewis'

bugs.python.org fields:

activity = <Date 2009-02-18.06:21:31.013>
actor = 'loewis'
assignee = 'none'
closed = True
closed_date = <Date 2009-02-17.22:42:04.128>
closer = 'loewis'
components = []
creation = <Date 2009-02-17.22:39:20.364>
creator = 'loewis'
dependencies = []
files = []
hgrepos = []
issue_num = 5303
keywords = []
message_count = 4.0
messages = ['82381', '82382', '82406', '82410']
nosy_count = 2.0
nosy_names = ['loewis', 'mark.dickinson']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue5303'
versions = []

@loewis
Copy link
Mannequin Author

loewis mannequin commented Feb 17, 2009

http://codereview.appspot.com/14105/diff/1/11
File Doc/library/sys.rst (right):

http://codereview.appspot.com/14105/diff/1/11#newcode418
Line 418: A struct sequence that holds information about Python's
I don't think the sequence interface is really important here. There
should be a way to easily define regular struct-like classes (with no
sequence interface). Perhaps structseq could be modified to drop
sequence interface, and new structseqs should turn it off usually.

http://codereview.appspot.com/14105/diff/1/6
File Include/longintrepr.h (right):

http://codereview.appspot.com/14105/diff/1/6#newcode24
Line 24: Furthermore, NSMALLNEGINTS and NSMALLPOSINTS should fit in a
digit. */
Merge the comments into a single on. There is no need to preserve the
evolution of the code in the comment structure.

http://codereview.appspot.com/14105/diff/1/9
File Objects/longobject.c (right):

http://codereview.appspot.com/14105/diff/1/9#newcode2872
Line 2872: /* XXX benchmark this! Is is worth keeping? */
Why not PyLong_FromLongLong if available (no special case if not)?

http://codereview.appspot.com/14105/diff/1/10
File PC/pyconfig.h (right):

http://codereview.appspot.com/14105/diff/1/10#newcode318
Line 318: #define PY_UINT64_T unsigned __int64
I think this should use PY_LONG_LONG, to support MingW32; likewise,
__int32 shouldn't be used, as it is MSC specific

http://codereview.appspot.com/14105/diff/1/2
File Python/marshal.c (right):

http://codereview.appspot.com/14105/diff/1/2#newcode160
Line 160: w_long((long)(Py_SIZE(ob) > 0 ? l : -l), p);
This needs to deal with overflow (sizeof(size_t) > sizeof(long))

http://codereview.appspot.com/14105/diff/1/2#newcode540
Line 540: if (n < -INT_MAX || n > INT_MAX)
I think this is obsolete now; longs can have up to ssize_t_max digits.

http://codereview.appspot.com/14105/diff/1/8
File configure.in (right):

http://codereview.appspot.com/14105/diff/1/8#newcode3132
Line 3132: # determine what size digit to use for Python's longs
I'm skeptical (-0) that we really need to have such a configure option.

http://codereview.appspot.com/14105/diff/1/14
File pyconfig.h.in (left):

http://codereview.appspot.com/14105/diff/1/14#oldcode9
Line 9: #undef AC_APPLE_UNIVERSAL_BUILD
We should find out why this is gone.

http://codereview.appspot.com/14105/diff/1/14#oldcode958
Line 958: /* Enable extensions on AIX 3, Interix. */
Likewise, this needs to be preserved.

http://codereview.appspot.com/14105/diff/1/14#oldcode1017
Line 1017: /* Define WORDS_BIGENDIAN to 1 if your processor stores words
with the most
This also needs to be preserved.

http://codereview.appspot.com/14105

@loewis
Copy link
Mannequin Author

loewis mannequin commented Feb 17, 2009

This was meant to go to bpo-4258, but I failed to set the subject when
sending this from Rietveld.

@loewis loewis mannequin closed this as completed Feb 17, 2009
@loewis loewis mannequin added the invalid label Feb 17, 2009
@mdickinson
Copy link
Member

Well, it might have helped if I'd used the same title for the Rietveld
issue as the tracker issue. I'll get that right next time.

Thank you for the review. I'll post some proper responses tomorrow
evening (GMT).

@loewis
Copy link
Mannequin Author

loewis mannequin commented Feb 18, 2009

Well, it might have helped if I'd used the same title for the Rietveld
issue as the tracker issue. I'll get that right next time.

What matters (I think) is that you have [issueXYZ] in the subject.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant