summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-08-28 17:17:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:51 -0500
commit787a4d6f45007b8f04b7d14e347a7122676faff6 (patch)
tree0ce131530ef3e9589731c46b72a57410217c995a /source4/scripting/ejs
parent66314777f6667995154b9418aba7dfb26a2b3c88 (diff)
downloadsamba-787a4d6f45007b8f04b7d14e347a7122676faff6.tar.gz
samba-787a4d6f45007b8f04b7d14e347a7122676faff6.tar.bz2
samba-787a4d6f45007b8f04b7d14e347a7122676faff6.zip
r17888: use talloc_*_ptrtype() macros as wrappers arround the talloc_*_size()
functions to get rid of c++ warnings metze (This used to be commit 7579503bb886e9c4cc08756013f5311ce550c9fd)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/ejsrpc.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/source4/scripting/ejs/ejsrpc.h b/source4/scripting/ejs/ejsrpc.h
index a320392201..bc9a38fcb3 100644
--- a/source4/scripting/ejs/ejsrpc.h
+++ b/source4/scripting/ejs/ejsrpc.h
@@ -139,20 +139,16 @@ NTSTATUS ejs_pull_winreg_String(struct ejs_rpc *ejs,
NTSTATUS ejs_push_winreg_String(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const struct winreg_String *r);
-#define EJS_ALLOC_SIZE(ejs, s, size) do { \
- (s) = talloc_size(ejs, size); \
+#define EJS_ALLOC(ejs, s) do { \
+ (s) = talloc_ptrtype(ejs, (s)); \
if (!(s)) return ejs_panic(ejs, "out of memory"); \
} while (0)
-#define EJS_ALLOC(ejs, s) EJS_ALLOC_SIZE(ejs, s, sizeof(*(s)))
-
-#define EJS_ALLOC_N_SIZE(ejs, s, n, elsize) do { \
- (s) = talloc_array_size(ejs, elsize, n); \
+#define EJS_ALLOC_N(ejs, s, n) do { \
+ (s) = talloc_array_ptrtype(ejs, (s), n); \
if (!(s)) return ejs_panic(ejs, "out of memory"); \
} while (0)
-#define EJS_ALLOC_N(ejs, s, n) EJS_ALLOC_N_SIZE(ejs, s, n, sizeof(*(s)))
-
/* some types are equivalent for ejs */
#define ejs_pull_dom_sid2 ejs_pull_dom_sid
#define ejs_push_dom_sid2 ejs_push_dom_sid