summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorLawrence D'Anna <lawrence_danna@apple.com>2019-10-17 22:22:09 +0000
committerLawrence D'Anna <lawrence_danna@apple.com>2019-10-17 22:22:09 +0000
commit03819d1c80ad5d7b34f8fe0d375fcd2ef6aa5e7f (patch)
tree7d1f66147d89ee00239ace90f0b8280720979c7e /lldb/unittests/ScriptInterpreter/Python
parentc86a6acaee55c98072ff06d372d049cb4a671fb5 (diff)
downloadbcm5719-llvm-03819d1c80ad5d7b34f8fe0d375fcd2ef6aa5e7f.tar.gz
bcm5719-llvm-03819d1c80ad5d7b34f8fe0d375fcd2ef6aa5e7f.zip
eliminate one form of PythonObject::Reset()
Summary: I'd like to eliminate all forms of Reset() and all public constructors on these objects, so the only way to make them is with Take<> and Retain<> and the only way to copy or move them is with actual c++ copy, move, or assignment. This is a simple place to start. Reviewers: JDevlieghere, clayborg, labath, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69080 llvm-svn: 375182
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index 3f0cb78b64c..d9e4435bf93 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -323,8 +323,8 @@ TEST_F(PythonDataObjectsTest, TestPythonListValueEquality) {
PythonList list(PyRefType::Owned, py_list);
PythonObject list_items[list_size];
- list_items[0].Reset(PythonInteger(long_value0));
- list_items[1].Reset(PythonString(string_value1));
+ list_items[0] = PythonInteger(long_value0);
+ list_items[1] = PythonString(string_value1);
for (unsigned i = 0; i < list_size; ++i)
list.SetItemAtIndex(i, list_items[i]);
@@ -469,10 +469,10 @@ TEST_F(PythonDataObjectsTest, TestPythonDictionaryValueEquality) {
PythonObject py_keys[dict_entries];
PythonObject py_values[dict_entries];
- py_keys[0].Reset(PythonString(key_0));
- py_keys[1].Reset(PythonInteger(key_1));
- py_values[0].Reset(PythonInteger(value_0));
- py_values[1].Reset(PythonString(value_1));
+ py_keys[0] = PythonString(key_0);
+ py_keys[1] = PythonInteger(key_1);
+ py_values[0] = PythonInteger(value_0);
+ py_values[1] = PythonString(value_1);
PyObject *py_dict = PyDict_New();
EXPECT_TRUE(PythonDictionary::Check(py_dict));
@@ -509,10 +509,10 @@ TEST_F(PythonDataObjectsTest, TestPythonDictionaryManipulation) {
PythonString keys[dict_entries];
PythonObject values[dict_entries];
- keys[0].Reset(PythonString(key_0));
- keys[1].Reset(PythonString(key_1));
- values[0].Reset(PythonInteger(value_0));
- values[1].Reset(PythonString(value_1));
+ keys[0] = PythonString(key_0);
+ keys[1] = PythonString(key_1);
+ values[0] = PythonInteger(value_0);
+ values[1] = PythonString(value_1);
PythonDictionary dict(PyInitialValue::Empty);
for (int i = 0; i < 2; ++i)
OpenPOWER on IntegriCloud