Pins is olde English for bolts, although it could be any kind of fixing. Pin is a verb. For example, someone might "pin your arms to your sides" with a big hug ::
OTOH the earliest surviving gun lock, a snapper, was nailed on :hmm:
Edit: Not forgetting that the matchlock barrel tang "pin" comes up from below and screws into the tang.