summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/-test-/string/normalize.c
diff options
context:
space:
mode:
authorJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-16 18:49:26 +0900
committerJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-30 00:39:06 +0900
commitfcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch)
tree64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/ext/-test-/string/normalize.c
Fresh start
Diffstat (limited to 'jni/ruby/ext/-test-/string/normalize.c')
-rw-r--r--jni/ruby/ext/-test-/string/normalize.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/jni/ruby/ext/-test-/string/normalize.c b/jni/ruby/ext/-test-/string/normalize.c
new file mode 100644
index 0000000..2e16a46
--- /dev/null
+++ b/jni/ruby/ext/-test-/string/normalize.c
@@ -0,0 +1,17 @@
+#include "internal.h"
+
+#ifdef __APPLE__
+static VALUE
+normalize_ospath(VALUE str)
+{
+ return rb_str_normalize_ospath(RSTRING_PTR(str), RSTRING_LEN(str));
+}
+#else
+#define normalize_ospath rb_f_notimplement
+#endif
+
+void
+Init_normalize(VALUE klass)
+{
+ rb_define_method(klass, "normalize_ospath", normalize_ospath, 0);
+}