Svar

Latest version: v0.3.2

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.2

Comparing to v0.3.1, this version:

* add jsontype() for property and arguments
* fixed python import of class constructors
* fixed memory leak of svarpy caused by string from python
* improved svarpy on efficiency

0.3.1

This version solves:

* keyword argument parsing and extra helping things
* fast type switch and fast json parse and dump (about 5 times faster than the v2)

Now Svar supports kwargs like this:


int add_int(int a,int b){return a+b;}

TEST(Function,Overload){
Svar kw_f(add_int,"a"_a,"b"_a=0,"add two int");
EXPECT_EQ(kw_f(1,2),3); // call with arguments
EXPECT_EQ(kw_f(3),3); // b default is 0
EXPECT_EQ(kw_f("b"_a=1,"a"_a=2),3); // kwargs

kw_f.overload([](int a,int b,int c){
return a+b+c;
}); // overload is supported
EXPECT_EQ(kw_f(1,2,3),6);
}

0.2.2

0.2.1

We are happy to announce that now Svar is more stable it has been used in commercial softwares!

Changes:

* Fix python bindings, memory leak testing
* Implemented Node.js bindings
* Fix bugs during commercial usage

0.1.0

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.