diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-20 01:27:17 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-20 01:27:17 +0000 |
commit | cd3c6c3cc7b22ab38b9f53276891ad828831a38e (patch) | |
tree | a777701a98c49f0244183b0f655f395a43e64b24 /source4/build | |
parent | 376ba1921f031e002f615f443873b96f92fb85f5 (diff) | |
download | samba-cd3c6c3cc7b22ab38b9f53276891ad828831a38e.tar.gz samba-cd3c6c3cc7b22ab38b9f53276891ad828831a38e.tar.bz2 samba-cd3c6c3cc7b22ab38b9f53276891ad828831a38e.zip |
* added a 'lstring' type for spoolss
* added some notes on type equivalents in NOTES.txt
(This used to be commit a44d952fcb7ebf85d3072b622e5656dcf25cfbb0)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/NOTES.txt | 14 | ||||
-rw-r--r-- | source4/build/pidl/header.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/util.pm | 7 |
3 files changed, 19 insertions, 4 deletions
diff --git a/source4/build/pidl/NOTES.txt b/source4/build/pidl/NOTES.txt index d4429fffa4..4f729ecb95 100644 --- a/source4/build/pidl/NOTES.txt +++ b/source4/build/pidl/NOTES.txt @@ -1,3 +1,17 @@ +midl types +---------- + +pidl uses slightly different types to midl by default. The following +defines in your MS IDL may make things easier to use the same IDL on +both platforms. + +#define unistr [string] wchar_t * +#define uint8 char +#define uint16 short +#define uint32 long +#define HYPER_T hyper + + FIXED ARRAY ----------- diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm index 0822ca0e06..dda7e10425 100644 --- a/source4/build/pidl/header.pm +++ b/source4/build/pidl/header.pm @@ -127,6 +127,8 @@ sub HeaderType($$$) $res .= "const char"; } elsif ($data =~ "nstring") { $res .= "const char *"; + } elsif ($data =~ "lstring") { + $res .= "const char *"; } elsif (util::is_scalar_type($data)) { $res .= "$data"; } elsif (util::has_property($e, "switch_is")) { diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm index c18fe031f9..192d56316a 100644 --- a/source4/build/pidl/util.pm +++ b/source4/build/pidl/util.pm @@ -329,10 +329,9 @@ sub c_pull_prefix($) return "&"; } - if ($e->{TYPE} =~ "unistr.*") { - return "&"; - } - if ($e->{TYPE} =~ "nstring.*") { + if ($e->{TYPE} =~ "unistr.*" || + $e->{TYPE} =~ "nstring.*" || + $e->{TYPE} =~ "lstring.*") { return "&"; } |