File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 36
36
37
37
#define FPVM_MAXERRLEN 64
38
38
39
+ typedef void (* fpvm_bind_callback )(void * , const char * , int );
40
+
39
41
struct fpvm_binding {
40
42
int isvar ;
41
43
union {
@@ -49,8 +51,6 @@ struct fpvm_tbinding {
49
51
char sym [FPVM_MAXSYMLEN ];
50
52
};
51
53
52
- typedef void (* fpvm_bind_callback )(void * , const char * , int );
53
-
54
54
struct fpvm_fragment {
55
55
char last_error [FPVM_MAXERRLEN ];
56
56
fpvm_bind_callback bind_callback ;
@@ -98,6 +98,8 @@ struct fpvm_fragment {
98
98
const char * fpvm_version ();
99
99
100
100
void fpvm_init (struct fpvm_fragment * fragment , int vector_mode );
101
+ const char * fpvm_get_last_error (struct fpvm_fragment * fragment );
102
+ void fpvm_set_bind_mode (struct fpvm_fragment * fragment , int bind_mode );
101
103
void fpvm_set_bind_callback (struct fpvm_fragment * fragment , fpvm_bind_callback callback , void * user );
102
104
103
105
int fpvm_bind (struct fpvm_fragment * fragment , const char * sym );
Original file line number Diff line number Diff line change @@ -72,12 +72,22 @@ void fpvm_init(struct fpvm_fragment *fragment, int vector_mode)
72
72
fragment -> vector_mode = vector_mode ;
73
73
}
74
74
75
+ const char * fpvm_get_last_error (struct fpvm_fragment * fragment )
76
+ {
77
+ return fragment -> last_error ;
78
+ }
79
+
75
80
void fpvm_set_bind_callback (struct fpvm_fragment * fragment , fpvm_bind_callback callback , void * user )
76
81
{
77
82
fragment -> bind_callback = callback ;
78
83
fragment -> bind_callback_user = user ;
79
84
}
80
85
86
+ void fpvm_set_bind_mode (struct fpvm_fragment * fragment , int bind_mode )
87
+ {
88
+ fragment -> bind_mode = bind_mode ;
89
+ }
90
+
81
91
int fpvm_bind (struct fpvm_fragment * fragment , const char * sym )
82
92
{
83
93
int r ;
You can’t perform that action at this time.
0 commit comments