Skip to content

Commit

Permalink
Added shell of implementation and tests for C structs in Ruby. Decide…
Browse files Browse the repository at this point in the history
…d to just refer to the example on the primary resource.
  • Loading branch information
mtodd committed Jul 8, 2009
1 parent 6caff15 commit 714c613
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/intermediate/intermediate.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "ruby.h"

#include "src/blocks_sample.c"
#include "src/c_structs_in_ruby_sample.c"

///////////////////////////////////////////////////////////////////////////////

Expand All @@ -10,4 +11,5 @@ void Init_intermediate();
void Init_intermediate() {
Intermediate = rb_define_module("Intermediate");
Init_blocks_sample();
Init_c_structs_in_ruby_sample();
}
6 changes: 6 additions & 0 deletions samples/intermediate/src/c_structs_in_ruby_sample.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "ruby.h"

void Init_c_structs_in_ruby_sample() {
// see the MP3Info and CDPlayer examples found at
// http://rubycentral.com/pickaxe/ext_ruby.html
}
4 changes: 4 additions & 0 deletions test/intermediate/c_structs_in_ruby_sample_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'test_helper'

# class CStructsInRubySampleTest < Test::Unit::TestCase
# end

0 comments on commit 714c613

Please sign in to comment.