summaryrefslogtreecommitdiff
path: root/source4/param/pyparam_util.c
AgeCommit message (Collapse)AuthorFilesLines
2023-11-20Use python.h from libreplaceAndreas Schneider1-1/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-06-24py3: Remove duplicated PyUnicode_Check() after the py3 compat macros were ↵Andrew Bartlett1-1/+1
removed This came about because in py2 we had to check for strings and unicode. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Mon Jun 24 18:48:53 UTC 2019 on sn-devel-184
2019-06-24py3: Remove PyStr_AsString() compatability macroAndrew Bartlett1-2/+2
We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
2019-06-24py3: Remove PyStr_Check() compatability macroAndrew Bartlett1-1/+1
We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
2018-04-30s4/param: Additionally accept unicode as string param in Py2Noel Power1-1/+1
With the changes to make samba python code Py2/Py3 compatible there now are many instances where string content is decoded. Decoded string variables in Py2 are returned as the unicode type. Many Py2 c-module functions that take string arguments only check for the string type. However now it's quite possibe the content formally passed as a string argument is now passed as unicode after being decoded, such arguments are rejected and code can fail subtly. This only affects places where the type is directly checked e.g. via PyStr_Check etc. arguments that are parsed by ParseTuple* functions generally already accept both string and unicode (if 's', 'z', 's*' format specifiers are used) Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2017-03-10python: samba.param: Port param module to Python 3Lumir Balhar1-3/+4
Port Python bindings of samba.param module to Python3-compatible form. Because native Python file objects are officially no longer backed by FILE*, API of some _dump() functions is changed. File argument is now optional and contains only name of file. Stdout is default if no file name is specified. Otherwise opening and closing files is done on C layer instead of Python. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2011-08-14Use public pytalloc header file.Jelmer Vernooij1-1/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Aug 14 17:18:46 CEST 2011 on sn-devel-104
2011-08-10pytalloc: Use consistent prefix for functions, add ABI file.Jelmer Vernooij1-1/+1
2011-03-22s4:python bindings - handle NULL returns from "loadparm_init_global"Matthias Dieter Wallnöfer1-0/+3
Reviewed-by: Jelmer Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Mar 22 19:52:57 CET 2011 on sn-devel-104
2011-03-19source4/param: Fix prototypes for all functions.Jelmer Vernooij1-0/+1
2010-11-29s4:param/pyparam_util.c - remove unused includeMatthias Dieter Wallnöfer1-1/+0
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Nov 29 12:56:12 CET 2010 on sn-devel-104
2010-11-29s4-loadparm: use loadparm_init_global() instead of loadparm_init()Andrew Tridgell1-21/+14
this prevents us having two lp_ctx contexts in these tools which leads to bizarre behaviour Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-22s4-param: Check type when converting python object to lp_ctx, fix someJelmer Vernooij1-1/+23
memory leaks.
2010-07-16s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell1-4/+4
this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-04-08pynet: Create a net class.Jelmer Vernooij1-3/+3
2010-03-29pytalloc: allow for using a system libtalloc-dev with pytallocAndrew Tridgell1-1/+1
When we have a system talloc library, we still need to grab pytalloc.h from lib/talloc. We don't want to just use -Ilib/talloc, as otherwise we'll get the in-tree talloc.h which may not be compatible with the system talloc.h So we need to give the path to pytalloc.h
2009-10-23s4-python: we need to include Python.h firstAndrew Tridgell1-4/+1
If we don't include Python.h first then we get a pile of warnings due to broken redefines of XOPEN_SOURCE in the Python includes.
2009-06-02Fix unresolved symbol in python messaging module.Jelmer Vernooij1-0/+11
2009-06-02python: Move helper functions for using param into a separate file ratherJelmer Vernooij1-0/+54
than linking against the python module.