Closed Bug 386610 Opened 17 years ago Closed 17 years ago

pyxpcom fails to build against python 2.5 (api changed)

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta3

People

(Reporter: asac, Assigned: asac)

References

Details

Attachments

(1 file, 2 obsolete files)

python 2.5 now makes use of Py_ssize_t which makes the build of pyxpcom fail on 64-bit architectures.

I will attach two patches:
 1. a patch that detects if Py_ssize_t is available in configure.in.
 2. a patch that typdefs Py_ssize_t as int in case that python api doesn't provide it; further the patch adds boundary checks because we cannot really deal with 64-bit sized buffers.
Assignee: nobody → asac
Status: NEW → ASSIGNED
Attachment #270602 - Flags: review?(mhammond)
Comment on attachment 270603 [details] [diff] [review]
fix build ... and fail if buffer size exceeds 32-bits

mhammond, are you still active so you can review? this patch needs 

https://bugzilla.mozilla.org/attachment.cgi?id=270602

to work, but will allow pyxpcom to build build against python 2.4 as well as python 2.5
Attachment #270603 - Flags: review?(mhammond)
Comment on attachment 270603 [details] [diff] [review]
fix build ... and fail if buffer size exceeds 32-bits

Sorry for the delay - I don't check bugmail as often as I should.

PEP 353 suggests using:

#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)

which would make the configure change unnecessary.  PY_SSIZE_T_MAX should also be defined.  Apart from that it looks good.
ok thanks for the feedback ... will update patch accordingly and rerequest review.
asac, how about an updated patch? :)
sorry for the the delay. Release time here atm :).
Attachment #270602 - Attachment is obsolete: true
Attachment #270603 - Attachment is obsolete: true
Attachment #285276 - Flags: review?(mhammond)
Attachment #270602 - Flags: review?(mhammond)
Attachment #270603 - Flags: review?(mhammond)
Comment on attachment 285276 [details] [diff] [review]
updated with comments

looks good to me
Attachment #285276 - Flags: review?(mhammond) → review+
not in the default firefox build. requesting landing.
Keywords: checkin-needed
Checking in extensions/python/xpcom/src/PyGInputStream.cpp;
/cvsroot/mozilla/extensions/python/xpcom/src/PyGInputStream.cpp,v  <--  PyGInputStream.cpp
new revision: 1.5; previous revision: 1.4
done
Checking in extensions/python/xpcom/src/PyIInputStream.cpp;
/cvsroot/mozilla/extensions/python/xpcom/src/PyIInputStream.cpp,v  <--  PyIInputStream.cpp
new revision: 1.7; previous revision: 1.6
done
Checking in extensions/python/xpcom/src/PyXPCOM.h;
/cvsroot/mozilla/extensions/python/xpcom/src/PyXPCOM.h,v  <--  PyXPCOM.h
new revision: 1.22; previous revision: 1.21
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: