Created
July 21, 2010 17:39
-
-
Save texel/484823 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ruby.h" | |
VALUE ValuePrinter = Qnil; | |
void Init_value_printer(); | |
VALUE method_inspect_bytes(VALUE object); | |
void Init_value_printer() { | |
ValuePrinter = rb_define_module("ValuePrinter"); | |
rb_define_method(ValuePrinter, "inspect_bytes", method_inspect_bytes, 0); | |
} | |
VALUE method_inspect_bytes(VALUE object) { | |
printf("%p\n", (void *)object); | |
return Qnil; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment