Implement ctypes.off_t

RESOLVED FIXED in mozilla15

Status

()

Core
js-ctypes
--
enhancement
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Yoric, Assigned: Yoric)

Tracking

unspecified
mozilla15
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

js-ctypes offers support for size_t and ssize_t, but not for off_t, whose size can generally not be predicted by JS code.

I believe we should add a type ctypes.off_t.
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All
Created attachment 626058 [details] [diff] [review]
First prototype
Created attachment 626139 [details] [diff] [review]
Implementing ctypes.off_t
Assignee: nobody → dteller
Attachment #626058 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #626139 - Flags: review?(jorendorff)
Blocks: 707679
Comment on attachment 626139 [details] [diff] [review]
Implementing ctypes.off_t

>   run_wrapped_integer_tests(library, ctypes.size_t, "size_t", ctypes.size_t.size, false,
>                             ctypes.UInt64, "ctypes.UInt64", ulimits);
>   run_wrapped_integer_tests(library, ctypes.ssize_t, "ssize_t", ctypes.size_t.size, true,
>                             ctypes.Int64, "ctypes.Int64", slimits);
>-  run_wrapped_integer_tests(library, ctypes.uintptr_t, "uintptr_t", ctypes.size_t.size, false,
>-                            ctypes.UInt64, "ctypes.UInt64", ulimits);
>+  run_wrapped_integer_tests(library, ctypes.ssize_t, "ssize_t", ctypes.size_t.size, true,
>+                            ctypes.Int64, "ctypes.Int64", slimits);
>   run_wrapped_integer_tests(library, ctypes.intptr_t, "intptr_t", ctypes.size_t.size, true,
>                             ctypes.Int64, "ctypes.Int64", slimits);

This bit looks like a mistake. r=me with this reverted.
Attachment #626139 - Flags: review?(jorendorff) → review+
Created attachment 626467 [details] [diff] [review]
Implementing ctypes.off_t

Fixed, thanks for the quick review.
Attachment #626139 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a9f8be665a4
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla15
And backed out for orange.
https://hg.mozilla.org/integration/mozilla-inbound/rev/8d4521e975c8

Try FTW?

https://tbpl.mozilla.org/php/getParsedLog.php?id=12008893&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=12009164&tree=Mozilla-Inbound
Flags: in-testsuite+
Target Milestone: mozilla15 → ---
Sorry about that. The error was masked by an intermittent orange.
Created attachment 627164 [details] [diff] [review]
Implementing ctypes.off_t

Here we go. Issue was, as often, not in the code but in the (vastly less documented) test.
Attachment #626467 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/6de6c3de450d

Mommy, I'm scared...
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla15
Who wouldn't be?
https://hg.mozilla.org/mozilla-central/rev/6de6c3de450d
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Duplicate of this bug: 757462
You need to log in before you can comment on or make changes to this bug.