ext/glib2/rbglib-bytes.c in glib2-3.4.3 vs ext/glib2/rbglib-bytes.c in glib2-3.4.4
- old
+ new
@@ -1,8 +1,8 @@
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/*
- * Copyright (C) 2017-2019 Ruby-GNOME Project Team
+ * Copyright (C) 2017-2021 Ruby-GNOME Project Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
@@ -30,11 +30,10 @@
rbg_is_bytes(VALUE object)
{
return RVAL2CBOOL(rb_obj_is_kind_of(object, RG_TARGET_NAMESPACE));
}
-#if GLIB_CHECK_VERSION(2, 32, 0)
static VALUE RG_TARGET_NAMESPACE;
static VALUE
rg_s_try_convert(VALUE self, VALUE value)
{
@@ -117,23 +116,20 @@
bytes = _SELF(self);
data = g_bytes_get_data(bytes, NULL);
return ULONG2NUM((guintptr)data);
}
-#endif
void
Init_glib_bytes(void)
{
-#if GLIB_CHECK_VERSION(2, 32, 0)
RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_BYTES, "Bytes", mGLib);
RG_DEF_SMETHOD(try_convert, 1);
RG_DEF_METHOD(initialize, -1);
RG_DEF_METHOD(to_s, 0);
RG_DEF_ALIAS("to_str", "to_s");
RG_DEF_METHOD(size, 0);
RG_DEF_ALIAS("length", "size");
RG_DEF_METHOD(pointer, 0);
-#endif
}