1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

76 Commits

Author SHA1 Message Date
Andrew Bartlett
e53ee27091 pidl Fix samba4.pidl.typelist test after addition of 'double' 2009-06-05 10:29:46 +10:00
Brad Hards
00bfe9c286 Add support for double type in pidl.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-06-02 18:05:42 +02:00
Andrew Bartlett
8ab74e948a Revert "pidl/python: Add explicit casts, fixing implicit cast warnings."
It was creating new objects with bogus data.

This reverts commit 2108303929.
2009-04-21 15:07:10 +02:00
Stefan Metzmacher
9930e5b3db pidl:Samba4/client: fix dcerpc_ndr_request_send() callers
For samba4 you need one of this:
samba/source4# make full_idl
samba/source4# make clean
samba# git clean -x -f

metze
2009-04-20 18:17:09 +02:00
Stefan Metzmacher
ed98cba5ab pidl:Samba4/client: use dcerpc_ndr_request() for sync requests
metze
2009-04-20 18:15:01 +02:00
Jelmer Vernooij
4638633308 Move tdr to top-level. 2009-03-14 21:57:44 +01:00
Brad Hards
66a26a0ac2 Update instructions for checking out pidl. 2009-03-10 17:11:39 +01:00
Tim Prouty
cfb4757386 pidl: Don't generate variables declarations for pointless array counters.
Code isn't generated to iterate over arrays of length 0, but the
variable declarations still are.  The result is 'unused variable'
warnings. This only seems to be happening in one place right now, so I
targeted the fix to this case, but refactoring could be done to make
all variable declarations do this zero length check.  Making it the
default would be a much more invasive fix.

Jelmer, please check!
2009-03-04 18:32:13 -08:00
Jelmer Vernooij
e2469e3748 Don't generate array iterators when the length of the array is always 0.
(bug #6140)
2009-03-01 17:09:07 +01:00
Jelmer Vernooij
d7c7b31bba Only define _GNU_SOURCE if it's not defined yet. 2009-02-25 16:54:35 +01:00
Jelmer Vernooij
f71db89256 Include header with NTSTATUS, as some IDL files use it. 2009-02-25 15:21:36 +01:00
Jelmer Vernooij
fc3ffedcfe Don't define _GNU_SOURCE if it's already defined on the command-line. 2009-02-25 15:05:43 +01:00
Andrew Bartlett
c2cdb4ad5c Work around ndr_unpack failing on structures with relative pointers.
This disgusting hack works around the fact that
ndr_pull_struct_blob_all will always fail on structures with relative
pointers.  So, map ndr_unpack to ndr_pull_struct_blob_all only if we
don't have any relative pointers in this structure.

Andrew Bartlett
2009-02-25 17:43:07 +11:00
Stefan Metzmacher
6563c2b7e4 pidl:NDR/Parser: don't call [noopnum] function when creating the ndr_interface_table
metze
2009-02-19 11:13:33 +01:00
Jelmer Vernooij
69fff2d750 Revert "Fix errornos assumption that all compilers are gcc"
This breaks (some?) files with gcc.

This reverts commit 98a4327b19.
2009-02-09 23:29:41 +01:00
Torgeir Lerkerod
98a4327b19 Fix errornos assumption that all compilers are gcc
When compiling Samba 4's IDL files buildsystem assumes that compiler
knows about -xc, which is a gcc spesefic switch as this switch isn't
needed on gcc either the flag was uneeded and can be removed. Thus no
warnings on non gcc systems.

Signed-off-by: Torgeir Lerkerod <Torgeir.Lerkerod@gmail.com>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-02-09 22:12:45 +01:00
Jelmer Vernooij
39172b5ce9 Remove an invalid discard_const_p() - it masks an actual
bug in pidl where pidl uses "const" in a struct where there should not be
const.

There is only a single place in the Samba codebase where this triggers a
warning.
2009-02-09 18:39:27 +01:00
Jelmer Vernooij
fa1ead3aa0 Use discard_const_p rather than CONST_DISCARD. 2009-02-09 17:50:35 +01:00
Tim Prouty
7168cf440e pidl: Fix a const build warning in the samba3 merged build
../librpc/gen_ndr/cli_spoolss.c: In function `rpccli_spoolss_EnumPrinterData':
../librpc/gen_ndr/cli_spoolss.c:3400: warning: passing arg 1 of `memcpy' discards qualifiers from pointer target type

This is a very similar fix to:
2337f402f0
2009-02-07 00:47:32 -08:00
Günther Deschner
2bbe0c2859 pidl: return early when AllocOutVar() in s3 server generator has nothing to do.
Jelmer, Metze, please check.

Guenther
2009-02-06 18:53:40 +01:00
Stefan Metzmacher
4b541c6f03 pidl: fix samba3-cli test after change to cli->dispatch()
metze
2009-01-30 13:24:26 +01:00
Michael Adam
2108303929 pidl/python: Add explicit casts, fixing implicit cast warnings.
Michael
2009-01-22 08:16:55 +01:00
Michael Adam
842d24f23d pidl: reduce implicit cast warnings in gen_ndr server code
Michael
2009-01-22 08:16:54 +01:00
Jelmer Vernooij
293acaf92e pidl/python: Add explicit casts, fixes warnings about casts when enabled. 2009-01-21 18:38:40 +01:00
Jelmer Vernooij
11a25f9050 Allow calling DCE/RPC server implementations directly using
rpc_pipe_client.
2009-01-21 14:05:51 +01:00
Tim Prouty
142b2a61f8 pidl: Remove "max" and make "range" smarter about unsigned types
This eliminates a warning in pidl generated code, while preserving
cross-platform idl compatibility.
2009-01-17 19:37:52 -08:00
Tim Prouty
7c861cac53 pidl: Add max property to be used instead of range for unsigned types.
Compilers complain about ranges starting at 0 for unsigned types,
since an unsigned type is never less than 0.  The max property
implicitly makes 0 the lower bound when used with unsigned types.
2009-01-15 14:52:35 -08:00
Stefan Metzmacher
4f079fe539 pidl: remove references to EJS and SWIG code
This fixes 'make install'.

metze
2009-01-13 13:01:36 +01:00
Volker Lendecke
125696b73d Pass the full ndr_interface_table into the s3 rpcserver when registering 2009-01-09 23:17:57 +01:00
Jelmer Vernooij
ba5d6e6d70 Avoid using a utility header for Python replacements included in Samba,
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 2009-01-07 15:03:16 -08:00
Jelmer Vernooij
d2c70d24e1 py: Properly increase the reference counter of Py_None. 2009-01-06 04:13:57 +01:00
Jelmer Vernooij
af744e0954 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-04 22:48:23 +01:00
Stefan Metzmacher
96266d2f50 pidl: add dummy element for empty unions
This hopefully fixes the build on Solaris and IRIX.

metze
2009-01-02 16:32:55 +01:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Tim Prouty
2337f402f0 pidl: Fix a const build warning in the samba3 merged build
The warning:
../librpc/gen_ndr/ndr_spoolss.c: In function ‘ndr_pull_spoolss_EnumPrinterData’:
../librpc/gen_ndr/ndr_spoolss.c:14792: warning: passing argument 1 of ‘memset’ discards qualifiers from pointer target type

In some case the pidl generated code needs to memset a const struct
field.  This causes the above warning.  This patch discardeds the const
in this case.  I'm open to a more elegant fix, but this eliminates the
warning and should be relatively safe.
2008-12-30 16:19:43 -08:00
Stefan Metzmacher
791459f61b pidl: don't generate invalid C code
When we don't know how to handle a type for the python bindings,
we should not generate invalid C code.

Jelmer: please fix do the full fix for this.

metze
2008-12-29 23:23:27 +01:00
Jelmer Vernooij
619f320183 pidl: Fix typelist test after addition of type origin tracking. 2008-12-23 03:17:01 +01:00
Jelmer Vernooij
1807b0870b pidl/python: Factor out connect code rather than duplicating it in each
Python module.
2008-12-22 04:56:41 +01:00
Jelmer Vernooij
a6bd295229 pidl/python: Skip unknown types, rather than dieing. 2008-12-22 03:22:28 +01:00
Jelmer Vernooij
7ebc7e677d pidl: Allow location argument to warning() and error() to be undef, in case it is
not known.
2008-12-22 03:21:10 +01:00
Jelmer Vernooij
2c58c9497c Import types from other Python mechanisms using the Python import mechanism, to ensure they are initialized. 2008-12-22 01:51:38 +01:00
Jelmer Vernooij
7e651c7ef3 Simplify customization of pidl-generated Python modules. 2008-12-21 21:10:40 +01:00
Jelmer Vernooij
38a4749d2c Allow providing extra module-level Python functions. 2008-12-21 18:46:59 +01:00
Jelmer Vernooij
c1a9b68623 Create and use convenience function for creating new talloc-wrapping Python Objects, support subtypes of DCE/RPC interfaces properly 2008-12-21 00:37:31 +01:00
Jelmer Vernooij
42b7762f9b Support custom constructors for pidl-created types and support types based on pidl-created types. 2008-12-21 00:09:30 +01:00
Jelmer Vernooij
97f3720038 Don't write out forward declarations for enums, as some compilers don't
seem to like it.
2008-12-16 22:58:10 +01:00
Jelmer Vernooij
9692c71aa1 Make some fatal errors non-fatal. This means we generate invalid code in
some cases, but we do print errors. We don't use all generated code yet at the
moment, so this isn't much of a problem.
2008-12-16 18:02:14 +01:00
Jelmer Vernooij
5bf0c0bf9c Remove pidl SWIG backend; the native Python one works much better, and
that's also the best way to go for any other languages.
2008-12-16 16:48:48 +01:00
Jelmer Vernooij
121970d224 Only create (D)COM output files if there were COM objects in the IDL files. 2008-12-16 16:37:54 +01:00