re40.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <title>&lt;GMatchInfo&gt;: </title>
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
  7. <link rel="home" href="index.html" title="">
  8. <link rel="up" href="ch01.html" title="GLib">
  9. <link rel="prev" href="re39.html" title="&lt;%GLibMarkupParseFlags&gt;">
  10. <link rel="next" href="re41.html" title="&lt;%GLibNormalizeMode&gt;">
  11. <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
  12. <link rel="stylesheet" href="style.css" type="text/css">
  13. </head>
  14. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  15. <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
  16. <td width="100%" align="left" class="shortcuts"></td>
  17. <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
  18. <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
  19. <td><a accesskey="p" href="re39.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
  20. <td><a accesskey="n" href="re41.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
  21. </tr></table>
  22. <div class="refentry">
  23. <a name="id-1.1.41"></a><div class="titlepage"></div>
  24. <div class="refnamediv">
  25. <h2>&lt;GMatchInfo&gt;</h2>
  26. <p>&lt;GMatchInfo&gt;</p>
  27. </div>
  28. <div class="refsect1">
  29. <a name="id-1.1.41.2"></a><h2>Description</h2>
  30. <p>A GMatchInfo is an opaque struct used to return information about
  31. matches.</p>
  32. </div>
  33. <div class="refsect1">
  34. <a name="id-1.1.41.3"></a><h2>Functions</h2>
  35. <div class="refsect2">
  36. <a name="id-1.1.41.3.2"></a><h3>expand-references</h3>
  37. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:expand-references self string-to-expand))
  38. </pre></div>
  39. <p>Returns a new string containing the text in <em class="parameter"><code>string_to_expand</code></em> with
  40. references and escape sequences expanded. References refer to the last
  41. match done with <em class="parameter"><code>string</code></em> against <em class="parameter"><code>regex</code></em> and have the same syntax used by
  42. <code class="function">g_regex_replace()</code>.
  43. </p>
  44. <p>The <em class="parameter"><code>string_to_expand</code></em> must be UTF-8 encoded even if <span class="type">G_REGEX_RAW</span> was
  45. passed to <code class="function">g_regex_new()</code>.
  46. </p>
  47. <p>The backreferences are extracted from the string passed to the match
  48. function, so you cannot call this function after freeing the string.
  49. </p>
  50. <p><em class="parameter"><code>match_info</code></em> may be <code class="constant">NULL</code> in which case <em class="parameter"><code>string_to_expand</code></em> must not
  51. contain references. For instance "foo\n" does not refer to an actual
  52. pattern and '\n' merely will be replaced with \n character,
  53. while to expand "\0" (whole match) one needs the result of a match.
  54. Use <code class="function">g_regex_check_replacement()</code> to find out whether <em class="parameter"><code>string_to_expand</code></em>
  55. contains references.</p>
  56. <div class="refsect3">
  57. <a name="id-1.1.41.3.2.7"></a><h4>Parameters</h4>
  58. <div class="informaltable"><table>
  59. <tr>
  60. <td class="parameter_name"><p>match_info</p></td>
  61. <td class="parameter_description">
  62. <p>a <span class="type">GMatchInfo</span> or <code class="constant">NULL</code></p>
  63. <p>Passed as <code class="code">self</code></p>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td class="parameter_name"><p>string_to_expand</p></td>
  68. <td class="parameter_description">
  69. <p>the string to expand</p>
  70. <p>Passed as <code class="code">string-to-expand</code></p>
  71. </td>
  72. </tr>
  73. </table></div>
  74. </div>
  75. </div>
  76. <div class="refsect2">
  77. <a name="id-1.1.41.3.3"></a><h3>fetch</h3>
  78. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:fetch self match-num))
  79. </pre></div>
  80. <p>Retrieves the text matching the <em class="parameter"><code>match_num</code></em>'th capturing
  81. parentheses. 0 is the full text of the match, 1 is the first paren
  82. set, 2 the second, and so on.
  83. </p>
  84. <p>If <em class="parameter"><code>match_num</code></em> is a valid sub pattern but it didn't match anything
  85. (e.g. sub pattern 1, matching "b" against "(a)?b") then an empty
  86. string is returned.
  87. </p>
  88. <p>If the match was obtained using the DFA algorithm, that is using
  89. <code class="function">g_regex_match_all()</code> or <code class="function">g_regex_match_all_full()</code>, the retrieved
  90. string is not that of a set of parentheses but that of a matched
  91. substring. Substrings are matched in reverse order of length, so
  92. 0 is the longest match.
  93. </p>
  94. <p>The string is fetched from the string passed to the match function,
  95. so you cannot call this function after freeing the string.</p>
  96. <div class="refsect3">
  97. <a name="id-1.1.41.3.3.7"></a><h4>Parameters</h4>
  98. <div class="informaltable"><table>
  99. <tr>
  100. <td class="parameter_name"><p>match_info</p></td>
  101. <td class="parameter_description">
  102. <p><span class="type">GMatchInfo</span> structure</p>
  103. <p>Passed as <code class="code">self</code></p>
  104. </td>
  105. </tr>
  106. <tr>
  107. <td class="parameter_name"><p>match_num</p></td>
  108. <td class="parameter_description">
  109. <p>number of the sub expression</p>
  110. <p>Passed as <code class="code">match-num</code></p>
  111. </td>
  112. </tr>
  113. </table></div>
  114. </div>
  115. </div>
  116. <div class="refsect2">
  117. <a name="id-1.1.41.3.4"></a><h3>fetch-all</h3>
  118. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:fetch-all self))
  119. </pre></div>
  120. <p>Bundles up pointers to each of the matching substrings from a match
  121. and stores them in an array of gchar pointers. The first element in
  122. the returned array is the match number 0, i.e. the entire matched
  123. text.
  124. </p>
  125. <p>If a sub pattern didn't match anything (e.g. sub pattern 1, matching
  126. "b" against "(a)?b") then an empty string is inserted.
  127. </p>
  128. <p>If the last match was obtained using the DFA algorithm, that is using
  129. <code class="function">g_regex_match_all()</code> or <code class="function">g_regex_match_all_full()</code>, the retrieved
  130. strings are not that matched by sets of parentheses but that of the
  131. matched substring. Substrings are matched in reverse order of length,
  132. so the first one is the longest match.
  133. </p>
  134. <p>The strings are fetched from the string passed to the match function,
  135. so you cannot call this function after freeing the string.</p>
  136. <div class="refsect3">
  137. <a name="id-1.1.41.3.4.7"></a><h4>Parameters</h4>
  138. <div class="informaltable"><table><tr>
  139. <td class="parameter_name"><p>match_info</p></td>
  140. <td class="parameter_description">
  141. <p>a <span class="type">GMatchInfo</span> structure</p>
  142. <p>Passed as <code class="code">self</code></p>
  143. </td>
  144. </tr></table></div>
  145. </div>
  146. </div>
  147. <div class="refsect2">
  148. <a name="id-1.1.41.3.5"></a><h3>fetch-named</h3>
  149. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:fetch-named self name))
  150. </pre></div>
  151. <p>Retrieves the text matching the capturing parentheses named <em class="parameter"><code>name</code></em>.
  152. </p>
  153. <p>If <em class="parameter"><code>name</code></em> is a valid sub pattern name but it didn't match anything
  154. (e.g. sub pattern "X", matching "b" against "(?P&lt;X&gt;a)?b")
  155. then an empty string is returned.
  156. </p>
  157. <p>The string is fetched from the string passed to the match function,
  158. so you cannot call this function after freeing the string.</p>
  159. <div class="refsect3">
  160. <a name="id-1.1.41.3.5.6"></a><h4>Parameters</h4>
  161. <div class="informaltable"><table>
  162. <tr>
  163. <td class="parameter_name"><p>match_info</p></td>
  164. <td class="parameter_description">
  165. <p><span class="type">GMatchInfo</span> structure</p>
  166. <p>Passed as <code class="code">self</code></p>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td class="parameter_name"><p>name</p></td>
  171. <td class="parameter_description">
  172. <p>name of the subexpression</p>
  173. <p>Passed as <code class="code">name</code></p>
  174. </td>
  175. </tr>
  176. </table></div>
  177. </div>
  178. </div>
  179. <div class="refsect2">
  180. <a name="id-1.1.41.3.6"></a><h3>fetch-named-pos</h3>
  181. <div class="informalexample"><pre class="programlisting">(define-values
  182. (%return start-pos end-pos)
  183. (match-info:fetch-named-pos self name))
  184. </pre></div>
  185. <p>Retrieves the position in bytes of the capturing parentheses named <em class="parameter"><code>name</code></em>.
  186. </p>
  187. <p>If <em class="parameter"><code>name</code></em> is a valid sub pattern name but it didn't match anything
  188. (e.g. sub pattern "X", matching "b" against "(?P&lt;X&gt;a)?b")
  189. then <em class="parameter"><code>start_pos</code></em> and <em class="parameter"><code>end_pos</code></em> are set to -1 and <code class="constant">TRUE</code> is returned.</p>
  190. <div class="refsect3">
  191. <a name="id-1.1.41.3.6.5"></a><h4>Parameters</h4>
  192. <div class="informaltable"><table>
  193. <tr>
  194. <td class="parameter_name"><p>match_info</p></td>
  195. <td class="parameter_description">
  196. <p><span class="type">GMatchInfo</span> structure</p>
  197. <p>Passed as <code class="code">self</code></p>
  198. </td>
  199. </tr>
  200. <tr>
  201. <td class="parameter_name"><p>name</p></td>
  202. <td class="parameter_description">
  203. <p>name of the subexpression</p>
  204. <p>Passed as <code class="code">name</code></p>
  205. </td>
  206. </tr>
  207. <tr>
  208. <td class="parameter_name"><p>start_pos</p></td>
  209. <td class="parameter_description">
  210. <p>pointer to location where to store
  211. the start position, or <code class="constant">NULL</code></p>
  212. <p>Passed as <code class="code">start-pos</code></p>
  213. </td>
  214. </tr>
  215. <tr>
  216. <td class="parameter_name"><p>end_pos</p></td>
  217. <td class="parameter_description">
  218. <p>pointer to location where to store
  219. the end position, or <code class="constant">NULL</code></p>
  220. <p>Passed as <code class="code">end-pos</code></p>
  221. </td>
  222. </tr>
  223. </table></div>
  224. </div>
  225. </div>
  226. <div class="refsect2">
  227. <a name="id-1.1.41.3.7"></a><h3>fetch-pos</h3>
  228. <div class="informalexample"><pre class="programlisting">(define-values
  229. (%return start-pos end-pos)
  230. (match-info:fetch-pos self match-num))
  231. </pre></div>
  232. <p>Retrieves the position in bytes of the <em class="parameter"><code>match_num</code></em>'th capturing
  233. parentheses. 0 is the full text of the match, 1 is the first
  234. paren set, 2 the second, and so on.
  235. </p>
  236. <p>If <em class="parameter"><code>match_num</code></em> is a valid sub pattern but it didn't match anything
  237. (e.g. sub pattern 1, matching "b" against "(a)?b") then <em class="parameter"><code>start_pos</code></em>
  238. and <em class="parameter"><code>end_pos</code></em> are set to -1 and <code class="constant">TRUE</code> is returned.
  239. </p>
  240. <p>If the match was obtained using the DFA algorithm, that is using
  241. <code class="function">g_regex_match_all()</code> or <code class="function">g_regex_match_all_full()</code>, the retrieved
  242. position is not that of a set of parentheses but that of a matched
  243. substring. Substrings are matched in reverse order of length, so
  244. 0 is the longest match.</p>
  245. <div class="refsect3">
  246. <a name="id-1.1.41.3.7.6"></a><h4>Parameters</h4>
  247. <div class="informaltable"><table>
  248. <tr>
  249. <td class="parameter_name"><p>match_info</p></td>
  250. <td class="parameter_description">
  251. <p><span class="type">GMatchInfo</span> structure</p>
  252. <p>Passed as <code class="code">self</code></p>
  253. </td>
  254. </tr>
  255. <tr>
  256. <td class="parameter_name"><p>match_num</p></td>
  257. <td class="parameter_description">
  258. <p>number of the sub expression</p>
  259. <p>Passed as <code class="code">match-num</code></p>
  260. </td>
  261. </tr>
  262. <tr>
  263. <td class="parameter_name"><p>start_pos</p></td>
  264. <td class="parameter_description">
  265. <p>pointer to location where to store
  266. the start position, or <code class="constant">NULL</code></p>
  267. <p>Passed as <code class="code">start-pos</code></p>
  268. </td>
  269. </tr>
  270. <tr>
  271. <td class="parameter_name"><p>end_pos</p></td>
  272. <td class="parameter_description">
  273. <p>pointer to location where to store
  274. the end position, or <code class="constant">NULL</code></p>
  275. <p>Passed as <code class="code">end-pos</code></p>
  276. </td>
  277. </tr>
  278. </table></div>
  279. </div>
  280. </div>
  281. <div class="refsect2">
  282. <a name="id-1.1.41.3.8"></a><h3>free</h3>
  283. <div class="informalexample"><pre class="programlisting">(define-values () (match-info:free self))
  284. </pre></div>
  285. <p>If <em class="parameter"><code>match_info</code></em> is not <code class="constant">NULL</code>, calls <code class="function">g_match_info_unref()</code>; otherwise does
  286. nothing.</p>
  287. <div class="refsect3">
  288. <a name="id-1.1.41.3.8.4"></a><h4>Parameters</h4>
  289. <div class="informaltable"><table><tr>
  290. <td class="parameter_name"><p>match_info</p></td>
  291. <td class="parameter_description">
  292. <p>a <span class="type">GMatchInfo</span>, or <code class="constant">NULL</code></p>
  293. <p>Passed as <code class="code">self</code></p>
  294. </td>
  295. </tr></table></div>
  296. </div>
  297. </div>
  298. <div class="refsect2">
  299. <a name="id-1.1.41.3.9"></a><h3>get-match-count</h3>
  300. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:get-match-count self))
  301. </pre></div>
  302. <p>Retrieves the number of matched substrings (including substring 0,
  303. that is the whole matched text), so 1 is returned if the pattern
  304. has no substrings in it and 0 is returned if the match failed.
  305. </p>
  306. <p>If the last match was obtained using the DFA algorithm, that is
  307. using <code class="function">g_regex_match_all()</code> or <code class="function">g_regex_match_all_full()</code>, the retrieved
  308. count is not that of the number of capturing parentheses but that of
  309. the number of matched substrings.</p>
  310. <div class="refsect3">
  311. <a name="id-1.1.41.3.9.5"></a><h4>Parameters</h4>
  312. <div class="informaltable"><table><tr>
  313. <td class="parameter_name"><p>match_info</p></td>
  314. <td class="parameter_description">
  315. <p>a <span class="type">GMatchInfo</span> structure</p>
  316. <p>Passed as <code class="code">self</code></p>
  317. </td>
  318. </tr></table></div>
  319. </div>
  320. </div>
  321. <div class="refsect2">
  322. <a name="id-1.1.41.3.10"></a><h3>get-regex</h3>
  323. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:get-regex self))
  324. </pre></div>
  325. <p>Returns <span class="type">GRegex</span> object used in <em class="parameter"><code>match_info</code></em>. It belongs to Glib
  326. and must not be freed. Use <code class="function">g_regex_ref()</code> if you need to keep it
  327. after you free <em class="parameter"><code>match_info</code></em> object.</p>
  328. <div class="refsect3">
  329. <a name="id-1.1.41.3.10.4"></a><h4>Parameters</h4>
  330. <div class="informaltable"><table><tr>
  331. <td class="parameter_name"><p>match_info</p></td>
  332. <td class="parameter_description">
  333. <p>a <span class="type">GMatchInfo</span></p>
  334. <p>Passed as <code class="code">self</code></p>
  335. </td>
  336. </tr></table></div>
  337. </div>
  338. </div>
  339. <div class="refsect2">
  340. <a name="id-1.1.41.3.11"></a><h3>get-string</h3>
  341. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:get-string self))
  342. </pre></div>
  343. <p>Returns the string searched with <em class="parameter"><code>match_info</code></em>. This is the
  344. string passed to <code class="function">g_regex_match()</code> or <code class="function">g_regex_replace()</code> so
  345. you may not free it before calling this function.</p>
  346. <div class="refsect3">
  347. <a name="id-1.1.41.3.11.4"></a><h4>Parameters</h4>
  348. <div class="informaltable"><table><tr>
  349. <td class="parameter_name"><p>match_info</p></td>
  350. <td class="parameter_description">
  351. <p>a <span class="type">GMatchInfo</span></p>
  352. <p>Passed as <code class="code">self</code></p>
  353. </td>
  354. </tr></table></div>
  355. </div>
  356. </div>
  357. <div class="refsect2">
  358. <a name="id-1.1.41.3.12"></a><h3>is-partial-match?</h3>
  359. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:is-partial-match? self))
  360. </pre></div>
  361. <p>Usually if the string passed to g_regex_match*() matches as far as
  362. it goes, but is too short to match the entire pattern, <code class="constant">FALSE</code> is
  363. returned. There are circumstances where it might be helpful to
  364. distinguish this case from other cases in which there is no match.
  365. </p>
  366. <p>Consider, for example, an application where a human is required to
  367. type in data for a field with specific formatting requirements. An
  368. example might be a date in the form ddmmmyy, defined by the pattern
  369. "^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$".
  370. If the application sees the user’s keystrokes one by one, and can
  371. check that what has been typed so far is potentially valid, it is
  372. able to raise an error as soon as a mistake is made.
  373. </p>
  374. <p>GRegex supports the concept of partial matching by means of the
  375. <span class="type">G_REGEX_MATCH_PARTIAL_SOFT</span> and <span class="type">G_REGEX_MATCH_PARTIAL_HARD</span> flags.
  376. When they are used, the return code for
  377. <code class="function">g_regex_match()</code> or <code class="function">g_regex_match_full()</code> is, as usual, <code class="constant">TRUE</code>
  378. for a complete match, <code class="constant">FALSE</code> otherwise. But, when these functions
  379. return <code class="constant">FALSE</code>, you can check if the match was partial calling
  380. <code class="function">g_match_info_is_partial_match()</code>.
  381. </p>
  382. <p>The difference between <span class="type">G_REGEX_MATCH_PARTIAL_SOFT</span> and
  383. <span class="type">G_REGEX_MATCH_PARTIAL_HARD</span> is that when a partial match is encountered
  384. with <span class="type">G_REGEX_MATCH_PARTIAL_SOFT</span>, matching continues to search for a
  385. possible complete match, while with <span class="type">G_REGEX_MATCH_PARTIAL_HARD</span> matching
  386. stops at the partial match.
  387. When both <span class="type">G_REGEX_MATCH_PARTIAL_SOFT</span> and <span class="type">G_REGEX_MATCH_PARTIAL_HARD</span>
  388. are set, the latter takes precedence.
  389. </p>
  390. <p>There were formerly some restrictions on the pattern for partial matching.
  391. The restrictions no longer apply.
  392. </p>
  393. <p>See pcrepartial(3) for more information on partial matching.</p>
  394. <div class="refsect3">
  395. <a name="id-1.1.41.3.12.9"></a><h4>Parameters</h4>
  396. <div class="informaltable"><table><tr>
  397. <td class="parameter_name"><p>match_info</p></td>
  398. <td class="parameter_description">
  399. <p>a <span class="type">GMatchInfo</span> structure</p>
  400. <p>Passed as <code class="code">self</code></p>
  401. </td>
  402. </tr></table></div>
  403. </div>
  404. </div>
  405. <div class="refsect2">
  406. <a name="id-1.1.41.3.13"></a><h3>matches?</h3>
  407. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:matches? self))
  408. </pre></div>
  409. <p>Returns whether the previous match operation succeeded.</p>
  410. <div class="refsect3">
  411. <a name="id-1.1.41.3.13.4"></a><h4>Parameters</h4>
  412. <div class="informaltable"><table><tr>
  413. <td class="parameter_name"><p>match_info</p></td>
  414. <td class="parameter_description">
  415. <p>a <span class="type">GMatchInfo</span> structure</p>
  416. <p>Passed as <code class="code">self</code></p>
  417. </td>
  418. </tr></table></div>
  419. </div>
  420. </div>
  421. <div class="refsect2">
  422. <a name="id-1.1.41.3.14"></a><h3>next?</h3>
  423. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:next? self))
  424. </pre></div>
  425. <p>Scans for the next match using the same parameters of the previous
  426. call to <code class="function">g_regex_match_full()</code> or <code class="function">g_regex_match()</code> that returned
  427. <em class="parameter"><code>match_info</code></em>.
  428. </p>
  429. <p>The match is done on the string passed to the match function, so you
  430. cannot free it before calling this function.</p>
  431. <div class="refsect3">
  432. <a name="id-1.1.41.3.14.5"></a><h4>Parameters</h4>
  433. <div class="informaltable"><table><tr>
  434. <td class="parameter_name"><p>match_info</p></td>
  435. <td class="parameter_description">
  436. <p>a <span class="type">GMatchInfo</span> structure</p>
  437. <p>Passed as <code class="code">self</code></p>
  438. </td>
  439. </tr></table></div>
  440. </div>
  441. </div>
  442. <div class="refsect2">
  443. <a name="id-1.1.41.3.15"></a><h3>ref</h3>
  444. <div class="informalexample"><pre class="programlisting">(define-values (%return) (match-info:ref self))
  445. </pre></div>
  446. <p>Increases reference count of <em class="parameter"><code>match_info</code></em> by 1.</p>
  447. <div class="refsect3">
  448. <a name="id-1.1.41.3.15.4"></a><h4>Parameters</h4>
  449. <div class="informaltable"><table><tr>
  450. <td class="parameter_name"><p>match_info</p></td>
  451. <td class="parameter_description">
  452. <p>a <span class="type">GMatchInfo</span></p>
  453. <p>Passed as <code class="code">self</code></p>
  454. </td>
  455. </tr></table></div>
  456. </div>
  457. </div>
  458. <div class="refsect2">
  459. <a name="id-1.1.41.3.16"></a><h3>unref</h3>
  460. <div class="informalexample"><pre class="programlisting">(define-values () (match-info:unref self))
  461. </pre></div>
  462. <p>Decreases reference count of <em class="parameter"><code>match_info</code></em> by 1. When reference count drops
  463. to zero, it frees all the memory associated with the match_info structure.</p>
  464. <div class="refsect3">
  465. <a name="id-1.1.41.3.16.4"></a><h4>Parameters</h4>
  466. <div class="informaltable"><table><tr>
  467. <td class="parameter_name"><p>match_info</p></td>
  468. <td class="parameter_description">
  469. <p>a <span class="type">GMatchInfo</span></p>
  470. <p>Passed as <code class="code">self</code></p>
  471. </td>
  472. </tr></table></div>
  473. </div>
  474. </div>
  475. </div>
  476. </div>
  477. <div class="footer">
  478. <hr>Generated by GTK-Doc V1.33.1</div>
  479. </body>
  480. </html>