Sha256: ebed8f0c166927b1366c9ce2184197f471c967928e2cf1e517c1491f45cf96af

Contents?: true

Size: 339 Bytes

Versions: 3

Compression:

Stored size: 339 Bytes

Contents

<%
set name: "new"
set singleton: true
%>
/*
  :nodoc:
 */
static VALUE
<%=c_func(1)%>(VALUE self, const <%=type_struct%> *t)
{
    <%=struct%> *w;

    w = <%=func_name%>(t);
    if (!w) {
        rb_raise(rb_eNoMemError,"fail to allocate struct");
    }
    return TypedData_Wrap_Struct(<%=class_var%>, &<%=data_type_var%>, (void*)w);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
numo-gsl-0.1.2 ext/numo/gsl/gen/tmpl/c_super_new_void.c
numo-gsl-0.1.1 ext/numo/gsl/gen/tmpl/c_super_new_void.c
numo-gsl-0.1.0 ext/numo/gsl/gen/tmpl/c_super_new_void.c