static PyObject *Triton_convertRegToSymVar(PyObject *self, PyObject *args)
{
  PyObject *regId, *symVarSize, *varComment = nullptr;
  uint64 vs, ri;
  std::string vc;

  /* Extract arguments */
  PyArg_ParseTuple(args, "O|O|O", &regId, &symVarSize, &varComment);

  if (varComment == nullptr)
    varComment = PyString_FromString("");

  if (!PyLong_Check(regId) && !PyInt_Check(regId))
    return PyErr_Format(PyExc_TypeError, "convertRegToSymVar(): expected a IDREF.REG as first argument");

  if (!PyLong_Check(symVarSize) && !PyInt_Check(symVarSize))
    return PyErr_Format(PyExc_TypeError, "convertRegToSymVar(): expected a size as second argument");

  if (!PyString_Check(varComment))
      return PyErr_Format(PyExc_TypeError, "convertRegToSymVar(): expected a comment (string) as third argument");

  ri = PyLong_AsLong(regId);
  vs = PyLong_AsLong(symVarSize);
  vc = PyString_AsString(varComment);

  return PySymbolicVariable(ap.convertRegToSymVar(ri, vs, vc));
}