public
Last active

  • Download Gist
gistfile1.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
diff --git a/ext/bluecloth.h b/ext/bluecloth.h
index 230618b..97053b5 100644
--- a/ext/bluecloth.h
+++ b/ext/bluecloth.h
@@ -7,20 +7,21 @@
#ifndef BLUECLOTH_H
#define BLUECLOTH_H
+#include "ruby.h"
+
+#if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
+# define M17N_SUPPORTED
+# include "ruby/encoding.h"
+#endif
+
#include "config.h"
#include "assert.h"
#include "mkdio.h"
-#include "ruby.h"
void mkd_initialize _(( void ));
void mkd_with_html5_tags _(( void ));
-#if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
-# define M17N_SUPPORTED
-# include "ruby/encoding.h"
-#endif
-
/* Replace the macro from encoding.h that refers to static 'rb_encoding_list' */
#ifdef ENC_FROM_ENCINDEX
#undef ENC_FROM_ENCINDEX

It works, but I had to add the following lines after line 32 in order to compile:

#define ENC_FROM_ENCINDEX(idx) (rb_enc_from_index(idx))
#endif

#endif

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.