So, there is no need of defining anything because python will return it during the function call. That helped. Thanks Derakon.
Any time that the C version of OpenGL code returns something by
reference, the Python version will just return the value directly. So
you should be able to do this:
selectBuff = glSelectBuffer(BUFFER_LENGTH)
viewport = glGetIntegerv(GL_VIEWPORT)