static PyObject *
pyvserver_get_version(PyObject UNUSED *self, PyObject UNUSED *args)
{
  int ver = vc_get_version();
  if (ver == -1)
    return PyErr_SetFromErrno(PyExc_OSError);

  return Py_BuildValue("i", ver);
}
static char *
getAPIVer(char *buf)
{
  int		v = vc_get_version();
  size_t	l;
  
  if (v==-1) return 0;

  
  l = utilvserver_fmt_xulong(0, (unsigned int)v);
  memcpy(buf, "0x00000000", 10);
  utilvserver_fmt_xulong(buf+2+8-l, (unsigned int)v);

  return buf;
}
Exemple #3
0
static PyObject * 
_vs_vc_get_version(PyObject *self)
{
  return PyInt_FromLong(vc_get_version());
}