mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
General cleanup of compiler warnings etc.
This commit is contained in:
@ -18,9 +18,6 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "Python.h"
|
||||
|
||||
#include "python/py_samr.h"
|
||||
|
||||
/*
|
||||
@ -327,12 +324,32 @@ static PyMethodDef samr_methods[] = {
|
||||
|
||||
/* Open/close samr connect handles */
|
||||
|
||||
{ "connect", samr_connect, METH_VARARGS | METH_KEYWORDS,
|
||||
{ "connect", (PyCFunction)samr_connect,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"Open a connect handle" },
|
||||
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static struct const_vals {
|
||||
char *name;
|
||||
uint32 value;
|
||||
} module_const_vals[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static void const_init(PyObject *dict)
|
||||
{
|
||||
struct const_vals *tmp;
|
||||
PyObject *obj;
|
||||
|
||||
for (tmp = module_const_vals; tmp->name; tmp++) {
|
||||
obj = PyInt_FromLong(tmp->value);
|
||||
PyDict_SetItemString(dict, tmp->name, obj);
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
}
|
||||
|
||||
void initsamr(void)
|
||||
{
|
||||
PyObject *module, *dict;
|
||||
@ -358,7 +375,7 @@ void initsamr(void)
|
||||
|
||||
/* Initialise constants */
|
||||
|
||||
// const_init(dict);
|
||||
const_init(dict);
|
||||
|
||||
/* Do samba initialisation */
|
||||
|
||||
|
Reference in New Issue
Block a user