⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__apr__hash.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<pre></pre><p>
<pre> int sum_values(apr_pool_t *p, apr_hash_t *ht)
 {
     apr_hash_index_t *hi;
     void *val;
     int sum = 0;
     for (hi = apr_hash_first(p, ht); hi; hi = apr_hash_next(hi)) {
         apr_hash_this(hi, NULL, NULL, &amp;val);
         sum += *(int *)val;
     }
     return sum;
 }
 </pre>     </td>
  </tr>
</table>
<a class="anchor" name="ga8" doxytag="apr_hash.h::apr_hash_get" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void* apr_hash_get           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>ht</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const void *&nbsp;</td>
          <td class="mdname" nowrap> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>apr_ssize_t&nbsp;</td>
          <td class="mdname" nowrap> <em>klen</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Look up the value associated with a key in a hash table. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>ht</em>&nbsp;</td><td>The hash table </td></tr>
    <tr><td></td><td valign=top><em>key</em>&nbsp;</td><td>Pointer to the key </td></tr>
    <tr><td></td><td valign=top><em>klen</em>&nbsp;</td><td>Length of the key. Can be APR_HASH_KEY_STRING to use the string length. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Returns NULL if the key is not present. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="apr_hash.h::apr_hash_make" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a>* apr_hash_make           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pool</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a hash table. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>pool</em>&nbsp;</td><td>The pool to allocate the hash table out of </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The hash table just created </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga5" doxytag="apr_hash.h::apr_hash_make_custom" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a>* apr_hash_make_custom           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pool</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__apr__hash.html#ga2">apr_hashfunc_t</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>hash_func</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a hash table with a custom hash function <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>pool</em>&nbsp;</td><td>The pool to allocate the hash table out of </td></tr>
    <tr><td></td><td valign=top><em>hash_func</em>&nbsp;</td><td>A custom hash function. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The hash table just created </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga14" doxytag="apr_hash.h::apr_hash_merge" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a>* apr_hash_merge           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>h1</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>h2</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>void *(*&nbsp;</td>
          <td class="mdname" nowrap> <em>merger</em>)(<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const void *key, apr_ssize_t klen, const void *h1_val, const void *h2_val, const void *data), </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const void *&nbsp;</td>
          <td class="mdname" nowrap> <em>data</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Merge two hash tables into one new hash table. If the same key is present in both tables, call the supplied merge function to produce a merged value for the key in the new table. Both hash tables must use the same hash function. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>p</em>&nbsp;</td><td>The pool to use for the new hash table </td></tr>
    <tr><td></td><td valign=top><em>h1</em>&nbsp;</td><td>The first of the tables to merge </td></tr>
    <tr><td></td><td valign=top><em>h2</em>&nbsp;</td><td>The second of the tables to merge </td></tr>
    <tr><td></td><td valign=top><em>merger</em>&nbsp;</td><td>A callback function to merge values, or NULL to make values from h1 override values from h2 (same semantics as <a class="el" href="group__apr__hash.html#ga13">apr_hash_overlay()</a>) </td></tr>
    <tr><td></td><td valign=top><em>data</em>&nbsp;</td><td>Client data to pass to the merger function </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A new hash table containing all of the data from the two passed in </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga10" doxytag="apr_hash.h::apr_hash_next" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a>* apr_hash_next           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>hi</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -