| args ->
List.iter (
function
- (* FIXME *)
| Device n | String n ->
pr " args.%s = (char *) %s;\n" n n
| OptString n ->
* allow device name translation. This is safe because
* we can modify the string (passed from RPC).
*)
- (* FIXME *)
| Device n | String n
| OptString n -> pr " char *%s;\n" n
| StringList n -> pr " char **%s;\n" n
pr " }\n";
List.iter (
function
- | Device n | String n -> pr " %s = args.%s;\n" n n
+ | Device n ->
+ pr " %s = args.%s;\n" n n;
+ pr " RESOLVE_DEVICE (%s, goto done);" n;
+ | String n -> pr " %s = args.%s;\n" n n
| OptString n -> pr " %s = args.%s ? *args.%s : NULL;\n" n n n
| StringList n ->
pr " %s = realloc (args.%s.%s_val,\n" n n n;
| String n
| OptString n ->
next ();
-(* FIXME *)
if not in_daemon then pr "const char *%s" n
else pr "char *%s" n
| StringList n ->
List.iter (
function
| Device _ | String _
- | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
+ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
| StringList n ->
pr " %s = get_string_list (py_%s);\n" n n;
pr " if (!%s) return NULL;\n" n
List.iter (
function
| Device _ | String _
- | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
+ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
| StringList n ->
pr " free (%s);\n" n
) (snd style);
List.iter (
function
| Device _ | String _
- | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
+ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
| StringList n ->
pr " free (%s);\n" n
) (snd style);