%{ #include %} function key_type:string(_ptr:long) %{ struct key_type *type = (struct key_type *)(long)kread(&(THIS->_ptr)); snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", type->name); CATCH_DEREF_FAULT(); %}