ctypes.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <!-- This file is generated by Nim. -->
  4. <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>system/ctypes</title>
  9. <!-- Google fonts -->
  10. <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
  11. <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
  12. <!-- Favicon -->
  13. <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
  14. <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
  15. <!-- CSS -->
  16. <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
  17. <!-- JS -->
  18. <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
  19. </head>
  20. <body>
  21. <div class="document" id="documentId">
  22. <div class="container">
  23. <h1 class="title">system/ctypes</h1>
  24. <div class="row">
  25. <div class="three columns">
  26. <div class="theme-select-wrapper">
  27. <label for="theme-select">Theme:&nbsp;</label>
  28. <select id="theme-select" onchange="setTheme(this.value)">
  29. <option value="auto">🌗 Match OS</option>
  30. <option value="dark">🌑 Dark</option>
  31. <option value="light">🌕 Light</option>
  32. </select>
  33. </div>
  34. <div id="global-links">
  35. <ul class="simple-boot">
  36. <li><a href="manual.html">Manual</a></li>
  37. <li><a href="lib.html">Standard library</a></li>
  38. <li> <a id="indexLink" href="theindex.html">Index</a></li>
  39. <li><a href="compiler/theindex.html">Compiler docs</a></li>
  40. <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
  41. <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
  42. </ul>
  43. </div>
  44. <div id="searchInputDiv">
  45. Search: <input type="search" id="searchInput"
  46. oninput="search()" />
  47. </div>
  48. <ul class="simple simple-toc" id="toc-list">
  49. <li>
  50. <details open>
  51. <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
  52. <ul class="simple simple-toc-section">
  53. <li><a class="reference" href="#BiggestFloat" title="BiggestFloat = float64">BiggestFloat</a></li>
  54. <li><a class="reference" href="#BiggestInt" title="BiggestInt = int64">BiggestInt</a></li>
  55. <li><a class="reference" href="#BiggestUInt" title="BiggestUInt = uint64">BiggestUInt</a></li>
  56. <li><a class="reference" href="#ByteAddress" title="ByteAddress {.deprecated: &quot;use `uint`&quot;.} = int">ByteAddress</a></li>
  57. <li><a class="reference" href="#cchar" title="cchar {.importc: &quot;char&quot;, nodecl.} = char">cchar</a></li>
  58. <li><a class="reference" href="#cdouble" title="cdouble {.importc: &quot;double&quot;, nodecl.} = float64">cdouble</a></li>
  59. <li><a class="reference" href="#cfloat" title="cfloat {.importc: &quot;float&quot;, nodecl.} = float32">cfloat</a></li>
  60. <li><a class="reference" href="#cint" title="cint {.importc: &quot;int&quot;, nodecl.} = int32">cint</a></li>
  61. <li><a class="reference" href="#clong" title="clong {.importc: &quot;long&quot;, nodecl.} = int">clong</a></li>
  62. <li><a class="reference" href="#clongdouble" title="clongdouble {.importc: &quot;long double&quot;, nodecl.} = BiggestFloat">clongdouble</a></li>
  63. <li><a class="reference" href="#clonglong" title="clonglong {.importc: &quot;long long&quot;, nodecl.} = int64">clonglong</a></li>
  64. <li><a class="reference" href="#cschar" title="cschar {.importc: &quot;signed char&quot;, nodecl.} = int8">cschar</a></li>
  65. <li><a class="reference" href="#cshort" title="cshort {.importc: &quot;short&quot;, nodecl.} = int16">cshort</a></li>
  66. <li><a class="reference" href="#csize_t" title="csize_t {.importc: &quot;size_t&quot;, nodecl.} = uint">csize_t</a></li>
  67. <li><a class="reference" href="#cstringArray" title="cstringArray {.importc: &quot;char**&quot;, nodecl.} = ptr UncheckedArray[cstring]">cstringArray</a></li>
  68. <li><a class="reference" href="#cuchar" title="cuchar {.importc: &quot;unsigned char&quot;, nodecl,
  69. deprecated: &quot;use `char` or `uint8` instead&quot;.} = char">cuchar</a></li>
  70. <li><a class="reference" href="#cuint" title="cuint {.importc: &quot;unsigned int&quot;, nodecl.} = uint32">cuint</a></li>
  71. <li><a class="reference" href="#culong" title="culong {.importc: &quot;unsigned long&quot;, nodecl.} = uint">culong</a></li>
  72. <li><a class="reference" href="#culonglong" title="culonglong {.importc: &quot;unsigned long long&quot;, nodecl.} = uint64">culonglong</a></li>
  73. <li><a class="reference" href="#cushort" title="cushort {.importc: &quot;unsigned short&quot;, nodecl.} = uint16">cushort</a></li>
  74. </ul>
  75. </details>
  76. </li>
  77. </ul>
  78. </div>
  79. <div class="nine columns" id="content">
  80. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  81. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  82. <div id="tocRoot"></div>
  83. <p class="module-desc">Some type definitions for compatibility between different backends and platforms.</p>
  84. <div class="section" id="7">
  85. <h1><a class="toc-backref" href="#7">Types</a></h1>
  86. <dl class="item">
  87. <div id="BiggestFloat">
  88. <dt><pre><a href="ctypes.html#BiggestFloat"><span class="Identifier">BiggestFloat</span></a> <span class="Other">=</span> <a href="system.html#float64"><span class="Identifier">float64</span></a></pre></dt>
  89. <dd>
  90. is an alias for the biggest floating point type the Nim compiler supports. Currently this is <tt class="docutils literal"><span class="pre"><span class="Identifier">float64</span></span></tt>, but it is platform-dependent in general.
  91. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L10" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  92. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L10" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  93. </dd>
  94. </div>
  95. <div id="BiggestInt">
  96. <dt><pre><a href="ctypes.html#BiggestInt"><span class="Identifier">BiggestInt</span></a> <span class="Other">=</span> <a href="system.html#int64"><span class="Identifier">int64</span></a></pre></dt>
  97. <dd>
  98. is an alias for the biggest signed integer type the Nim compiler supports. Currently this is <tt class="docutils literal"><span class="pre"><span class="Identifier">int64</span></span></tt>, but it is platform-dependent in general.
  99. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L5" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  100. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L5" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  101. </dd>
  102. </div>
  103. <div id="BiggestUInt">
  104. <dt><pre><a href="ctypes.html#BiggestUInt"><span class="Identifier">BiggestUInt</span></a> <span class="Other">=</span> <a href="system.html#uint64"><span class="Identifier">uint64</span></a></pre></dt>
  105. <dd>
  106. is an alias for the biggest unsigned integer type the Nim compiler supports. Currently this is <tt class="docutils literal"><span class="pre"><span class="Identifier">uint64</span></span></tt>, but it is platform-dependent in general.
  107. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L15" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  108. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L15" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  109. </dd>
  110. </div>
  111. <div id="ByteAddress">
  112. <dt><pre><a href="ctypes.html#ByteAddress"><span class="Identifier">ByteAddress</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;use `uint`&quot;</span></span>.} <span class="Other">=</span> <a href="system.html#int"><span class="Identifier">int</span></a></pre></dt>
  113. <dd>
  114. <div class="deprecation-message">
  115. <b>Deprecated:</b> use `uint`
  116. </div>
  117. is the signed integer type that should be used for converting pointers to integer addresses for readability.
  118. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L64" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  119. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L64" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  120. </dd>
  121. </div>
  122. <div id="cchar">
  123. <dt><pre><a href="ctypes.html#cchar"><span class="Identifier">cchar</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;char&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#char"><span class="Identifier">char</span></a></pre></dt>
  124. <dd>
  125. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">char</span></span></tt> in <em>C</em>.
  126. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L34" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  127. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L34" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  128. </dd>
  129. </div>
  130. <div id="cdouble">
  131. <dt><pre><a href="ctypes.html#cdouble"><span class="Identifier">cdouble</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;double&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#float64"><span class="Identifier">float64</span></a></pre></dt>
  132. <dd>
  133. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">double</span></span></tt> in <em>C</em>.
  134. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L48" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  135. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L48" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  136. </dd>
  137. </div>
  138. <div id="cfloat">
  139. <dt><pre><a href="ctypes.html#cfloat"><span class="Identifier">cfloat</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;float&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#float32"><span class="Identifier">float32</span></a></pre></dt>
  140. <dd>
  141. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">float</span></span></tt> in <em>C</em>.
  142. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L46" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  143. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L46" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  144. </dd>
  145. </div>
  146. <div id="cint">
  147. <dt><pre><a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;int&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#int32"><span class="Identifier">int32</span></a></pre></dt>
  148. <dd>
  149. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">int</span></span></tt> in <em>C</em>.
  150. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L40" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  151. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L40" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  152. </dd>
  153. </div>
  154. <div id="clong">
  155. <dt><pre><a href="ctypes.html#clong"><span class="Identifier">clong</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;long&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#int"><span class="Identifier">int</span></a></pre></dt>
  156. <dd>
  157. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">long</span></span></tt> in <em>C</em>.
  158. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L28" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  159. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L28" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  160. </dd>
  161. </div>
  162. <div id="clongdouble">
  163. <dt><pre><a href="ctypes.html#clongdouble"><span class="Identifier">clongdouble</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;long double&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="ctypes.html#BiggestFloat"><span class="Identifier">BiggestFloat</span></a></pre></dt>
  164. <dd>
  165. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">long</span> <span class="Identifier">double</span></span></tt> in <em>C</em>. This C type is not supported by Nim's code generator.
  166. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L50" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  167. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L50" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  168. </dd>
  169. </div>
  170. <div id="clonglong">
  171. <dt><pre><a href="ctypes.html#clonglong"><span class="Identifier">clonglong</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;long long&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#int64"><span class="Identifier">int64</span></a></pre></dt>
  172. <dd>
  173. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">long</span> <span class="Identifier">long</span></span></tt> in <em>C</em>.
  174. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L44" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  175. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L44" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  176. </dd>
  177. </div>
  178. <div id="cschar">
  179. <dt><pre><a href="ctypes.html#cschar"><span class="Identifier">cschar</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;signed char&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#int8"><span class="Identifier">int8</span></a></pre></dt>
  180. <dd>
  181. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">signed</span> <span class="Identifier">char</span></span></tt> in <em>C</em>.
  182. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L36" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  183. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L36" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  184. </dd>
  185. </div>
  186. <div id="cshort">
  187. <dt><pre><a href="ctypes.html#cshort"><span class="Identifier">cshort</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;short&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#int16"><span class="Identifier">int16</span></a></pre></dt>
  188. <dd>
  189. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">short</span></span></tt> in <em>C</em>.
  190. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L38" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  191. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L38" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  192. </dd>
  193. </div>
  194. <div id="csize_t">
  195. <dt><pre><a href="ctypes.html#csize_t"><span class="Identifier">csize_t</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;size_t&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#uint"><span class="Identifier">uint</span></a></pre></dt>
  196. <dd>
  197. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">size_t</span></span></tt> in <em>C</em>.
  198. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L42" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  199. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L42" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  200. </dd>
  201. </div>
  202. <div id="cstringArray">
  203. <dt><pre><a href="ctypes.html#cstringArray"><span class="Identifier">cstringArray</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;char**&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <span class="Keyword">ptr</span> <a href="system.html#UncheckedArray"><span class="Identifier">UncheckedArray</span></a><span class="Other">[</span><a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">]</span></pre></dt>
  204. <dd>
  205. This is binary compatible to the type <tt class="docutils literal"><span class="pre"><span class="Identifier">char</span><span class="Operator">**</span></span></tt> in <em>C</em>. The array's high value is large enough to disable bounds checking in practice. Use <a class="reference external" href="#cstringArrayToSeq,cstringArray,Natural">cstringArrayToSeq proc</a> to convert it into a <tt class="docutils literal"><span class="pre"><span class="Identifier">seq</span><span class="Punctuation">[</span><span class="Identifier">string</span><span class="Punctuation">]</span></span></tt>.
  206. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L68" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  207. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L68" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  208. </dd>
  209. </div>
  210. <div id="cuchar">
  211. <dt><pre><a href="ctypes.html#cuchar"><span class="Identifier">cuchar</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;unsigned char&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span><span class="Other">,</span>
  212. <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;use `char` or `uint8` instead&quot;</span></span>.} <span class="Other">=</span> <a href="system.html#char"><span class="Identifier">char</span></a></pre></dt>
  213. <dd>
  214. <div class="deprecation-message">
  215. <b>Deprecated:</b> use `char` or `uint8` instead
  216. </div>
  217. Deprecated: Use <tt class="docutils literal"><span class="pre"><span class="Identifier">uint8</span></span></tt> instead.
  218. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L54" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  219. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L54" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  220. </dd>
  221. </div>
  222. <div id="cuint">
  223. <dt><pre><a href="ctypes.html#cuint"><span class="Identifier">cuint</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;unsigned int&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#uint32"><span class="Identifier">uint32</span></a></pre></dt>
  224. <dd>
  225. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">unsigned</span> <span class="Identifier">int</span></span></tt> in <em>C</em>.
  226. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L58" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  227. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L58" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  228. </dd>
  229. </div>
  230. <div id="culong">
  231. <dt><pre><a href="ctypes.html#culong"><span class="Identifier">culong</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;unsigned long&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#uint"><span class="Identifier">uint</span></a></pre></dt>
  232. <dd>
  233. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">unsigned</span> <span class="Identifier">long</span></span></tt> in <em>C</em>.
  234. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L30" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  235. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L30" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  236. </dd>
  237. </div>
  238. <div id="culonglong">
  239. <dt><pre><a href="ctypes.html#culonglong"><span class="Identifier">culonglong</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;unsigned long long&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#uint64"><span class="Identifier">uint64</span></a></pre></dt>
  240. <dd>
  241. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">unsigned</span> <span class="Identifier">long</span> <span class="Identifier">long</span></span></tt> in <em>C</em>.
  242. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L60" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  243. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L60" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  244. </dd>
  245. </div>
  246. <div id="cushort">
  247. <dt><pre><a href="ctypes.html#cushort"><span class="Identifier">cushort</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;unsigned short&quot;</span><span class="Other">,</span> <span class="Identifier">nodecl</span>.} <span class="Other">=</span> <a href="system.html#uint16"><span class="Identifier">uint16</span></a></pre></dt>
  248. <dd>
  249. This is the same as the type <tt class="docutils literal"><span class="pre"><span class="Identifier">unsigned</span> <span class="Identifier">short</span></span></tt> in <em>C</em>.
  250. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/system/ctypes.nim#L56" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  251. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/system/ctypes.nim#L56" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  252. </dd>
  253. </div>
  254. </dl>
  255. </div>
  256. </div>
  257. </div>
  258. <div class="twelve-columns footer">
  259. <span class="nim-sprite"></span>
  260. <br>
  261. <small style="color: var(--hint);">Made with Nim. Generated: 2024-12-25 13:28:14 UTC</small>
  262. </div>
  263. </div>
  264. </div>
  265. <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
  266. </body>
  267. </html>