Module: Kernel
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#srn_dst(s1, s2) ⇒ Object
printf(“00000 A:%s B:%s %fn”,a,b,*d);.
Instance Method Details
#srn_dst(s1, s2) ⇒ Object
printf(“00000 A:%s B:%s %fn”,a,b,*d);
152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'ext/vmaext/vmaext.c', line 152
VALUE _srn_dst(VALUE self, VALUE s1, VALUE s2) {
VALUE ret;
float d;
void **ptr = malloc(sizeof(void *) * 3);
ptr[0] = (void *)StringValueCStr(s1);
ptr[1] = (void *)StringValueCStr(s2);
ptr[2] = (void *)&d;
rb_thread_call_without_gvl(srn_dst_wrap, ptr, NULL, NULL);
// d = srn_dst(StringValueCStr(s1), StringValueCStr(s2));
ret = rb_float_new(d);
free(ptr);
return ret;
}
|