class PyCall::LibPython::PyMethodDef

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/pycall/libpython/pytypeobject_struct.rb, line 75
def initialize(*args)
  case args.length
  when 3, 4
    name, meth, flags, doc = *args
    super()
    self.ml_name = name
    self[:ml_meth] = meth
    self[:ml_flags] = flags
    self.ml_doc = doc
  else
    super
  end
end

Public Instance Methods

ml_doc=(str) click to toggle source
# File lib/pycall/libpython/pytypeobject_struct.rb, line 94
def ml_doc=(str)
  @saved_doc = FFI::MemoryPointer.from_string(str || '')
  self.pointer.put_pointer(offset_of(:ml_name), @saved_doc)
end
ml_name=(str) click to toggle source
# File lib/pycall/libpython/pytypeobject_struct.rb, line 89
def ml_name=(str)
  @saved_name = FFI::MemoryPointer.from_string(str || '')
  self.pointer.put_pointer(offset_of(:ml_name), @saved_name)
end