<html>#2384: cctk.h includes cctk_Arguments.h
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>trivial</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>As of git hash <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/commits/28a0e1d95f02bd9785529ddb278e22c9d3ac0bf4" rel="nofollow">28a0e1d9</a> "This patch makes the CST stage create prototypes for all scheduled functions into a new file cctk_ScheduleFunctions.h, which is included into cctk.h." of <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus" rel="nofollow">cactus</a> (about 9 years ago) <code>cctk.h</code> includes via <code>${thorn}_Schedule.h</code> and the generated function prototypes for scheduled routines, the file <code>cctk_Arguments.h</code>. This means that a file like this:</p>
<div class="codehilite language-c"><pre><span></span><span class="cp">#include</span> <span class="cpf">&lt;cctk.h&gt;</span><span class="cp"></span>

<span class="kt">void</span> <span class="nf">Null_Fun</span><span class="p">(</span><span class="n">CCTK_ARGUMENTS</span><span class="p">)</span> <span class="p">{</span>
  <span class="n">DECLARE_CCTK_ARGUMENTS</span><span class="p">;</span>
  <span class="k">return</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>


<p>compiles. This is somewhat surprising as the thorn writing docs <a data-is-external-link="true" href="http://einsteintoolkit.org/usersguide/UsersGuidech9.html#x13-85000C1.6.2" rel="nofollow">http://einsteintoolkit.org/usersguide/UsersGuidech9.html#x13-85000C1.6.2</a> says that the file should be included.</p>
<p>For the most part code in the ET actually does so, though at least one file (MoL/src/MoLPreSync.cc) does not.</p>
<p>The prototypes are generated only for C routines where <code>CCTK_ARGUMENTS</code> always ends up being <code>cGH *cctkGH</code> though the route there is somewhat convoluted and involves a define (generated in <code>GridFunStuff.pl</code>):</p>
<div class="codehilite language-perl"><pre><span></span><span class="nb">push</span><span class="p">(</span><span class="nv">@data</span><span class="p">,</span> <span class="s">&#39;#define CCTK_ARGUMENTS CCTK_CARGUM
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2384/cctkh-includes-cctk_argumentsh'>https://bitbucket.org/einsteintoolkit/tickets/issues/2384/cctkh-includes-cctk_argumentsh</a></p>
</html>