Initial layout/commit.
FossilOrigin-Name: 5ccedce83232d9c4f5341866293f884fde8bcc9c1df2ea7407740d2d984fae9b
This commit is contained in:
commit
6a7bfb722f
17 changed files with 305 additions and 0 deletions
11
ext/mdbx_ext/extconf.rb
Executable file
11
ext/mdbx_ext/extconf.rb
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env ruby
|
||||
# vim: set noet sta sw=4 ts=4 :
|
||||
|
||||
require 'mkmf'
|
||||
|
||||
have_library( 'mdbx' ) or abort "No mdbx library!"
|
||||
have_header( 'mdbx.h' ) or abort "No mdbx.h header!"
|
||||
|
||||
create_header()
|
||||
create_makefile( 'mdbx_ext' )
|
||||
|
||||
15
ext/mdbx_ext/mdbx_ext.c
Normal file
15
ext/mdbx_ext/mdbx_ext.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* vim: set noet sta sw=4 ts=4 : */
|
||||
|
||||
#include "mdbx_ext.h"
|
||||
|
||||
|
||||
/*
|
||||
* MDBX initialization
|
||||
*/
|
||||
void
|
||||
Init_mdbx_ext()
|
||||
{
|
||||
mdbx_mMDBX = rb_define_module( "MDBX" );
|
||||
rb_define_const( mdbx_mMDBX, "LIBRARY_VERSION", rb_str_new_cstr(mdbx_version.git.describe) );
|
||||
}
|
||||
|
||||
13
ext/mdbx_ext/mdbx_ext.h
Normal file
13
ext/mdbx_ext/mdbx_ext.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
#include <ruby.h>
|
||||
#include "extconf.h"
|
||||
|
||||
#include "mdbx.h"
|
||||
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
Globals
|
||||
------------------------------------------------------------ */
|
||||
|
||||
VALUE mdbx_mMDBX;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue