Effect of the spin-lattice coupling on the magnetic specific heat in the case of a three-dimensional lattice and a one-dimensional Ising magnet