Added user supplied argument to dsm callback
Created by: poine
It is common for libraries to allow an arbitrary user-supplied argument to be passed to a user-supplied callback. This allows, for example, to use an object's instance method as the callback. This patch adds a user supplied argument to the dsm callback.