mirror of
https://github.com/samba-team/samba.git
synced 2025-10-26 23:33:15 +03:00
r8215: switched the pull side of the ejs generator over to the recursive LEVELS based approach.
This allows for much more complex structure mappings to be generated.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
1429b885fb
commit
49fc14d132
@@ -253,33 +253,6 @@ NTSTATUS ejs_push_enum(struct ejs_rpc *ejs,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
pull an array of elements
|
||||
*/
|
||||
NTSTATUS ejs_pull_array(struct ejs_rpc *ejs,
|
||||
struct MprVar *v, const char *name, uint32_t length,
|
||||
size_t elsize, void **r, ejs_pull_t ejs_pull)
|
||||
{
|
||||
int i;
|
||||
char *data;
|
||||
|
||||
NDR_CHECK(ejs_pull_struct_start(ejs, &v, name));
|
||||
|
||||
(*r) = talloc_array_size(ejs, elsize, length);
|
||||
NT_STATUS_HAVE_NO_MEMORY(*r);
|
||||
|
||||
data = *r;
|
||||
|
||||
for (i=0;i<length;i++) {
|
||||
char *id = talloc_asprintf(ejs, "%u", i);
|
||||
NT_STATUS_HAVE_NO_MEMORY(id);
|
||||
NDR_CHECK(ejs_pull(ejs, v, id, (i*elsize)+data));
|
||||
talloc_free(id);
|
||||
}
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
pull a string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user