glib-Standard-Macros.html   [plain text]


<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Standard Macros</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="GLib Reference Manual"><link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals"><link rel="previous" href="glib-Limits-of-Basic-Types.html" title="Limits of Basic Types"><link rel="next" href="glib-Type-Conversion-Macros.html" title="Type Conversion Macros"><link rel="chapter" href="glib.html" title="GLib Overview"><link rel="refentry" href="glib-building.html" title="Compiling the GLib package"><link rel="refentry" href="glib-cross-compiling.html" title="Cross-compiling the GLib package"><link rel="refentry" href="glib-compiling.html" title="Compiling GLib Applications"><link rel="refentry" href="glib-running.html" title="Running GLib Applications"><link rel="refentry" href="glib-changes.html" title="Changes to GLib"><link rel="refentry" href="glib-resources.html" title="Mailing lists and bug reports"><link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals"><link rel="refentry" href="glib-Basic-Types.html" title="Basic Types"><link rel="refentry" href="glib-Limits-of-Basic-Types.html" title="Limits of Basic Types"><link rel="refentry" href="glib-Standard-Macros.html" title="Standard Macros"><link rel="refentry" href="glib-Type-Conversion-Macros.html" title="Type Conversion Macros"><link rel="refentry" href="glib-Byte-Order-Macros.html" title="Byte Order Macros"><link rel="refentry" href="glib-Numerical-Definitions.html" title="Numerical Definitions"><link rel="refentry" href="glib-Miscellaneous-Macros.html" title="Miscellaneous Macros"><link rel="refentry" href="glib-Atomic-Operations.html" title="Atomic Operations"><link rel="chapter" href="glib-core.html" title="GLib Core Application Support"><link rel="refentry" href="glib-The-Main-Event-Loop.html" title="The Main Event Loop"><link rel="refentry" href="glib-Threads.html" title="
Threads"><link rel="refentry" href="glib-Thread-Pools.html" title="Thread Pools"><link rel="refentry" href="glib-Asynchronous-Queues.html" title="Asynchronous Queues"><link rel="refentry" href="glib-Dynamic-Loading-of-Modules.html" title="Dynamic Loading of Modules"><link rel="refentry" href="glib-Memory-Allocation.html" title="Memory Allocation"><link rel="refentry" href="glib-IO-Channels.html" title="IO Channels"><link rel="refentry" href="glib-Error-Reporting.html" title="Error Reporting"><link rel="refentry" href="glib-Warnings-and-Assertions.html" title="Message Output and Debugging Functions"><link rel="refentry" href="glib-Message-Logging.html" title="Message Logging"><link rel="chapter" href="glib-utilities.html" title="GLib Utilities"><link rel="refentry" href="glib-String-Utility-Functions.html" title="String Utility Functions"><link rel="refentry" href="glib-Character-Set-Conversion.html" title="Character Set Conversion"><link rel="refentry" href="glib-Unicode-Manipulation.html" title="Unicode Manipulation"><link rel="refentry" href="glib-I18N.html" title="Internationalization"><link rel="refentry" href="glib-Date-and-Time-Functions.html" title="Date and Time Functions"><link rel="refentry" href="glib-Random-Numbers.html" title="Random Numbers"><link rel="refentry" href="glib-Hook-Functions.html" title="Hook Functions"><link rel="refentry" href="glib-Miscellaneous-Utility-Functions.html" title="Miscellaneous Utility Functions"><link rel="refentry" href="glib-Lexical-Scanner.html" title="Lexical Scanner"><link rel="refentry" href="glib-Automatic-String-Completion.html" title="Automatic String Completion"><link rel="refentry" href="glib-Timers.html" title="Timers"><link rel="refentry" href="glib-Spawning-Processes.html" title="Spawning Processes"><link rel="refentry" href="glib-File-Utilities.html" title="File Utilities"><link rel="refentry" href="glib-Shell-related-Utilities.html" title="Shell-related Utilities"><link rel="refentry" href="glib-Glob-style-pattern-matching.html" title="Glob-style pattern matching"><link rel="refentry" href="glib-Simple-XML-Subset-Parser.html" title="Simple XML Subset Parser"><link rel="refentry" href="glib-Windows-Compatability-Functions.html" title="Windows Compatibility Functions"><link rel="chapter" href="glib-data-types.html" title="GLib Data Types"><link rel="refentry" href="glib-Memory-Chunks.html" title="Memory Chunks"><link rel="refentry" href="glib-Doubly-Linked-Lists.html" title="Doubly-Linked Lists"><link rel="refentry" href="glib-Singly-Linked-Lists.html" title="Singly-Linked Lists"><link rel="refentry" href="glib-Double-ended-Queues.html" title="Double-ended Queues"><link rel="refentry" href="glib-Trash-Stacks.html" title="Trash Stacks"><link rel="refentry" href="glib-Hash-Tables.html" title="Hash Tables"><link rel="refentry" href="glib-Strings.html" title="Strings"><link rel="refentry" href="glib-String-Chunks.html" title="String Chunks"><link rel="refentry" href="glib-Arrays.html" title="Arrays"><link rel="refentry" href="glib-Pointer-Arrays.html" title="Pointer Arrays"><link rel="refentry" href="glib-Byte-Arrays.html" title="Byte Arrays"><link rel="refentry" href="glib-Balanced-Binary-Trees.html" title="Balanced Binary Trees"><link rel="refentry" href="glib-N-ary-Trees.html" title="N-ary Trees"><link rel="refentry" href="glib-Quarks.html" title="Quarks"><link rel="refentry" href="glib-Keyed-Data-Lists.html" title="Keyed Data Lists"><link rel="refentry" href="glib-Datasets.html" title="Datasets"><link rel="refentry" href="glib-Relations-and-Tuples.html" title="Relations and Tuples"><link rel="refentry" href="glib-Caches.html" title="Caches"><link rel="refentry" href="glib-Memory-Allocators.html" title="Memory Allocators"><link rel="chapter" href="tools.html" title="GLib Tools"><link rel="refentry" href="glib-gettextize.html" title="glib-gettextize"><link rel="index" href="ix01.html" title="Index"><link rel="section" href="glib-Standard-Macros.html#id2978902" title="Description"><link rel="section" href="glib-Standard-Macros.html#id2978912" title="Details"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="glib-Limits-of-Basic-Types.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="glib-fundamentals.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GLib Reference Manual</th><td><a accesskey="n" href="glib-Type-Conversion-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="glib-Standard-Macros"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">Standard Macros</span></h2><p>Standard Macros &#8212; commonly-used macros.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">

#include &lt;glib.h&gt;


#define     <a href="glib-Standard-Macros.html#GLIB-MAJOR-VERSION-CAPS">GLIB_MAJOR_VERSION</a>
#define     <a href="glib-Standard-Macros.html#GLIB-MINOR-VERSION-CAPS">GLIB_MINOR_VERSION</a>
#define     <a href="glib-Standard-Macros.html#GLIB-MICRO-VERSION-CAPS">GLIB_MICRO_VERSION</a>

#define     <a href="glib-Standard-Macros.html#G-OS-WIN32-CAPS">G_OS_WIN32</a>
#define     <a href="glib-Standard-Macros.html#G-OS-BEOS-CAPS">G_OS_BEOS</a>
#define     <a href="glib-Standard-Macros.html#G-OS-UNIX-CAPS">G_OS_UNIX</a>

#define     <a href="glib-Standard-Macros.html#GLIB-CHECK-VERSION-CAPS">GLIB_CHECK_VERSION</a>              (major,minor,micro)

#define     <a href="glib-Standard-Macros.html#G-DIR-SEPARATOR-CAPS">G_DIR_SEPARATOR</a>
#define     <a href="glib-Standard-Macros.html#G-DIR-SEPARATOR-S-CAPS">G_DIR_SEPARATOR_S</a>
#define     <a href="glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR-CAPS">G_SEARCHPATH_SEPARATOR</a>
#define     <a href="glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR-S-CAPS">G_SEARCHPATH_SEPARATOR_S</a>

#define     <a href="glib-Standard-Macros.html#TRUE-CAPS">TRUE</a>
#define     <a href="glib-Standard-Macros.html#FALSE-CAPS">FALSE</a>

#define     <a href="glib-Standard-Macros.html#NULL-CAPS">NULL</a>

#define     <a href="glib-Standard-Macros.html#MIN-CAPS">MIN</a>                             (a, b)
#define     <a href="glib-Standard-Macros.html#MAX-CAPS">MAX</a>                             (a, b)

#define     <a href="glib-Standard-Macros.html#ABS-CAPS">ABS</a>                             (a)
#define     <a href="glib-Standard-Macros.html#CLAMP-CAPS">CLAMP</a>                           (x, low, high)

#define     <a href="glib-Standard-Macros.html#G-STRUCT-MEMBER-CAPS">G_STRUCT_MEMBER</a>                 (member_type, struct_p, struct_offset)
#define     <a href="glib-Standard-Macros.html#G-STRUCT-MEMBER-P-CAPS">G_STRUCT_MEMBER_P</a>               (struct_p, struct_offset)
#define     <a href="glib-Standard-Macros.html#G-STRUCT-OFFSET-CAPS">G_STRUCT_OFFSET</a>                 (struct_type, member)

#define     <a href="glib-Standard-Macros.html#G-MEM-ALIGN-CAPS">G_MEM_ALIGN</a>

#define     <a href="glib-Standard-Macros.html#G-CONST-RETURN-CAPS">G_CONST_RETURN</a>

</pre></div><div class="refsect1" lang="en"><a name="id2978902"></a><h2>Description</h2><p>
These macros provide a few commonly-used features.
</p></div><div class="refsect1" lang="en"><a name="id2978912"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2978918"></a><h3><a name="GLIB-MAJOR-VERSION-CAPS"></a>GLIB_MAJOR_VERSION</h3><a class="indexterm" name="id2978929"></a><pre class="programlisting">#define GLIB_MAJOR_VERSION 2
</pre><p>
The major version number of the GLib library.
</p></div><hr><div class="refsect2" lang="en"><a name="id2978945"></a><h3><a name="GLIB-MINOR-VERSION-CAPS"></a>GLIB_MINOR_VERSION</h3><a class="indexterm" name="id2978956"></a><pre class="programlisting">#define GLIB_MINOR_VERSION 4
</pre><p>
The minor version number of the GLib library.
</p></div><hr><div class="refsect2" lang="en"><a name="id2978972"></a><h3><a name="GLIB-MICRO-VERSION-CAPS"></a>GLIB_MICRO_VERSION</h3><a class="indexterm" name="id2978983"></a><pre class="programlisting">#define GLIB_MICRO_VERSION 5
</pre><p>
The micro version number of the GLib library.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979000"></a><h3><a name="G-OS-WIN32-CAPS"></a>G_OS_WIN32</h3><a class="indexterm" name="id2979010"></a><pre class="programlisting">#define G_OS_WIN32
</pre><p>
This macro is defined only on Windows. So you can bracket
Windows-specific code in "#ifdef G_OS_WIN32".
</p></div><hr><div class="refsect2" lang="en"><a name="id2979033"></a><h3><a name="G-OS-BEOS-CAPS"></a>G_OS_BEOS</h3><a class="indexterm" name="id2979036"></a><pre class="programlisting">#define G_OS_BEOS
</pre><p>
This macro is defined only on BeOS. So you can bracket
BeOS-specific code in "#ifdef G_OS_BEOS".
</p></div><hr><div class="refsect2" lang="en"><a name="id2979050"></a><h3><a name="G-OS-UNIX-CAPS"></a>G_OS_UNIX</h3><a class="indexterm" name="id2979064"></a><pre class="programlisting">#define G_OS_UNIX
</pre><p>
This macro is defined only on UNIX. So you can bracket
UNIX-specific code in "#ifdef G_OS_UNIX".
</p></div><hr><div class="refsect2" lang="en"><a name="id2979081"></a><h3><a name="GLIB-CHECK-VERSION-CAPS"></a>GLIB_CHECK_VERSION()</h3><a class="indexterm" name="id2979095"></a><pre class="programlisting">#define     GLIB_CHECK_VERSION(major,minor,micro)</pre><p>
Checks the version of the GLib library.
It returns <tt class="literal">TRUE</tt> if the GLib library is the same or newer than the given
version.

</p><div class="example"><a name="id2979117"></a><p class="title"><b>Example 1. Checking the version of the GLib library</b></p><pre class="programlisting">
  if (!GLIB_CHECK_VERSION (1, 2, 0))
    g_error ("GLib version 1.2.0 or above is needed");
</pre></div><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>major</tt></i> :</span></td><td>the major version number.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>minor</tt></i> :</span></td><td>the minor version number.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>micro</tt></i> :</span></td><td>the micro version number.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2979178"></a><h3><a name="G-DIR-SEPARATOR-CAPS"></a>G_DIR_SEPARATOR</h3><a class="indexterm" name="id2979189"></a><pre class="programlisting">#define     G_DIR_SEPARATOR</pre><p>
The directory separator character.
This is '/' on UNIX machines and '\' under Windows.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979206"></a><h3><a name="G-DIR-SEPARATOR-S-CAPS"></a>G_DIR_SEPARATOR_S</h3><a class="indexterm" name="id2979218"></a><pre class="programlisting">#define     G_DIR_SEPARATOR_S</pre><p>
The directory separator as a string.
This is "/" on UNIX machines and "\" under Windows.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979235"></a><h3><a name="G-SEARCHPATH-SEPARATOR-CAPS"></a>G_SEARCHPATH_SEPARATOR</h3><a class="indexterm" name="id2979246"></a><pre class="programlisting">#define     G_SEARCHPATH_SEPARATOR</pre><p>
The search path separator character.
This is ':' on UNIX machines and ';' under Windows.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979263"></a><h3><a name="G-SEARCHPATH-SEPARATOR-S-CAPS"></a>G_SEARCHPATH_SEPARATOR_S</h3><a class="indexterm" name="id2979275"></a><pre class="programlisting">#define     G_SEARCHPATH_SEPARATOR_S</pre><p>
The search path separator as a string.
This is ":" on UNIX machines and ";" under Windows.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979292"></a><h3><a name="TRUE-CAPS"></a>TRUE</h3><a class="indexterm" name="id2979302"></a><pre class="programlisting">#define	TRUE	(!FALSE)
</pre><p>
Defines the <tt class="literal">TRUE</tt> value for the <a href="glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> type.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979332"></a><h3><a name="FALSE-CAPS"></a>FALSE</h3><a class="indexterm" name="id2979342"></a><pre class="programlisting">#define	FALSE	(0)
</pre><p>
Defines the <tt class="literal">FALSE</tt> value for the <a href="glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> type.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979371"></a><h3><a name="NULL-CAPS"></a>NULL</h3><a class="indexterm" name="id2979381"></a><pre class="programlisting">#define     NULL</pre><p>
Defines the standard <tt class="literal">NULL</tt> pointer.
</p></div><hr><div class="refsect2" lang="en"><a name="id2979402"></a><h3><a name="MIN-CAPS"></a>MIN()</h3><a class="indexterm" name="id2979412"></a><pre class="programlisting">#define MIN(a, b)  (((a) &lt; (b)) ? (a) : (b))
</pre><p>
Calculates the minimum of <i class="parameter"><tt>a</tt></i> and <i class="parameter"><tt>b</tt></i>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>a</tt></i> :</span></td><td>a numeric value.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>b</tt></i> :</span></td><td>a numeric value.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the minimum of <i class="parameter"><tt>a</tt></i> and <i class="parameter"><tt>b</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2979493"></a><h3><a name="MAX-CAPS"></a>MAX()</h3><a class="indexterm" name="id2979503"></a><pre class="programlisting">#define MAX(a, b)  (((a) &gt; (b)) ? (a) : (b))
</pre><p>
Calculates the maximum of <i class="parameter"><tt>a</tt></i> and <i class="parameter"><tt>b</tt></i>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>a</tt></i> :</span></td><td>a numeric value.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>b</tt></i> :</span></td><td>a numeric value.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the maximum of <i class="parameter"><tt>a</tt></i> and <i class="parameter"><tt>b</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2979583"></a><h3><a name="ABS-CAPS"></a>ABS()</h3><a class="indexterm" name="id2979593"></a><pre class="programlisting">#define ABS(a)	   (((a) &lt; 0) ? -(a) : (a))
</pre><p>
Calculates the absolute value of <i class="parameter"><tt>a</tt></i>.
The absolute value is simply the number with any negative sign taken away.
</p><p>
For example,
</p><div class="itemizedlist"><ul type="disc"><li><p>
ABS(-10) is 10.
</p></li><li><p>
ABS(10) is also 10.
</p></li></ul></div><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>a</tt></i> :</span></td><td>a numeric value.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the absolute value of <i class="parameter"><tt>a</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2979666"></a><h3><a name="CLAMP-CAPS"></a>CLAMP()</h3><a class="indexterm" name="id2979676"></a><pre class="programlisting">#define CLAMP(x, low, high)  (((x) &gt; (high)) ? (high) : (((x) &lt; (low)) ? (low) : (x)))
</pre><p>
Ensures that <i class="parameter"><tt>x</tt></i> is between the limits set by <i class="parameter"><tt>low</tt></i> and <i class="parameter"><tt>high</tt></i>.
</p><p>
For example,
</p><div class="itemizedlist"><ul type="disc"><li><p>
CLAMP(5, 10, 15) is 10.
</p></li><li><p>
CLAMP(15, 5, 10) is 10.
</p></li><li><p>
CLAMP(20, 15, 25) is 20.
</p></li></ul></div><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>x</tt></i> :</span></td><td>the value to clamp.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>low</tt></i> :</span></td><td>the minimum value allowed.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>high</tt></i> :</span></td><td>the maximum value allowed.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the value of <i class="parameter"><tt>x</tt></i> clamped to the range between <i class="parameter"><tt>low</tt></i> and <i class="parameter"><tt>high</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2979807"></a><h3><a name="G-STRUCT-MEMBER-CAPS"></a>G_STRUCT_MEMBER()</h3><a class="indexterm" name="id2979819"></a><pre class="programlisting">#define     G_STRUCT_MEMBER(member_type, struct_p, struct_offset)</pre><p>
Returns a member of a structure at a given offset, using the given type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>member_type</tt></i> :</span></td><td>the type of the struct field.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>struct_p</tt></i> :</span></td><td>a pointer to a struct.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>struct_offset</tt></i> :</span></td><td>the offset of the field from the start of the struct, in bytes.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the struct member.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2979893"></a><h3><a name="G-STRUCT-MEMBER-P-CAPS"></a>G_STRUCT_MEMBER_P()</h3><a class="indexterm" name="id2979905"></a><pre class="programlisting">#define     G_STRUCT_MEMBER_P(struct_p, struct_offset)</pre><p>
Returns an untyped pointer to a given offset of a struct.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>struct_p</tt></i> :</span></td><td>a pointer to a struct.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>struct_offset</tt></i> :</span></td><td>the offset from the start of the struct, in bytes.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>an untyped pointer to <i class="parameter"><tt>struct_p</tt></i> plus <i class="parameter"><tt>struct_offset</tt></i> bytes.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2979976"></a><h3><a name="G-STRUCT-OFFSET-CAPS"></a>G_STRUCT_OFFSET()</h3><a class="indexterm" name="id2979988"></a><pre class="programlisting">#define     G_STRUCT_OFFSET(struct_type, member)</pre><p>
Returns the offset, in bytes, of a member of a struct.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>struct_type</tt></i> :</span></td><td>a structure type, e.g. <span class="structname">GtkWidget</span>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>member</tt></i> :</span></td><td>a field in the structure, e.g. <i class="structfield"><tt>window</tt></i>.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the offset of <i class="parameter"><tt>member</tt></i> from the start of <i class="parameter"><tt>struct_type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2980066"></a><h3><a name="G-MEM-ALIGN-CAPS"></a>G_MEM_ALIGN</h3><a class="indexterm" name="id2980077"></a><pre class="programlisting">#define     G_MEM_ALIGN</pre><p>
Indicates the number of bytes to which memory will be aligned on the
current platform.
</p></div><hr><div class="refsect2" lang="en"><a name="id2980094"></a><h3><a name="G-CONST-RETURN-CAPS"></a>G_CONST_RETURN</h3><a class="indexterm" name="id2980105"></a><pre class="programlisting">#define     G_CONST_RETURN</pre><p>
If <tt class="literal">G_DISABLE_CONST_RETURNS</tt> is defined, this macro expands to nothing.
By default, the macro expands to <tt class="literal">const</tt>. The macro 
should be used in place of <tt class="literal">const</tt> for functions that 
return a value that should not be modified. The purpose of this macro is 
to allow us to turn on <tt class="literal">const</tt> for returned constant 
strings by default, while allowing programmers who find that annoying to 
turn it off. This macro should only be used for return values and for
<span class="emphasis"><em>out</em></span> parameters, it doesn't make sense for 
<span class="emphasis"><em>in</em></span> parameters. 
</p></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="glib-Limits-of-Basic-Types.html"><b>&lt;&lt; Limits of Basic Types</b></a></td><td align="right"><a accesskey="n" href="glib-Type-Conversion-Macros.html"><b>Type Conversion Macros &gt;&gt;</b></a></td></tr></table></body></html>