Added method to unregister function
This commit is contained in:
parent
d48181b832
commit
3b8f87212f
@ -238,5 +238,11 @@ func (machine *Machine) Register (id int, function MachineFunction) (err error)
|
||||
return
|
||||
}
|
||||
|
||||
// Unregister removes a function that is registered at the specified ID.
|
||||
func (machine *Machine) Unregister (id int) {
|
||||
if machine.functions == nil { return }
|
||||
delete(machine.functions, id)
|
||||
}
|
||||
|
||||
// Milk milks the stack machine
|
||||
func (machine *Machine) Milk () {}
|
||||
|
Loading…
Reference in New Issue
Block a user