Commits

Andr...@cantab.net  committed 54a332c

Adds basic documentation of the CheckTypeSize method.

  • Participants
  • Parent commits 2e225b4

Comments (0)

Files changed (2)

File doc/scons.mod

 <!ENTITY CheckLib "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckLib</function>">
 <!ENTITY CheckLibWithHeader "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckLibWithHeader</function>">
 <!ENTITY CheckType "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckType</function>">
+<!ENTITY CheckTypeSize "<function xmlns='http://www.scons.org/dbxsd/v1.0'>CheckTypeSize</function>">
 <!ENTITY TryAction "<function xmlns='http://www.scons.org/dbxsd/v1.0'>TryAction</function>">
 <!ENTITY TryBuild "<function xmlns='http://www.scons.org/dbxsd/v1.0'>TryBuild</function>">
 <!ENTITY TryCompile "<function xmlns='http://www.scons.org/dbxsd/v1.0'>TryCompile</function>">

File doc/user/sconf.xml

     </sconstruct>
 
   </section>
+  <section>
+  <title>Checking the size of a datatype</title>
+    <para>
+    Check the size of a datatype by using the &CheckTypeSize; method:
+    </para>
+    
+    <sconstruct>
+env = Environment()
+conf = Configure(env)
+int_size = conf.CheckTypeSize('unsigned int')
+print 'sizeof unsigned int is', int_size
+env = conf.Finish()
+    </sconstruct>
+    
+    <screen>
+% <userinput>scons -Q</userinput>
+sizeof unsigned int is 4
+scons: `.' is up to date.
+    </screen>
+  </section>
 
   <section>
   <title>Adding Your Own Custom Checks</title>