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 11[build-system ]
2- requires = [" setuptools" ]
2+ requires = [" setuptools" , " toml " ]
33build-backend = " setuptools.build_meta"
44
55[project ]
@@ -21,7 +21,7 @@ classifiers = [
2121dependencies = [
2222 " typing_extensions" ,
2323]
24- version = " 2.6.0 "
24+ version = " 3.0.1 "
2525
2626[project .urls ]
2727Documentation = " https://pointers.zintensity.dev"
Original file line number Diff line number Diff line change 1+ import toml
12from setuptools import Extension , setup
23
4+ with open ("./README.md" ) as f :
5+ long_desc : str = f .read ()
6+
37if __name__ == "__main__" :
8+ with open ("./pyproject.toml" , "r" ) as f :
9+ data = toml .load (f )
410 setup (
11+ name = "pointers.py" ,
12+ version = "3.0.1" ,
513 packages = ["pointers" ],
14+ project_urls = data ["project" ]["urls" ],
615 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+ ],
823 )
You can’t perform that action at this time.
0 commit comments