If the halyard or topping lift is external, replace the upper block with one that has a becket. A single block, no becket, goes to the shackle end. The topping lift is attached to the becket on the upper block, then runs down to the shackle block, back up to the top then down to work it's way back to a cleat or winch.
If it's internal, you'd have to fix an eyestrap to the mast, just below the exit block for the end of the topping lift to be tied off.
On a personal note, I prefer topping lifts, spinnaker halyards etc. to either be run externally or to exit the side of the mast high enough that a crew can jump them, rather than going back to the cockpit to hoist.