class Cproton::Pn_uuid_t
Public Class Methods
new(*args)
click to toggle source
SWIGINTERN VALUE _wrap_new_pn_uuid_t(int argc, VALUE *argv, VALUE self) { pn_uuid_t *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } result = (pn_uuid_t *)calloc(1, sizeof(pn_uuid_t)); DATA_PTR(self) = result; return self; fail: return Qnil; }
Public Instance Methods
bytes(*args)
click to toggle source
SWIGINTERN VALUE _wrap_pn_uuid_t_bytes_get(int argc, VALUE *argv, VALUE self) { pn_uuid_t *arg1 = (pn_uuid_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_uuid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_uuid_t *","bytes", 1, self )); } arg1 = (pn_uuid_t *)(argp1); result = (char *)(char *) ((arg1)->bytes); { size_t size = 16; while (size && (result[size - 1] == '\0')) --size; vresult = SWIG_FromCharPtrAndSize(result, size); } return vresult; fail: return Qnil; }
bytes=(*args)
click to toggle source
SWIGINTERN VALUE _wrap_pn_uuid_t_bytes_set(int argc, VALUE *argv, VALUE self) { pn_uuid_t *arg1 = (pn_uuid_t *) 0 ; char *arg2 ; void *argp1 = 0 ; int res1 = 0 ; char temp2[16] ; int res2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_uuid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_uuid_t *","bytes", 1, self )); } arg1 = (pn_uuid_t *)(argp1); res2 = SWIG_AsCharArray(argv[0], temp2, 16); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [16]","bytes", 2, argv[0] )); } arg2 = (char *)(temp2); if (arg2) memcpy(arg1->bytes,arg2,16*sizeof(char)); else memset(arg1->bytes,0,16*sizeof(char)); return Qnil; fail: return Qnil; }