mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert D27448156: irange for size_t
Test Plan: revert-hammer
Differential Revision:
D27448156 (041b4431b2
)
Original commit changeset: 585da57d4de9
fbshipit-source-id: 8e047c29f391c0166e0a1a87c3fb2a0854377365
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e3691be2d9
commit
c0ac0fef4e
@ -1,5 +1,10 @@
|
||||
#include <c10/util/irange.h>
|
||||
#include <torch/csrc/python_headers.h>
|
||||
#include <cstdarg>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
#include <torch/csrc/THP.h>
|
||||
#include <torch/csrc/utils/python_strings.h>
|
||||
#include <torch/csrc/utils/invalid_arguments.h>
|
||||
@ -22,13 +27,6 @@
|
||||
#include <torch/csrc/generic/utils.cpp>
|
||||
#include <TH/THGenerateBoolType.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdarg>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
int THPUtils_getCallable(PyObject *arg, PyObject **result) {
|
||||
if (!PyCallable_Check(arg))
|
||||
return 0;
|
||||
@ -194,7 +192,7 @@ void THPUtils_invalidArguments(PyObject *given_args, PyObject *given_kwargs,
|
||||
std::vector<std::string> option_strings;
|
||||
va_list option_list;
|
||||
va_start(option_list, num_options);
|
||||
for(const auto i : c10::irange(num_options))
|
||||
for (size_t i = 0; i < num_options; i++)
|
||||
option_strings.emplace_back(va_arg(option_list, const char*));
|
||||
va_end(option_list);
|
||||
|
||||
|
Reference in New Issue
Block a user