omlish-cext 0.0.0.dev512__tar.gz → 0.0.0.dev514__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/PKG-INFO +2 -2
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish/typedvalues/_collection.cc +23 -10
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish_cext.egg-info/PKG-INFO +2 -2
- omlish_cext-0.0.0.dev514/omlish_cext.egg-info/requires.txt +1 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/pyproject.toml +2 -2
- omlish_cext-0.0.0.dev512/omlish_cext.egg-info/requires.txt +0 -1
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/LICENSE +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/README.md +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish/_check.cc +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish/collections/hamt/_hamt.c +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish/lang/_asyncs.cc +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish/lang/imports/_capture.cc +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish_cext.egg-info/SOURCES.txt +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish_cext.egg-info/dependency_links.txt +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish_cext.egg-info/top_level.txt +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/setup.cfg +0 -0
- {omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omlish-cext
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev514
|
|
4
4
|
Summary: omlish
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
14
14
|
Requires-Python: >=3.13
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: omlish==0.0.0.
|
|
17
|
+
Requires-Dist: omlish==0.0.0.dev514
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
20
|
# Overview
|
|
@@ -70,14 +70,17 @@ public:
|
|
|
70
70
|
operator T*() const = delete;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
//
|
|
74
|
+
|
|
75
|
+
template<typename F>
|
|
76
|
+
struct ScopeGuard {
|
|
77
|
+
F cleanup;
|
|
78
|
+
~ScopeGuard() { cleanup(); }
|
|
78
79
|
};
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
template<typename F> ScopeGuard(F) -> ScopeGuard<F>;
|
|
82
|
+
|
|
83
|
+
//
|
|
81
84
|
|
|
82
85
|
PyDoc_STRVAR(init_typed_values_collection_doc,
|
|
83
86
|
"init_typed_values_collection(*tvs, override=False, check_type=None)\n"
|
|
@@ -143,6 +146,15 @@ static PyObject * init_typed_values_collection(PyObject *module, PyObject *const
|
|
|
143
146
|
return PyTuple_Pack(3, empty_tuple.get(), empty_dict.get(), empty_dict2.get());
|
|
144
147
|
}
|
|
145
148
|
|
|
149
|
+
// Helper struct to track unique typed values during processing
|
|
150
|
+
struct UniqueInfo {
|
|
151
|
+
PyObject *unique_tv_cls; // The unique class (borrowed from map key)
|
|
152
|
+
PyObject *tv; // The typed value (borrowed from args)
|
|
153
|
+
size_t idx; // Index in unique_lst when added
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
using TmpItem = std::variant<PyObject*, std::unique_ptr<UniqueInfo>>;
|
|
157
|
+
|
|
146
158
|
// Temporary storage
|
|
147
159
|
std::vector<TmpItem> tmp_lst;
|
|
148
160
|
tmp_lst.reserve(nargs);
|
|
@@ -150,10 +162,11 @@ static PyObject * init_typed_values_collection(PyObject *module, PyObject *const
|
|
|
150
162
|
// Map from unique type to list of typed values
|
|
151
163
|
std::unordered_map<PyObject*, std::vector<PyObject*>> unique_dct;
|
|
152
164
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
165
|
+
ScopeGuard keys_cleaner{[&unique_dct] {
|
|
166
|
+
for (auto const& [key, _] : unique_dct) {
|
|
167
|
+
Py_DECREF(key);
|
|
168
|
+
}
|
|
169
|
+
}};
|
|
157
170
|
|
|
158
171
|
// Process each typed value
|
|
159
172
|
for (Py_ssize_t i = 0; i < nargs; i++) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omlish-cext
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev514
|
|
4
4
|
Summary: omlish
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
14
14
|
Requires-Python: >=3.13
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: omlish==0.0.0.
|
|
17
|
+
Requires-Dist: omlish==0.0.0.dev514
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
20
|
# Overview
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
omlish==0.0.0.dev514
|
|
@@ -13,7 +13,7 @@ urls = {source = 'https://github.com/wrmsr/omlish'}
|
|
|
13
13
|
license = 'BSD-3-Clause'
|
|
14
14
|
readme = 'README.md'
|
|
15
15
|
requires-python = '>=3.13'
|
|
16
|
-
version = '0.0.0.
|
|
16
|
+
version = '0.0.0.dev514'
|
|
17
17
|
classifiers = [
|
|
18
18
|
'Development Status :: 2 - Pre-Alpha',
|
|
19
19
|
'Intended Audience :: Developers',
|
|
@@ -24,7 +24,7 @@ classifiers = [
|
|
|
24
24
|
]
|
|
25
25
|
description = 'omlish'
|
|
26
26
|
dependencies = [
|
|
27
|
-
'omlish == 0.0.0.
|
|
27
|
+
'omlish == 0.0.0.dev514',
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
[tool.setuptools]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
omlish==0.0.0.dev512
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{omlish_cext-0.0.0.dev512 → omlish_cext-0.0.0.dev514}/omlish_cext.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|