summaryrefslogtreecommitdiff
path: root/ext/-test-/add_suffix/bug.c
blob: cd215338e0c3ea3acb43a513161f80ed10474940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "ruby.h"
#include "ruby/defines.h"
#include "ruby/util.h"
#ifndef HAVE_RUBY_ADD_SUFFIX
#define _WIN32 1
#include "util.c"
#endif

static VALUE
add_suffix(VALUE self, VALUE path, VALUE suffix)
{
    StringValueCStr(path);
    ruby_add_suffix(path, StringValueCStr(suffix));
    return path;
}

void
Init_bug(void)
{
    VALUE mBug = rb_define_module("Bug");
    rb_define_module_function(mBug, "add_suffix", add_suffix, 2);
}