private-attribute-cpp 2.1.10__tar.gz → 2.1.12__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.
- {private_attribute_cpp-2.1.10/private_attribute_cpp.egg-info → private_attribute_cpp-2.1.12}/PKG-INFO +1 -1
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/private_attribute.cpp +5 -1
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12/private_attribute_cpp.egg-info}/PKG-INFO +1 -1
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/setup.py +1 -1
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/LICENSE +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/MANIFEST.in +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/README.md +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/picosha2.h +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/private_attribute.pyi +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/SOURCES.txt +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/dependency_links.txt +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/not-zip-safe +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/top_level.txt +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/setup.cfg +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_attr_classify_owner.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_class_private_attrs.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_gc_collect.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_private_abc.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_private_attrs.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_private_func.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_private_inheritance.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_private_method.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_private_wrap.py +0 -0
- {private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_slots_cycle.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: private_attribute_cpp
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.12
|
|
4
4
|
Summary: A Python package that provides a way to define private attributes in C++ implementation.
|
|
5
5
|
Home-page: https://github.com/Locked-chess-official/private_attribute_cpp
|
|
6
6
|
Author: HuangHaoHua
|
|
@@ -2411,9 +2411,13 @@ analyse_all_code(PyObject* obj, std::unordered_map<uintptr_t, PyObjectStorage>&
|
|
|
2411
2411
|
static std::string
|
|
2412
2412
|
real_class_name(const std::string& name, const std::string& class_name) noexcept
|
|
2413
2413
|
{
|
|
2414
|
+
size_t start_pos = class_name.find_first_not_of('_');
|
|
2415
|
+
std::string cleaned_class_name = (start_pos == std::string::npos) ? "" : class_name.substr(start_pos);
|
|
2416
|
+
std::string pre_underline = cleaned_class_name.size() > 0 ? "_" : "";
|
|
2417
|
+
|
|
2414
2418
|
// if the name starts with "__" but does not end with "__", change to _ClassName__name
|
|
2415
2419
|
if (name.length() >= 2 && name.substr(0, 2) == "__" && name.substr(name.length() - 2) != "__") {
|
|
2416
|
-
return
|
|
2420
|
+
return pre_underline + cleaned_class_name + name;
|
|
2417
2421
|
}
|
|
2418
2422
|
return name;
|
|
2419
2423
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: private_attribute_cpp
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.12
|
|
4
4
|
Summary: A Python package that provides a way to define private attributes in C++ implementation.
|
|
5
5
|
Home-page: https://github.com/Locked-chess-official/private_attribute_cpp
|
|
6
6
|
Author: HuangHaoHua
|
|
@@ -24,7 +24,7 @@ readme = open('README.md').read()
|
|
|
24
24
|
|
|
25
25
|
setup(
|
|
26
26
|
name='private_attribute_cpp',
|
|
27
|
-
version='2.1.
|
|
27
|
+
version='2.1.12',
|
|
28
28
|
author="HuangHaoHua",
|
|
29
29
|
author_email="13140752715@example.com",
|
|
30
30
|
description='A Python package that provides a way to define private attributes in C++ implementation.',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_attr_classify_owner.py
RENAMED
|
File without changes
|
{private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_class_private_attrs.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{private_attribute_cpp-2.1.10 → private_attribute_cpp-2.1.12}/tests/test_private_inheritance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|