File tree Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change
1
+ from pointers import Reference , MutReference , ref
2
+
3
+ my_value = ref (0 )
4
+
5
+ def test (my_ref : MutReference [int ]) -> None :
6
+ print (f"now borrowing mutable { my_ref } " )
7
+ my_ref <<= 1
8
+
9
+ with my_value .mut ():
10
+ my_value <<= 2
11
+
12
+ test (my_value .mut ())
13
+ print (~ my_value ) # 1
Original file line number Diff line number Diff line change
1
+ -I
2
+ /usr/include/python3.8
Original file line number Diff line number Diff line change 1
1
[build-system ]
2
- requires = [" setuptools" ]
2
+ requires = [" setuptools" , " toml " ]
3
3
build-backend = " setuptools.build_meta"
4
4
5
5
[project ]
@@ -21,7 +21,7 @@ classifiers = [
21
21
dependencies = [
22
22
" typing_extensions" ,
23
23
]
24
- version = " 2.6.0 "
24
+ version = " 3.0.1 "
25
25
26
26
[project .urls ]
27
27
Documentation = " https://pointers.zintensity.dev"
Original file line number Diff line number Diff line change
1
+ import toml
1
2
from setuptools import Extension , setup
2
3
4
+ with open ("./README.md" ) as f :
5
+ long_desc : str = f .read ()
6
+
3
7
if __name__ == "__main__" :
8
+ with open ("./pyproject.toml" , "r" ) as f :
9
+ data = toml .load (f )
4
10
setup (
11
+ name = "pointers.py" ,
12
+ version = "3.0.1" ,
5
13
packages = ["pointers" ],
14
+ project_urls = data ["project" ]["urls" ],
6
15
package_dir = {"" : "src" },
7
- ext_modules = [Extension ("_pointers" , ["./src/mod.c" ])],
16
+ license = "MIT" ,
17
+ ext_modules = [
18
+ Extension (
19
+ "_pointers" ,
20
+ ["./src/mod.c" ]
21
+ )
22
+ ],
8
23
)
You can’t perform that action at this time.
0 commit comments