20
20
21
21
#include <ctype.h>
22
22
#include <limits.h>
23
+ #include <stdarg.h>
23
24
#include <stdint.h>
24
25
#include <stdlib.h>
25
26
#include <string.h>
@@ -81,8 +82,16 @@ char *Strdup(const char *s) {
81
82
return p ;
82
83
}
83
84
84
- umf_result_t umfCtlGet (const char * name , void * ctx , void * arg ) {
85
+ umf_result_t umfCtlGet (const char * name , ... ) {
85
86
assert (name != NULL );
87
+
88
+ va_list args ;
89
+ va_start (args , name );
90
+
91
+ void * ctx = va_arg (args , void * );
92
+ void * arg = va_arg (args , void * );
93
+ va_end (args );
94
+
86
95
assert (arg != NULL );
87
96
assert (ctx != NULL );
88
97
return ctl_query (NULL , ctx , CTL_QUERY_PROGRAMMATIC , name , CTL_QUERY_READ ,
@@ -91,8 +100,16 @@ umf_result_t umfCtlGet(const char *name, void *ctx, void *arg) {
91
100
: UMF_RESULT_SUCCESS ;
92
101
}
93
102
94
- umf_result_t umfCtlSet (const char * name , void * ctx , void * arg ) {
103
+ umf_result_t umfCtlSet (const char * name , ... ) {
95
104
assert (name != NULL );
105
+
106
+ va_list args ;
107
+ va_start (args , name );
108
+
109
+ void * ctx = va_arg (args , void * );
110
+ void * arg = va_arg (args , void * );
111
+ va_end (args );
112
+
96
113
assert (arg != NULL );
97
114
assert (ctx != NULL );
98
115
return ctl_query (NULL , ctx , CTL_QUERY_PROGRAMMATIC , name , CTL_QUERY_WRITE ,
@@ -101,8 +118,16 @@ umf_result_t umfCtlSet(const char *name, void *ctx, void *arg) {
101
118
: UMF_RESULT_SUCCESS ;
102
119
}
103
120
104
- umf_result_t umfCtlExec (const char * name , void * ctx , void * arg ) {
121
+ umf_result_t umfCtlExec (const char * name , ... ) {
105
122
assert (name != NULL );
123
+
124
+ va_list args ;
125
+ va_start (args , name );
126
+
127
+ void * ctx = va_arg (args , void * );
128
+ void * arg = va_arg (args , void * );
129
+ va_end (args );
130
+
106
131
assert (arg != NULL );
107
132
assert (ctx != NULL );
108
133
return ctl_query (NULL , ctx , CTL_QUERY_PROGRAMMATIC , name ,
0 commit comments