diff options
author | Tim Potter <tpot@samba.org> | 2005-06-10 07:58:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:54 -0500 |
commit | a9258487043eb4862769ee8da02b3810db925295 (patch) | |
tree | 73c127469f8b162377ce695624b77b57b133d610 /source4/lib/ejs/var.h | |
parent | 302b4db004c51700dac7714d88ca27cdafe9612f (diff) | |
download | samba-a9258487043eb4862769ee8da02b3810db925295.tar.gz samba-a9258487043eb4862769ee8da02b3810db925295.tar.bz2 samba-a9258487043eb4862769ee8da02b3810db925295.zip |
r7456: Add a simple type that represents a pointer. The ejs people may ask us
to change this later but that will be pretty easy.
We can use this type to pass around pointers to handles in C. Talloc
allows us to do type checking too.
(This used to be commit b95c0bc9b0a18aeaa89f704e37669f01df2c2ad0)
Diffstat (limited to 'source4/lib/ejs/var.h')
-rw-r--r-- | source4/lib/ejs/var.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ejs/var.h b/source4/lib/ejs/var.h index 3cb23cf461..c313e29544 100644 --- a/source4/lib/ejs/var.h +++ b/source4/lib/ejs/var.h @@ -92,6 +92,7 @@ typedef int MprType; #define MPR_TYPE_FUNCTION 8 /* JavaScript function */ #define MPR_TYPE_STRING 9 /* String (immutable) */ #define MPR_TYPE_STRING_CFUNCTION 10 /* C/C++ function with string args */ +#define MPR_TYPE_PTR 11 /* C pointer */ /* * Create a type for the default number type @@ -315,6 +316,7 @@ typedef struct MprVar { void *thisPtr; } cFunctionWithStrings; MprStr string; /* Allocated string */ + void *ptr; /* C pointer */ #if !BLD_DEBUG && !LINUX && !VXWORKS }; #endif @@ -351,6 +353,7 @@ extern MprVar mprCreateObjVar(const char *name, int hashSize); extern MprVar mprCreateBoolVar(bool value); extern MprVar mprCreateCFunctionVar(MprCFunction fn, void *thisPtr, int flags); +extern MprVar mprCreatePtrVar(void *ptr, const char *name); #if BLD_FEATURE_FLOATING_POINT extern MprVar mprCreateFloatVar(double value); #endif |