move copy/put_event to core.macro