Пример #1
0
static PyObject *
Context_chmod (Context *self, PyObject *args)
{
  int ret;
  char *uri = NULL;
  mode_t mode = 0;
  smbc_chmod_fn fn;

  if (!PyArg_ParseTuple (args, "si", &uri, &mode))
    {
      return NULL;
    }

  errno = 0;
  fn = smbc_getFunctionChmod (self->context);
  ret = (*fn) (self->context, uri, mode);
  if (ret < 0)
    {
      pysmbc_SetFromErrno ();
      return NULL;
    }

  return PyLong_FromLong (ret);
}
Пример #2
0
int
smbc_chmod(const char *url,
           mode_t mode)
{
        return smbc_getFunctionChmod(statcont)(statcont, url, mode);
}