set var implementation, using void_p