Method: RCSimCinterface.rcsim_make_concat

Defined in:
ext/hruby_sim/hruby_rcsim_build.c

.rcsim_make_concat(type, dirV) ⇒ Object

Creating a concat C object.



827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
# File 'ext/hruby_sim/hruby_rcsim_build.c', line 827

VALUE rcsim_make_concat(VALUE mod, VALUE type, VALUE dirV) {
    // printf("rcsim_make_concat\n");
    /* Allocates the concat. */
    Concat concat = (Concat)malloc(sizeof(ConcatS));
    // printf("concat=%p\n",concat);
    /* Set it up. */
    concat->kind = CONCAT;
    concat->owner = NULL;
    value_to_rcsim(TypeS,type,concat->type);
    concat->num_exprs = 0;
    concat->exprs = NULL;
    concat->dir = rb_id2name(SYM2ID(dirV))[0]=='l' ? 1 : 0;
    /* Returns the C concat embedded into a ruby VALUE. */
    VALUE res;
    rcsim_to_value(ConcatS,concat,res);
    return res;
}