Class: GSSAPI::LibGSSAPI::ManagedGssBufferDesc
- Inherits:
-
GssMStruct
- Object
- FFI::ManagedStruct
- GssMStruct
- GSSAPI::LibGSSAPI::ManagedGssBufferDesc
- Includes:
- GssBufferDescLayout
- Defined in:
- lib/gssapi/lib_gssapi.rb
Overview
This class implements the gss_buffer_desc type. Use #pointer to emulate gss_buffer_t Only functions that need to call gss_release_buffer should use this type. It states in the manpage for each function whether or not it should be called. If it does not you should be using UnManagedGssBufferDesc instead.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ptr = nil) ⇒ ManagedGssBufferDesc
constructor
A new instance of ManagedGssBufferDesc.
Methods included from GssBufferDescLayout
Constructor Details
#initialize(ptr = nil) ⇒ ManagedGssBufferDesc
Returns a new instance of ManagedGssBufferDesc.
114 115 116 117 118 119 120 |
# File 'lib/gssapi/lib_gssapi.rb', line 114 def initialize(ptr = nil) if(ptr.nil?) super(FFI::Pointer.new(FFI::MemoryPointer.new(self.size))) else super(ptr) end end |
Class Method Details
.release(ptr) ⇒ Object
122 123 124 125 126 |
# File 'lib/gssapi/lib_gssapi.rb', line 122 def self.release(ptr) puts "Releasing ManagedGssBufferDesc at #{ptr.address.to_s(16)}" if $DEBUG min_stat = FFI::MemoryPointer.new :OM_uint32 maj_stat = LibGSSAPI.gss_release_buffer(min_stat, ptr) end |