Flowdock
method

remove_callback_internal

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: DL
remove_callback_internal(proc_entry, addr_entry, addr, ctype = nil) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File ext/dl/lib/dl/callback.rb, line 70
  def remove_callback_internal(proc_entry, addr_entry, addr, ctype = nil)
    if DL.fiddle?
      addr = addr.to_i
      return false unless proc_entry.key?(addr)
      proc_entry.delete(addr)
      true
    else
      index = nil
      if( ctype )
        addr_entry[ctype].each_with_index{|xaddr, idx|
          if( xaddr == addr )
            index = idx
          end
        }
      else
        addr_entry.each{|ty,entry|
          entry.each_with_index{|xaddr, idx|
            if( xaddr == addr )
              index = idx
            end
          }
        }
      end
      if( index and proc_entry[ctype][index] )
        proc_entry[ctype][index] = nil
        return true
      else
        return false
      end
    end
  end
Register or log in to add new notes.