Skip to content

Commit ec5954d

Browse files
Remove py_to_any_dictionary
1 parent 3e29590 commit ec5954d

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

src/py-opentimelineio/opentimelineio-bindings/otio_bindings.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,9 @@ static void set_type_record(SerializableObject* so, std::string schema_name) {
157157
}
158158

159159
static SerializableObject* instance_from_schema(std::string schema_name,
160-
int schema_version, py::object data) {
161-
AnyDictionary object_data = py_to_any_dictionary(data);
160+
int schema_version, AnyDictionaryProxy* data) {
162161
auto result = TypeRegistry::instance().instance_from_schema(schema_name, schema_version,
163-
object_data, ErrorStatusHandler());
162+
data->fetch_any_dictionary(), ErrorStatusHandler());
164163
return result;
165164
}
166165

src/py-opentimelineio/opentimelineio-bindings/otio_utils.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,6 @@ T py_to_cpp(py::handle const& o) {
212212
return o.cast<T>();
213213
}
214214

215-
AnyDictionary py_to_any_dictionary(py::object const& o) {
216-
if (o.is_none()) {
217-
return AnyDictionary();
218-
}
219-
220-
return safely_cast_any_dictionary_any(py_to_any(o));
221-
}
222-
223215
py::object any_to_py(any const& a, bool top_level) {
224216
std::type_info const& tInfo = a.type();
225217
auto e = _py_cast_dispatch_table.find(&tInfo);

src/py-opentimelineio/opentimelineio-bindings/otio_utils.h

-2
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,3 @@ AnyDictionary py_to_cpp(pybind11::dict const& o);
164164
AnyVector py_to_cpp(pybind11::iterable const& o);
165165
template<typename T>
166166
T py_to_cpp(pybind11::handle const& o);
167-
168-
AnyDictionary py_to_any_dictionary(pybind11::object const& o);

0 commit comments

Comments
 (0)