chore: make Object constructor internal.

This commit is contained in:
redxef 2024-11-19 23:24:44 +01:00
parent 1193ca3005
commit 52b270a8d8
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921
2 changed files with 2 additions and 2 deletions

View file

@ -248,7 +248,7 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp {
} }
public class Object : Scalar<object> { public class Object : Scalar<object> {
public Object(object value) : base(value) { } internal Object(object value) : base(value) {}
public static Expression FromBase(object? o) { public static Expression FromBase(object? o) {
if (o == null) { if (o == null) {
return Boolean.FALSE; return Boolean.FALSE;

View file

@ -195,7 +195,7 @@ namespace Tests
public static void ObjectTest() { public static void ObjectTest() {
Executor e = new Executor(); Executor e = new Executor();
Expression r; Expression r;
e.environment.Set("o", new Lisp_Object(new O(5, false))); e.environment.Set("o", Lisp_Object.FromBase(new O(5, false)));
r = e.eval("""(haskeys o "i" "b")"""); r = e.eval("""(haskeys o "i" "b")""");
Assert.True(((Lisp_Boolean)r).Value()); Assert.True(((Lisp_Boolean)r).Value());
r = e.eval("""(getitems o "i" "b")"""); r = e.eval("""(getitems o "i" "b")""");