File tree 4 files changed +32
-3
lines changed
4 files changed +32
-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 ]
@@ -23,7 +23,7 @@ dependencies = [
23
23
" typing_extensions" ,
24
24
" varname"
25
25
]
26
- version = " 3.0.0 "
26
+ version = " 3.0.1 "
27
27
28
28
[project .urls ]
29
29
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 (
5
11
name = "pointers.py" ,
12
+ version = "3.0.1" ,
6
13
packages = ["pointers" ],
14
+ project_urls = data ["project" ]["urls" ],
7
15
package_dir = {"" : "src" },
8
- ext_modules = [Extension ("_pointers" , ["./src/mod.c" ])],
16
+ license = "MIT" ,
17
+ ext_modules = [
18
+ Extension (
19
+ "_pointers" ,
20
+ ["./src/mod.c" ]
21
+ )
22
+ ],
9
23
)
You can’t perform that action at this time.
0 commit comments