예제 #1
0
파일: ossl.c 프로젝트: kstephens/rubinius
VALUE
ossl_buf2str(char *buf, int len)
{
    VALUE str;

    str = ossl_str_new(len);
    if(!NIL_P(str)) memcpy(RSTRING_PTR(str), buf, len);
    OPENSSL_free(buf);

    return str;
}
예제 #2
0
파일: ossl.c 프로젝트: dennyc/openssl
VALUE
ossl_buf2str(char *buf, int len)
{
    VALUE str;
    int state;

    str = ossl_str_new(buf, len, &state);
    OPENSSL_free(buf);
    if (state)
	rb_jump_tag(state);
    return str;
}