def update_ptr
      ptr.clear
      if (not (arry_type = self.class.ary_type).is_a?(Symbol)) 
        if arry_type.respond_to? :to_native
          ary.each {|item| ptr.write_pointer(arry_type.to_native(item, nil)) }
        elsif arry_type.method_defined? :bytes
          ptr.write_bytes(ary.map {|item| item.respond.bytes }.join)
        elsif arry_type.method_defined? :pointer
          ary.each do |item|
            if item.size == item.pointer.size
              ptr.write_bytes((itm_ptr = item.pointer).read_bytes(itm_ptr.size))
            else
              raise ArgumentError, "Cannot reliably convert `#{item}' to a native_type"
            end
          end
        else
          raise ArgumentError, "Cannot reliably convert `#{arry_type}' to a native_type"
        end
      else
        Utils.put_array_typedef(ptr, arry_type, ary)
      end
      update_ptr_cache
      #self.ptr_cache_hash = @bytes.hash # @FIXME ptr_hash() and @bytes.hash should be the same...
    end
def update_ptr
      ptr.clear
      if (not (arry_type = self.class.ary_type).is_a?(Symbol)) 
        if arry_type.respond_to? :to_native
          ary.each {|item| ptr.write_pointer(arry_type.to_native(item, nil)) }
        elsif arry_type.method_defined? :bytes
          ptr.write_bytes(ary.map {|item| item.respond.bytes }.join)
        elsif arry_type.method_defined? :pointer
          ary.each do |item|
            if item.size == item.pointer.size
              ptr.write_bytes((itm_ptr = item.pointer).read_bytes(itm_ptr.size))
            else
              raise ArgumentError, "Cannot reliably convert `#{item}' to a native_type"
            end
          end
        else
          raise ArgumentError, "Cannot reliably convert `#{arry_type}' to a native_type"
        end
      else
        Utils.put_array_typedef(ptr, arry_type, ary)
      end
      update_ptr_cache
      #self.ptr_cache_hash = @bytes.hash # @FIXME ptr_hash() and @bytes.hash should be the same...
    end
def update_ptr ptr . clear if ( not ( arry_type = self . class . ary_type ) . is_a? ( Symbol ) ) if arry_type . respond_to? :to_native ary . each { | item | ptr . write_pointer ( arry_type . to_native ( item , nil ) ) } elsif arry_type . method_defined? :bytes ptr . write_bytes ( ary . map { | item | item . respond . bytes } . join ) elsif arry_type . method_defined? :pointer ary . each do | item | if item . size == item . pointer . size ptr . write_bytes ( ( itm_ptr = item . pointer ) . read_bytes ( itm_ptr . size ) ) else raise ArgumentError , "Cannot reliably convert `#{item}' to a native_type" end end else raise ArgumentError , "Cannot reliably convert `#{arry_type}' to a native_type" end else Utils . put_array_typedef ( ptr , arry_type , ary ) end update_ptr_cache #self.ptr_cache_hash = @bytes.hash # @FIXME ptr_hash() and @bytes.hash should be the same... end
this is slightly dangerous, if anything was still pointing to old pointer location
 now its being reclaimed, this will change it
 @return [Integer] hash
this is slightly dangerous if anything was still pointing to old pointer location now its being reclaimed this will change it