Last Comment Bug 717733 - Fix int64 types usage in js/xpconnect
: Fix int64 types usage in js/xpconnect
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 OpenBSD
: -- normal (vote)
: mozilla12
Assigned To: Landry Breuil (:gaston)
:
Mentors:
Depends on: 634793
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-12 12:54 PST by Landry Breuil (:gaston)
Modified: 2012-05-19 01:32 PDT (History)
1 user (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix int64 types breakage on OpenBSD (1014 bytes, patch)
2012-01-12 13:02 PST, Landry Breuil (:gaston)
no flags Details | Diff | Splinter Review
Fix int64 types breakage on OpenBSD (1.01 KB, patch)
2012-01-12 13:16 PST, Landry Breuil (:gaston)
Ms2ger: review+
Details | Diff | Splinter Review

Description Landry Breuil (:gaston) 2012-01-12 12:54:57 PST
Followup to bug #714264, m-c now fails to build on OpenBSD with :
js/xpconnect/src/XPCJSRuntime.cpp:1881:
error: invalid conversion from 'PRInt64*' to 'int64_t*'

patch incoming fixing that issue (ie add a static_cast<int64_t*>(n) at the offending call, as it was done in the same call present in dom/workers/WorkerPrivate.cpp
Comment 1 Landry Breuil (:gaston) 2012-01-12 13:02:15 PST
Created attachment 588163 [details] [diff] [review]
Fix int64 types breakage on OpenBSD

static_cast wasn't enough, so here's the patch with a "regular" cast. 
error: invalid static_cast from type 'PRInt64*' to type 'int64_t*'

(yeah, i've got to check what type is PRInt64...)
Comment 2 Landry Breuil (:gaston) 2012-01-12 13:16:20 PST
Created attachment 588167 [details] [diff] [review]
Fix int64 types breakage on OpenBSD

And as pointed out by waldo on IRC, reinterpret_cast<> is the way to go here.
Comment 3 :Ms2ger 2012-01-12 13:29:33 PST
Comment on attachment 588167 [details] [diff] [review]
Fix int64 types breakage on OpenBSD

Thanks, and sorry for breaking you.
Comment 4 Landry Breuil (:gaston) 2012-01-12 13:33:52 PST
Np, that increases my karma :)

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