File: mysql2_ext.c

package info (click to toggle)
ruby-mysql2 0.5.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,096 kB
  • sloc: ansic: 3,459; ruby: 3,334; sh: 226; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <mysql2_ext.h>

VALUE mMysql2, cMysql2Error, cMysql2TimeoutError;

/* Ruby Extension initializer */
void Init_mysql2() {
  mMysql2 = rb_define_module("Mysql2");
  rb_global_variable(&mMysql2);

  cMysql2Error = rb_const_get(mMysql2, rb_intern("Error"));
  rb_global_variable(&cMysql2Error);

  cMysql2TimeoutError = rb_const_get(cMysql2Error, rb_intern("TimeoutError"));
  rb_global_variable(&cMysql2TimeoutError);

  init_mysql2_client();
  init_mysql2_result();
  init_mysql2_statement();
}