forked from clj-python/libpython-clj
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyGetSetDef.java
More file actions
25 lines (18 loc) · 802 Bytes
/
PyGetSetDef.java
File metadata and controls
25 lines (18 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package libpython_clj.jna;
import com.sun.jna.*;
import java.util.*;
public class PyGetSetDef extends Structure {
// We keep these as pointers because the memberdef has to live forever
// so we have to manually ensure the name and doc ptrs also live forever.
public Pointer name;
public CFunction.tp_att_getter get;
public CFunction.tp_att_setter set;
public Pointer doc;
public Pointer closure; //void*
public static class ByReference extends PyGetSetDef implements Structure.ByReference {}
public static class ByValue extends PyGetSetDef implements Structure.ByValue {}
public PyGetSetDef () {}
public PyGetSetDef (Pointer p ) { super(p); read(); }
protected List getFieldOrder() { return Arrays.asList(new String[]
{ "name", "get", "set", "doc", "closure" }); }
}