File: M000026.html

package info (click to toggle)
libfam-ruby 0.2.0-2.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 360 kB
  • sloc: ansic: 412; ruby: 119; makefile: 7
file content (31 lines) | stat: -rw-r--r-- 907 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>close (Fam::Connection)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre>/* this causes a segfault, since ruby attempts to close the connection
 * when it goes out of scope.  We'll let ruby take care of it. :) */
static VALUE fam_conn_close(VALUE self)
{
  FAMConnection *conn;
  int err;

  Data_Get_Struct(self, FAMConnection, conn);
  err = FAMClose(conn);
  DATA_PTR(self) = NULL;

  if (err == -1) {
    rb_raise(eError, &quot;Couldn't close FAM connection: %s&quot;, fam_error());
  }
  
  return self;
}</pre>
</body>
</html>