Method: RCSimCinterface.rcsim_make_refRange
- Defined in:
- ext/hruby_sim/hruby_rcsim_build.c
.rcsim_make_refRange(type, first, last, ref) ⇒ Object
Creating a ref range C object.
883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'ext/hruby_sim/hruby_rcsim_build.c', line 883 VALUE rcsim_make_refRange(VALUE mod, VALUE type, VALUE first, VALUE last, VALUE ref) { // printf("rcsim_make_refRange\n"); /* Allocates the ref range. */ RefRangeE refRange = (RefRangeE)malloc(sizeof(RefRangeES)); // printf("refRange=%p\n",refRange); /* Set it up. */ refRange->kind = REF_RANGE; refRange->owner = NULL; value_to_rcsim(TypeS,type,refRange->type); value_to_rcsim(ExpressionS,first,refRange->first); value_to_rcsim(ExpressionS,last,refRange->last); value_to_rcsim(ReferenceS,ref,refRange->ref); /* Returns the C ref range embedded into a ruby VALUE. */ VALUE res; rcsim_to_value(RefRangeES,refRange,res); return res; } |