1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-26 23:33:15 +03:00

r9339: treat arrays of uint8 values as a special DATA_BLOB type in the ejs

interfaces to RPC. This makes large blobs of data much saner. Tim, you
will probably want to do the same for the smb_interfaces.h generated
code.

Next we will need ways of extracting different data types from these
blobs, for example asking for the blob to be interpreted as a utf16
string, or as a little-endian integer. That will allow for registry
scripting to be quite sane.
This commit is contained in:
Andrew Tridgell
2005-08-17 01:29:35 +00:00
committed by Gerald (Jerry) Carter
parent 8354b01612
commit a8bca2e8e2
4 changed files with 88 additions and 3 deletions

View File

@@ -108,6 +108,13 @@ NTSTATUS ejs_pull_BOOL(struct ejs_rpc *ejs,
NTSTATUS ejs_push_BOOL(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const BOOL *r);
NTSTATUS ejs_pull_array_uint8(struct ejs_rpc *ejs,
struct MprVar *v, const char *name,
uint8_t *r, uint32_t length);
NTSTATUS ejs_push_array_uint8(struct ejs_rpc *ejs,
struct MprVar *v, const char *name,
const uint8_t *r, uint32_t length);
#define EJS_ALLOC_SIZE(ejs, s, size) do { \
(s) = talloc_size(ejs, size); \
if (!(s)) return ejs_panic(ejs, "out of memory"); \