Skip to content

Commit

Permalink
Fix for 1.9 and loading the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
evanphx committed Aug 7, 2012
1 parent b150e07 commit 687795a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ext/lost/extconf.rb
Expand Up @@ -2,4 +2,8 @@

$LDFLAGS += " -framework cocoa -framework CoreLocation "

if RUBY_VERSION > "1.8"
$defs.push "-DRUBY_19"
end

create_makefile("lost")
5 changes: 5 additions & 0 deletions ext/lost/lost.c
@@ -1,5 +1,10 @@
#include "ruby.h"

#ifdef RUBY_19
#include "ruby/intern.h"
#else
#include "intern.h"
#endif

int int_coreloc_enable();
void int_coreloc_get(double* lat, double* log);
Expand Down
4 changes: 2 additions & 2 deletions lib/lost.rb
@@ -1,7 +1,7 @@
require 'lost/lost.so'
require 'lost.so'

module Lost
VERSION = "1.0.0"
VERSION = "1.0.1"

coreloc_enable
end

0 comments on commit 687795a

Please sign in to comment.