diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/gcc~13/modern-gnu-objective-c-runtime-api.html | |
new repository
Diffstat (limited to 'devdocs/gcc~13/modern-gnu-objective-c-runtime-api.html')
| -rw-r--r-- | devdocs/gcc~13/modern-gnu-objective-c-runtime-api.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/devdocs/gcc~13/modern-gnu-objective-c-runtime-api.html b/devdocs/gcc~13/modern-gnu-objective-c-runtime-api.html new file mode 100644 index 00000000..48114515 --- /dev/null +++ b/devdocs/gcc~13/modern-gnu-objective-c-runtime-api.html @@ -0,0 +1,18 @@ +<div class="subsection-level-extent" id="Modern-GNU-Objective-C-runtime-API"> <div class="nav-panel"> <p> Next: <a href="traditional-gnu-objective-c-runtime-api" accesskey="n" rel="next">Traditional GNU Objective-C Runtime API</a>, Up: <a href="gnu-objective-c-runtime-api" accesskey="u" rel="up">GNU Objective-C Runtime API</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="subsection" id="Modern-GNU-Objective-C-Runtime-API"><span>8.1.1 Modern GNU Objective-C Runtime API<a class="copiable-link" href="#Modern-GNU-Objective-C-Runtime-API"> ¶</a></span></h1> <p>The GNU Objective-C runtime provides an API which is similar to the one provided by the “Objective-C 2.0” Apple/NeXT Objective-C runtime. The API is documented in the public header files of the GNU Objective-C runtime: </p> <ul class="itemize mark-bullet"> <li> +<samp class="file">objc/objc.h</samp>: this is the basic Objective-C header file, defining the basic Objective-C types such as <code class="code">id</code>, <code class="code">Class</code> and <code class="code">BOOL</code>. You have to include this header to do almost anything with Objective-C. </li> +<li> +<samp class="file">objc/runtime.h</samp>: this header declares most of the public runtime API functions allowing you to inspect and manipulate the Objective-C runtime data structures. These functions are fairly standardized across Objective-C runtimes and are almost identical to the Apple/NeXT Objective-C runtime ones. It does not declare functions in some specialized areas (constructing and forwarding message invocations, threading) which are in the other headers below. You have to include <samp class="file">objc/objc.h</samp> and <samp class="file">objc/runtime.h</samp> to use any of the functions, such as <code class="code">class_getName()</code>, declared in <samp class="file">objc/runtime.h</samp>. </li> +<li> +<samp class="file">objc/message.h</samp>: this header declares public functions used to construct, deconstruct and forward message invocations. Because messaging is done in quite a different way on different runtimes, functions in this header are specific to the GNU Objective-C runtime implementation. </li> +<li> +<samp class="file">objc/objc-exception.h</samp>: this header declares some public functions related to Objective-C exceptions. For example functions in this header allow you to throw an Objective-C exception from plain C/C++ code. </li> +<li> +<samp class="file">objc/objc-sync.h</samp>: this header declares some public functions related to the Objective-C <code class="code">@synchronized()</code> syntax, allowing you to emulate an Objective-C <code class="code">@synchronized()</code> block in plain C/C++ code. </li> +<li> +<samp class="file">objc/thr.h</samp>: this header declares a public runtime API threading layer that is only provided by the GNU Objective-C runtime. It declares functions such as <code class="code">objc_mutex_lock()</code>, which provide a platform-independent set of threading functions. </li> +</ul> <p>The header files contain detailed documentation for each function in the GNU Objective-C runtime API. </p> </div> <div class="nav-panel"> <p> Next: <a href="traditional-gnu-objective-c-runtime-api">Traditional GNU Objective-C Runtime API</a>, Up: <a href="gnu-objective-c-runtime-api">GNU Objective-C Runtime API</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div><div class="_attribution"> + <p class="_attribution-p"> + © Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br> + <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Modern-GNU-Objective-C-runtime-API.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Modern-GNU-Objective-C-runtime-API.html</a> + </p> +</div> |
