Sha256: 4064aa21a79fd0fdc508a0359cb0463e4d73b6b002b05189dea0b6a9c43bd028

Contents?: true

Size: 560 Bytes

Versions: 3

Compression:

Stored size: 560 Bytes

Contents

<%
set name: "new"
set singleton: true
%>
/*
  @overload <%=name%>(<%=args.map{|a| a[1]}.join(",")%>)
  @param  [Integer]  <%=args[0][1]%> parameter
  @param  [Integer]  <%=args[1][1]%> parameter

  allocate instance of <%=class_name%> class.

<%= desc %>
 */
static VALUE
<%=c_func(2)%>(VALUE klass, VALUE v1, VALUE v2)
{
    <%=struct%> *w;
    w = <%=func_name%>(NUM2SIZET(v1), NUM2SIZET(v2));
    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_new_sizet_x2.c
numo-gsl-0.1.1 ext/numo/gsl/gen/tmpl/c_new_sizet_x2.c
numo-gsl-0.1.0 ext/numo/gsl/gen/tmpl/c_new_sizet_x2.c