Lines Matching refs:result

75  * In mixing the test with other tests or using negations will result in compile
698 long result;
722 result = PyLong_AsLongAndOverflow(index, &overflow);
725 uid = (uid_t)result;
727 if (result == -1) {
735 if (result < 0)
740 (long)uid != result)
804 long result;
828 result = PyLong_AsLongAndOverflow(index, &overflow);
831 gid = (gid_t)result;
833 if (result == -1) {
841 if (result < 0) {
847 (long)gid != result)
1073 * the result of PyOS_FSPath() is treated as the original object).
1798 int result;
1803 result = GetCurrentDirectoryW(Py_ARRAY_LENGTH(path_buf), new_path);
1804 if (!result)
1806 if (result > Py_ARRAY_LENGTH(path_buf)) {
1807 new_path = PyMem_RawMalloc(result * sizeof(wchar_t));
1812 result = GetCurrentDirectoryW(result, new_path);
1813 if (!result) {
1822 result = SetEnvironmentVariableW(env, new_path);
1826 return result ? TRUE : FALSE;
1893 win32_xstat_impl(const wchar_t *path, struct _Py_stat_struct *result,
1981 memset(result, 0, sizeof(*result));
1985 result->st_mode = _S_IFDIR;
1988 result->st_mode = _S_IFCHR;
1991 result->st_mode = _S_IFIFO;
2027 return win32_xstat_impl(path, result, TRUE);
2039 memset(result, 0, sizeof(*result));
2040 result->st_mode = 0x6000; /* S_IFBLK */
2048 _Py_attribute_data_to_stat(&fileInfo, tagInfo.ReparseTag, result);
2063 result->st_mode |= 0111;
2084 win32_xstat(const wchar_t *path, struct _Py_stat_struct *result, BOOL traverse)
2088 int code = win32_xstat_impl(path, result, traverse);
2103 win32_lstat(const wchar_t* path, struct _Py_stat_struct *result)
2105 return win32_xstat(path, result, FALSE);
2109 win32_stat(const wchar_t* path, struct _Py_stat_struct *result)
2111 return win32_xstat(path, result, TRUE);
2296 PyStructSequence *result;
2299 result = (PyStructSequence*)structseq_new(type, args, kwds);
2300 if (!result)
2306 if (result->ob_item[i+3] == Py_None) {
2308 Py_INCREF(result->ob_item[i]);
2309 result->ob_item[i+3] = result->ob_item[i];
2312 return (PyObject*)result;
2525 int result;
2543 result = FSTAT(path->fd, &st);
2546 result = win32_stat(path->wide, &st);
2548 result = win32_lstat(path->wide, &st);
2553 result = LSTAT(path->narrow, &st);
2559 result = fstatat(dir_fd, path->narrow, &st,
2567 result = STAT(path->narrow, &st);
2578 if (result != 0) {
2988 int result;
3036 result = faccessat(dir_fd, path->narrow, mode, flags);
3043 result = access(path->narrow, mode);
3063 return_value = !result;
3162 int result;
3171 result = !win32_wchdir(path->wide);
3175 result = fchdir(path->fd);
3178 result = chdir(path->narrow);
3182 if (result) {
3252 int result;
3277 result = 0;
3283 result = SetFileAttributesW(path->wide, attr);
3287 if (!result) {
3294 result = fchmod(path->fd, mode);
3299 result = lchmod(path->narrow, mode);
3315 result = fchmodat(dir_fd, path->narrow, mode,
3322 result &&
3329 result = -1;
3336 result = chmod(path->narrow, mode);
3340 result = 0;
3342 result = -1;
3348 if (result) {
3467 int result;
3481 result = lchflags(path->narrow, flags);
3484 result = chflags(path->narrow, flags);
3487 if (result)
3655 int result;
3677 result = fchown(path->fd, uid, gid);
3682 result = lchown(path->narrow, uid, gid);
3688 result = fchownat(dir_fd, path->narrow, uid, gid,
3695 result = chown(path->narrow, uid, gid);
3708 if (result)
3949 BOOL result = FALSE;
3951 int result;
3980 result = CreateHardLinkW(dst->wide, src->wide, NULL);
3983 if (!result)
3994 result = linkat(src_dir_fd, src->narrow,
4003 result = link(src->narrow, dst->narrow);
4012 result = link(src->narrow, dst->narrow);
4027 if (result)
4042 BOOL result;
4108 result = FindNextFileW(hFindFile, &wFileData);
4112 if (!result && GetLastError() != ERROR_NO_MORE_FILES) {
4117 } while (result == TRUE);
4290 DWORD result;
4292 result = GetFullPathNameW(path,
4295 if (!result) {
4299 if (result >= Py_ARRAY_LENGTH(woutbuf)) {
4300 if ((size_t)result <= (size_t)PY_SSIZE_T_MAX / sizeof(wchar_t)) {
4301 woutbufp = PyMem_RawMalloc((size_t)result * sizeof(wchar_t));
4311 result = GetFullPathNameW(path, result, woutbufp, NULL);
4312 if (!result) {
4379 PyObject *result;
4406 result = win32_error_object("GetFinalPathNameByHandleW",
4419 result = PyErr_NoMemory();
4427 result = PyUnicode_FromWideChar(target_path, result_length);
4428 if (result && path->narrow) {
4429 Py_SETREF(result, PyUnicode_EncodeFSDefault(result));
4437 return result;
4453 PyObject *result;
4476 result = win32_error_object("_getvolumepathname", path->object);
4479 result = PyUnicode_FromWideChar(mountpath, wcslen(mountpath));
4481 Py_SETREF(result, PyUnicode_EncodeFSDefault(result));
4485 return result;
4503 PyObject *result = NULL;
4519 result = Py_BuildValue("sO", "", path->object);
4522 result = Py_BuildValue("NN",
4527 result = Py_BuildValue("Os", path->object, "");
4531 return result;
4562 PyObject *result = PyUnicode_FromWideChar(norm_path, norm_len);
4564 return result;
4595 int result;
4629 result = CreateDirectoryW(path->wide, pSecAttr);
4642 if (!result) {
4650 result = mkdirat(dir_fd, path->narrow, mode);
4658 result = mkdir(path->narrow);
4660 result = mkdir(path->narrow, mode);
4671 if (result < 0)
4785 BOOL result;
4788 int result;
4808 result = MoveFileExW(src->wide, dst->wide, flags);
4811 if (!result)
4825 result = renameat(src_dir_fd, src->narrow, dst_dir_fd, dst->narrow);
4831 result = rename(src->narrow, dst->narrow);
4842 if (result)
4916 int result;
4929 result = !RemoveDirectoryW(path->wide);
4934 result = unlinkat(dir_fd, path->narrow, AT_REMOVEDIR);
4937 result = -1;
4941 result = rmdir(path->narrow);
4952 if (result)
4973 long result;
4981 result = _wsystem(command);
4984 return result;
4999 long result;
5007 result = system(bytes);
5009 return result;
5096 int result;
5110 result = !Py_DeleteFileW(path->wide);
5116 result = unlinkat(dir_fd, path->narrow, 0);
5122 result = unlink(path->narrow);
5134 if (result)
5441 int result = 0;
5459 result = 1;
5462 return result;
5513 int result;
5625 result = utime_nofollow_symlinks(&utime, path->narrow);
5631 result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks);
5638 result = utime_fd(&utime, path->fd);
5642 result = utime_default(&utime, path->narrow);
5648 if (result == -1 && errno == ENOSYS) {
5654 if (result < 0) {
5705 int result = 0;
5711 result = 1;
5719 result = 1;
5724 return result;
6286 PyObject *result = NULL;
6379 result = PyLong_FromPid(pid);
6395 return result;
7072 PyObject *result;
7078 result = PyStructSequence_New((PyTypeObject *)SchedParamType);
7079 if (!result)
7083 Py_DECREF(result);
7086 PyStructSequence_SET_ITEM(result, 0, priority);
7087 return result;
7157 int result;
7159 result = sched_yield();
7161 if (result < 0) {
7782 PyObject *result = PyList_New(n);
7783 if (result == NULL) {
7792 PyList_SET_ITEM(result, i, group);
7796 return result;
7800 Py_XDECREF(result);
7860 Call the system call getpgid(), and return the result.
7926 PyObject* result = NULL;
7941 result = PyLong_FromPid((pid_t)pe.th32ParentProcessID);
7948 /* If our loop exits and our pid was not found (result will be NULL)
7951 if (!result)
7952 result = PyErr_SetFromWindowsErr(GetLastError());
7956 return result;
7994 PyObject *result = NULL;
8001 result = PyUnicode_FromWideChar(user_name, num_chars - 1);
8004 result = PyErr_SetFromWindowsErr(GetLastError());
8018 result = PyUnicode_DecodeFSDefault(name);
8021 return result;
8078 PyObject *result;
8104 result = PyErr_SetFromWindowsErr(err);
8107 result = Py_None;
8111 return result;
8363 PyObject *result;
8384 result = PyStructSequence_New((PyTypeObject*) struct_rusage);
8386 if (!result)
8393 PyStructSequence_SET_ITEM(result, 0,
8395 PyStructSequence_SET_ITEM(result, 1,
8397 #define SET_INT(result, index, value)\
8398 PyStructSequence_SET_ITEM(result, index, PyLong_FromLong(value))
8399 SET_INT(result, 2, ru->ru_maxrss);
8400 SET_INT(result, 3, ru->ru_ixrss);
8401 SET_INT(result, 4, ru->ru_idrss);
8402 SET_INT(result, 5, ru->ru_isrss);
8403 SET_INT(result, 6, ru->ru_minflt);
8404 SET_INT(result, 7, ru->ru_majflt);
8405 SET_INT(result, 8, ru->ru_nswap);
8406 SET_INT(result, 9, ru->ru_inblock);
8407 SET_INT(result, 10, ru->ru_oublock);
8408 SET_INT(result, 11, ru->ru_msgsnd);
8409 SET_INT(result, 12, ru->ru_msgrcv);
8410 SET_INT(result, 13, ru->ru_nsignals);
8411 SET_INT(result, 14, ru->ru_nvcsw);
8412 SET_INT(result, 15, ru->ru_nivcsw);
8416 Py_DECREF(result);
8420 return Py_BuildValue("NiN", PyLong_FromPid(pid), status, result);
8509 Returns the result of waiting for a process or processes.
8519 PyObject *result;
8537 result = PyStructSequence_New((PyTypeObject *)WaitidResultType);
8538 if (!result)
8541 PyStructSequence_SET_ITEM(result, 0, PyLong_FromPid(si.si_pid));
8542 PyStructSequence_SET_ITEM(result, 1, _PyLong_FromUid(si.si_uid));
8543 PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong((long)(si.si_signo)));
8544 PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong((long)(si.si_status)));
8545 PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong((long)(si.si_code)));
8547 Py_DECREF(result);
8551 return result;
8751 PyObject *result = NULL;
8804 result = PyUnicode_FromWideChar(name, nameLen);
8805 if (result && path->narrow) {
8806 Py_SETREF(result, PyUnicode_EncodeFSDefault(result));
8809 return result;
8924 DWORD result;
8930 int result;
8955 result = CreateSymbolicLinkW(dst->wide, src->wide, flags);
8959 if (windows_has_symlink_unprivileged_flag && !result &&
8975 result = CreateSymbolicLinkW(dst->wide, src->wide, flags);
8979 if (result || ERROR_INVALID_PARAMETER != GetLastError()) {
8984 if (!result)
8999 result = symlinkat(src->narrow, dir_fd, dst->narrow);
9005 result = symlink(src->narrow, dst->narrow);
9015 if (result)
9155 Call the system call getsid(pid) and return the result.
9572 Py_off_t result;
9586 result = _lseeki64(fd, position, how);
9588 result = lseek(fd, position, how);
9592 if (result < 0)
9595 return result;
10374 Py_ssize_t result;
10394 result = writev(fd, iov, cnt);
10396 } while (result < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
10399 if (result < 0 && !async_err)
10402 return result;
10478 Py_ssize_t result;
10508 result = pwritev2(fd, iov, cnt, offset, flags);
10511 } while (result < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
10525 result = pwritev(fd, iov, cnt, offset);
10528 } while (result < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
10537 if (result < 0) {
10544 return result;
10707 int result;
10718 result = mkfifoat(dir_fd, path->narrow, mode);
10722 result = 0;
10726 result = mkfifo(path->narrow, mode);
10728 } while (result != 0 && errno == EINTR &&
10738 if (result != 0)
10776 int result;
10787 result = mknodat(dir_fd, path->narrow, mode, device);
10791 result = 0;
10795 result = mknod(path->narrow, mode, device);
10797 } while (result != 0 && errno == EINTR &&
10805 if (result != 0)
10882 int result;
10893 result = _chsize_s(fd, length);
10895 result = ftruncate(fd, length);
10899 } while (result != 0 && errno == EINTR &&
10901 if (result != 0)
10924 int result;
10941 result = -1;
10943 result = _chsize_s(fd, length);
10945 if (result < 0)
10946 errno = result;
10949 result = truncate(path->narrow, length);
10953 if (result < 0)
10990 int result;
10995 result = posix_fallocate(fd, offset, length);
10997 } while (result == EINTR && !(async_err = PyErr_CheckSignals()));
10999 if (result == 0)
11005 errno = result;
11037 int result;
11042 result = posix_fadvise(fd, offset, length, advice);
11044 } while (result == EINTR && !(async_err = PyErr_CheckSignals()));
11046 if (result == 0)
11052 errno = result;
11482 int result;
11488 result = fstatvfs(fd, &st);
11490 } while (result != 0 && errno == EINTR &&
11492 if (result != 0)
11518 int result;
11524 result = fstatvfs(path->fd, &st);
11528 result = statvfs(path->narrow, &st);
11531 if (result) {
11993 PyObject *result = NULL;
12016 result = PyUnicode_DecodeFSDefaultAndSize(buf, len2-1);
12020 result = PyUnicode_DecodeFSDefaultAndSize(buffer, len-1);
12021 return result;
12929 ssize_t result;
12943 result = fgetxattr(path->fd, attribute->narrow, ptr, buffer_size);
12945 result = getxattr(path->narrow, attribute->narrow, ptr, buffer_size);
12947 result = lgetxattr(path->narrow, attribute->narrow, ptr, buffer_size);
12950 if (result < 0) {
12958 if (result != buffer_size) {
12960 _PyBytes_Resize(&buffer, result);
12993 ssize_t result;
13005 result = fsetxattr(path->fd, attribute->narrow,
13008 result = setxattr(path->narrow, attribute->narrow,
13011 result = lsetxattr(path->narrow, attribute->narrow,
13015 if (result) {
13046 ssize_t result;
13057 result = fremovexattr(path->fd, attribute->narrow);
13059 result = removexattr(path->narrow, attribute->narrow);
13061 result = lremovexattr(path->narrow, attribute->narrow);
13064 if (result) {
13093 PyObject *result = NULL;
13142 result = PyList_New(0);
13143 if (!result) {
13154 Py_DECREF(result);
13155 result = NULL;
13158 error = PyList_Append(result, attribute);
13161 Py_DECREF(result);
13162 result = NULL;
13173 return result;
13192 int result;
13201 result = _PyOS_URandom(PyBytes_AS_STRING(bytes), PyBytes_GET_SIZE(bytes));
13202 if (result == -1) {
13273 int result;
13275 result = eventfd_read(fd, &value);
13277 if (result == -1) {
13296 int result;
13298 result = eventfd_write(fd, value);
13300 if (result == -1) {
13492 int result;
13495 result = _Py_set_inheritable(fd, inheritable, NULL);
13497 if (result < 0)
13589 int result;
13592 result = _Py_set_blocking(fd, blocking);
13594 if (result < 0)
13672 int result;
13696 result = fstatat(self->dir_fd, path, &st,
13713 result = STAT(path, &st);
13716 result = LSTAT(path, &st);
13726 if (result != 0)
13767 int result = os_DirEntry_is_symlink_impl(self, defining_class);
13768 if (result == -1) {
13771 if (result) {
13792 int result;
13832 result = (mode & S_IFMT) == mode_bits;
13837 result = 0;
13844 result = dir_bits != 0;
13846 result = dir_bits == 0;
13849 result = self->d_type == DT_DIR;
13851 result = self->d_type == DT_REG;
13856 return result;
13914 int result;
13922 result = LSTAT(path, &stat);
13928 result = LSTAT(path, &stat);
13932 if (result != 0)
14014 wchar_t *result;
14027 result = PyMem_New(wchar_t, size);
14028 if (!result) {
14032 wcscpy(result, path_wide);
14034 ch = result[path_len - 1];
14036 result[path_len++] = SEP;
14037 wcscpy(result + path_len, filename);
14039 return result;
14100 char *result;
14115 result = PyMem_New(char, size);
14116 if (!result) {
14120 strcpy(result, path_narrow);
14121 if (path_len > 0 && result[path_len - 1] != '/')
14122 result[path_len++] = '/';
14123 strcpy(result + path_len, filename);
14124 return result;
14563 return the result of that method. All other types raise a TypeError.
14612 object defines __fspath__(), then return the result of that method. All other