Sha256: 6418a0b150c84aa46fe9d95d2dbdc6ce25368b329296eadeb508f2f1e0d415e4

Contents?: true

Size: 735 Bytes

Versions: 8

Compression:

Stored size: 735 Bytes

Contents

#include "packaged_source.h"

VALUE rb_mRCEE;
VALUE rb_mPackagedSource;
VALUE rb_cPackagedSourceExtension;

static VALUE
rb_packaged_source_extension_class_do_something(VALUE self)
{
  int major, minor, patch;

  yaml_get_version(&major, &minor, &patch);

  return rb_sprintf("libyaml version %d.%d.%d", major, minor, patch);
}

void
Init_packaged_source(void)
{
  rb_mRCEE = rb_define_module("RCEE");
  rb_mPackagedSource = rb_define_module_under(rb_mRCEE, "PackagedSource");
  rb_cPackagedSourceExtension = rb_define_class_under(rb_mPackagedSource, "Extension", rb_cObject);
  rb_define_singleton_method(rb_cPackagedSourceExtension, "do_something",
                             rb_packaged_source_extension_class_do_something, 0);
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rcee_packaged_source-0.6.0 ext/packaged_source/packaged_source.c
rcee_packaged_source-0.5.0.1 ext/packaged_source/packaged_source.c
rcee_packaged_source-0.5.1 ext/packaged_source/packaged_source.c
rcee_packaged_source-0.5.0 ext/packaged_source/packaged_source.c
rcee_packaged_source-0.4.0 ext/packaged_source/packaged_source.c
rcee_packaged_source-0.3.0 ext/packaged_source/packaged_source.c
rcee_packaged_source-0.2.0 ext/packaged_source/packaged_source.c
rcee_packaged_source-0.1.0 ext/packaged_source/packaged_source.c