Last Comment Bug 757469 - Implement ctypes.off_t
: Implement ctypes.off_t
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: js-ctypes (show other bugs)
: unspecified
: All All
: -- enhancement (vote)
: mozilla15
Assigned To: David Rajchenbach-Teller [:Yoric] (please use "needinfo")
:
Mentors:
: 757462 (view as bug list)
Depends on:
Blocks: 707679
  Show dependency treegraph
 
Reported: 2012-05-22 08:44 PDT by David Rajchenbach-Teller [:Yoric] (please use "needinfo")
Modified: 2013-05-28 02:16 PDT (History)
2 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
First prototype (2.95 KB, patch)
2012-05-22 09:42 PDT, David Rajchenbach-Teller [:Yoric] (please use "needinfo")
no flags Details | Diff | Review
Implementing ctypes.off_t (4.65 KB, patch)
2012-05-22 12:55 PDT, David Rajchenbach-Teller [:Yoric] (please use "needinfo")
jorendorff: review+
Details | Diff | Review
Implementing ctypes.off_t (4.45 KB, patch)
2012-05-23 08:47 PDT, David Rajchenbach-Teller [:Yoric] (please use "needinfo")
no flags Details | Diff | Review
Implementing ctypes.off_t (4.62 KB, patch)
2012-05-25 03:47 PDT, David Rajchenbach-Teller [:Yoric] (please use "needinfo")
no flags Details | Diff | Review

Description David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2012-05-22 08:44:04 PDT
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.
Comment 1 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2012-05-22 09:42:10 PDT
Created attachment 626058 [details] [diff] [review]
First prototype
Comment 2 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2012-05-22 12:55:55 PDT
Created attachment 626139 [details] [diff] [review]
Implementing ctypes.off_t
Comment 3 Jason Orendorff [:jorendorff] 2012-05-23 08:36:27 PDT
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.
Comment 4 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2012-05-23 08:47:25 PDT
Created attachment 626467 [details] [diff] [review]
Implementing ctypes.off_t

Fixed, thanks for the quick review.
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-05-23 18:05:14 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a9f8be665a4
Comment 7 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2012-05-24 02:00:16 PDT
Sorry about that. The error was masked by an intermittent orange.
Comment 8 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2012-05-25 03:47:49 PDT
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.
Comment 9 Ryan VanderMeulen [:RyanVM] 2012-05-26 06:40:15 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/6de6c3de450d

Mommy, I'm scared...
Comment 10 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2012-05-26 09:29:40 PDT
Who wouldn't be?
Comment 11 Ryan VanderMeulen [:RyanVM] 2012-05-26 15:27:42 PDT
https://hg.mozilla.org/mozilla-central/rev/6de6c3de450d
Comment 12 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2013-05-28 02:16:53 PDT
*** Bug 757462 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.