-
Calling PyLong_AsLong resurrects the underlying python object again, which is something that PyPy is not liking. In addition to this, the code would call g_spawn_close_pid twice if the user did explicitly call the close method. This method does not make any sense, but it is exported already so probably should be left as-is. Add an internal copy of the GPid to the object that is set to 0/NULL when it is closed. Having this both avoids the double close_pid call and also avoids the need of resurrecting the object when freeing it.