Closed Bug 757469 Opened 9 years ago Closed 9 years ago

Implement ctypes.off_t

Categories

(Core :: js-ctypes, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

Attachments

(1 file, 3 obsolete files)

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
Attached patch Implementing ctypes.off_t (obsolete) — Splinter Review
Assignee: nobody → dteller
Attachment #626058 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #626139 - Flags: review?(jorendorff)
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+
Attached patch Implementing ctypes.off_t (obsolete) — Splinter Review
Fixed, thanks for the quick review.
Attachment #626139 - Attachment is obsolete: true
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a9f8be665a4
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla15
Sorry about that. The error was masked by an intermittent orange.
Here we go. Issue was, as often, not in the code but in the (vastly less documented) test.
Attachment #626467 - Attachment is obsolete: true
https://hg.mozilla.org/integration/mozilla-inbound/rev/6de6c3de450d

Mommy, I'm scared...
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/6de6c3de450d
Status: ASSIGNED → RESOLVED
Closed: 9 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.