JSVAL_TO_INT

  • Revision slug: SpiderMonkey/JSAPI_Reference/JSVAL_TO_INT
  • Revision title: JSVAL_TO_INT
  • Revision id: 146473
  • Created:
  • Creator: Callek
  • Is current revision? No
  • Comment

Revision Content

<title>JSVAL_TO_INT</title>

Summary

Macro

Converts a JS integer value to an integer.

Syntax

JSVAL_TO_INT(v)

Description

JSVAL_TO_INT converts a specified JS integer value, v, to a C integer value by performing a bitwise right shift operation. JSVAL_TO_INT assumes that it was passed a JS value of type JSVAL_INT, and returns that JS value's corresponding C integer value. Note that because of the bit-shifting operation, that a C comparison of JSVAL_TO_INT(v) to v always results in nonequality.

See Also

Groups Macros
Documents LXR ID Search
Entries INT_TO_JSVAL, JSVAL_TO_BOOLEAN, JSVAL_TO_PRIVATE

Revision Source

<p> &lt;title&gt;JSVAL_TO_INT&lt;/title&gt;
</p>
<h3 name="Summary"> Summary </h3>
<p><b>Macro</b>
</p><p>Converts a JS integer value to an integer.
</p>
<h3 name="Syntax"> Syntax </h3>
<pre>JSVAL_TO_INT(v)
</pre>
<h3 name="Description"> Description </h3>
<p><code>JSVAL_TO_INT</code> converts a specified JS integer value, <code>v</code>, to a C integer value by performing a bitwise right shift operation. <code>JSVAL_TO_INT</code> assumes that it was passed a JS value of type <code>JSVAL_INT</code>, and returns that JS value's corresponding C integer value. Note that because of the bit-shifting operation, that a C comparison of <code>JSVAL_TO_INT(v)</code> to <code>v</code> always results in nonequality.
</p>
<h3 name="See_Also"> See Also </h3>
<table class="fullwidth-table">
<tbody><tr>
<td>Groups</td>
<td><a href="en/JSAPI_Reference#Macros">Macros</a></td>
</tr>
<tr>
<td>Documents</td>
<td><a class="external" href="http://lxr.mozilla.org/seamonkey/ident?i=JSVAL_TO_INT">LXR ID Search</a></td>
</tr>
<tr>
<td>Entries</td>
<td><a href="en/JSAPI_Reference/INT_TO_JSVAL">INT_TO_JSVAL</a>, <a href="en/JSAPI_Reference/JSVAL_TO_BOOLEAN">JSVAL_TO_BOOLEAN</a>, <a href="en/JSAPI_Reference/JSVAL_TO_PRIVATE">JSVAL_TO_PRIVATE</a></td>
</tr>
</tbody></table>
Revert to this revision