aboutsummaryrefslogtreecommitdiff
path: root/external/pd.cs
diff options
context:
space:
mode:
Diffstat (limited to 'external/pd.cs')
-rwxr-xr-xexternal/pd.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/external/pd.cs b/external/pd.cs
index 33f7f1f..4f05734 100755
--- a/external/pd.cs
+++ b/external/pd.cs
@@ -68,17 +68,18 @@ typedef struct atom_simple
};
*/
- public enum AtomType {Null = 0, Float=1, Symbol=2};
+ public enum AtomType {Null = 0, Float=1, Symbol=2, List=3};
+
[StructLayout (LayoutKind.Explicit)]
// [StructLayout (LayoutKind.Sequential)]
- public class Atom
+ public class Atom2
{
//[FieldOffset (0)] AtomType type;
//[FieldOffset (0)] public int type;
[FieldOffset (0)]
public int type;
- /* union members */
+
[FieldOffset (4)]
public float float_value;
@@ -87,22 +88,37 @@ typedef struct atom_simple
public string string_value;
+ public Atom2()
+ {
+ this.type = 0;
+ this.float_value = 0;
+ this.string_value = "";
+ }
- public Atom(string string_value)
+ public Atom2(string string_value)
{
this.type = 2;
this.float_value = 0;
this.string_value = string_value;
}
- public Atom(float float_value)
+ public Atom2(float float_value)
{
this.type = 1;
this.string_value = "";
this.float_value = float_value;
}
}
+
+ //[StructLayout (LayoutKind.Explicit)]
+ [StructLayout (LayoutKind.Sequential)]
+ public struct Atom
+ {
+ public int type;
+ public float float_value;
+ public string string_value;
+ }
/*
typedef float t_floatarg;