update swift pointer
Merge pull request #666 from LipuFei/fix-swift-segfault

Fix swift segfault problem