#include "bin/default/librpc/gen_ndr/ndr_srvsvc.h"
#include "bin/default/librpc/gen_ndr/ndr_srvsvc_c.h"
+/*
+ * These functions are here to ensure they can be optomised out by
+ * the compiler based on the constant input values
+ */
+
+static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
+{
+ switch (var_size) {
+ case 8:
+ return UINT64_MAX;
+ case 4:
+ return UINT32_MAX;
+ case 2:
+ return UINT16_MAX;
+ case 1:
+ return UINT8_MAX;
+ }
+
+ return 0;
+}
+
+static inline long long ndr_sizeof2intmax(size_t var_size)
+{
+ switch (var_size) {
+ case 8:
+ return INT64_MAX;
+ case 4:
+ return INT32_MAX;
+ case 2:
+ return INT16_MAX;
+ case 1:
+ return INT8_MAX;
+ }
+
+ return 0;
+}
+
+static inline PyObject *ndr_PyLong_FromLongLong(long long v)
+{
+ if (v > LONG_MAX || v < LONG_MIN) {
+ return PyLong_FromLongLong(v);
+ } else {
+ return PyInt_FromLong(v);
+ }
+}
+
+static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)
+{
+ if (v > LONG_MAX) {
+ return PyLong_FromUnsignedLongLong(v);
+ } else {
+ return PyInt_FromLong(v);
+ }
+}
+
#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/security.h"
#include "librpc/gen_ndr/svcctl.h"
-staticforward PyTypeObject srvsvc_NetCharDevInfo0_Type;
-staticforward PyTypeObject srvsvc_NetCharDevCtr0_Type;
-staticforward PyTypeObject srvsvc_NetCharDevInfo1_Type;
-staticforward PyTypeObject srvsvc_NetCharDevCtr1_Type;
-staticforward PyTypeObject srvsvc_NetCharDevInfoCtr_Type;
-staticforward PyTypeObject srvsvc_NetCharDevQInfo0_Type;
-staticforward PyTypeObject srvsvc_NetCharDevQCtr0_Type;
-staticforward PyTypeObject srvsvc_NetCharDevQInfo1_Type;
-staticforward PyTypeObject srvsvc_NetCharDevQCtr1_Type;
-staticforward PyTypeObject srvsvc_NetCharDevQInfoCtr_Type;
-staticforward PyTypeObject srvsvc_NetConnInfo0_Type;
-staticforward PyTypeObject srvsvc_NetConnCtr0_Type;
-staticforward PyTypeObject srvsvc_NetConnInfo1_Type;
-staticforward PyTypeObject srvsvc_NetConnCtr1_Type;
-staticforward PyTypeObject srvsvc_NetConnInfoCtr_Type;
-staticforward PyTypeObject srvsvc_NetFileInfo2_Type;
-staticforward PyTypeObject srvsvc_NetFileCtr2_Type;
-staticforward PyTypeObject srvsvc_NetFileInfo3_Type;
-staticforward PyTypeObject srvsvc_NetFileCtr3_Type;
-staticforward PyTypeObject srvsvc_NetFileInfoCtr_Type;
-staticforward PyTypeObject srvsvc_NetSessInfo0_Type;
-staticforward PyTypeObject srvsvc_NetSessCtr0_Type;
-staticforward PyTypeObject srvsvc_NetSessInfo1_Type;
-staticforward PyTypeObject srvsvc_NetSessCtr1_Type;
-staticforward PyTypeObject srvsvc_NetSessInfo2_Type;
-staticforward PyTypeObject srvsvc_NetSessCtr2_Type;
-staticforward PyTypeObject srvsvc_NetSessInfo10_Type;
-staticforward PyTypeObject srvsvc_NetSessCtr10_Type;
-staticforward PyTypeObject srvsvc_NetSessInfo502_Type;
-staticforward PyTypeObject srvsvc_NetSessCtr502_Type;
-staticforward PyTypeObject srvsvc_NetSessInfoCtr_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo0_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr0_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo1_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr1_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo2_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr2_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo501_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr501_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo502_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr502_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo1004_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr1004_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo1005_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr1005_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo1006_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr1006_Type;
-staticforward PyTypeObject srvsvc_NetShareInfo1007_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr1007_Type;
-staticforward PyTypeObject srvsvc_NetShareCtr1501_Type;
-staticforward PyTypeObject srvsvc_NetShareInfoCtr_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo100_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo101_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo102_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo402_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo403_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo502_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo503_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo599_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1005_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1010_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1016_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1017_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1018_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1107_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1501_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1502_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1503_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1506_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1509_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1510_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1511_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1512_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1513_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1514_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1515_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1516_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1518_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1520_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1521_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1522_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1523_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1524_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1525_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1528_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1529_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1530_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1533_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1534_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1535_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1536_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1537_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1538_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1539_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1540_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1541_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1542_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1543_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1544_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1545_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1546_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1547_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1548_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1549_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1550_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1552_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1553_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1554_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1555_Type;
-staticforward PyTypeObject srvsvc_NetSrvInfo1556_Type;
-staticforward PyTypeObject srvsvc_NetDiskInfo0_Type;
-staticforward PyTypeObject srvsvc_NetDiskInfo_Type;
-staticforward PyTypeObject srvsvc_Statistics_Type;
-staticforward PyTypeObject srvsvc_NetTransportInfo0_Type;
-staticforward PyTypeObject srvsvc_NetTransportCtr0_Type;
-staticforward PyTypeObject srvsvc_NetTransportInfo1_Type;
-staticforward PyTypeObject srvsvc_NetTransportCtr1_Type;
-staticforward PyTypeObject srvsvc_NetTransportInfo2_Type;
-staticforward PyTypeObject srvsvc_NetTransportCtr2_Type;
-staticforward PyTypeObject srvsvc_NetTransportInfo3_Type;
-staticforward PyTypeObject srvsvc_NetTransportCtr3_Type;
-staticforward PyTypeObject srvsvc_NetTransportInfoCtr_Type;
-staticforward PyTypeObject srvsvc_NetRemoteTODInfo_Type;
-staticforward PyTypeObject srvsvc_InterfaceType;
+static PyTypeObject srvsvc_NetCharDevInfo0_Type;
+static PyTypeObject srvsvc_NetCharDevCtr0_Type;
+static PyTypeObject srvsvc_NetCharDevInfo1_Type;
+static PyTypeObject srvsvc_NetCharDevCtr1_Type;
+PyObject *py_import_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevInfo *in);
+union srvsvc_NetCharDevInfo *py_export_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+PyObject *py_import_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevCtr *in);
+union srvsvc_NetCharDevCtr *py_export_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetCharDevInfoCtr_Type;
+static PyTypeObject srvsvc_NetCharDevQInfo0_Type;
+static PyTypeObject srvsvc_NetCharDevQCtr0_Type;
+static PyTypeObject srvsvc_NetCharDevQInfo1_Type;
+static PyTypeObject srvsvc_NetCharDevQCtr1_Type;
+PyObject *py_import_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQInfo *in);
+union srvsvc_NetCharDevQInfo *py_export_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+PyObject *py_import_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQCtr *in);
+union srvsvc_NetCharDevQCtr *py_export_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetCharDevQInfoCtr_Type;
+static PyTypeObject srvsvc_NetConnInfo0_Type;
+static PyTypeObject srvsvc_NetConnCtr0_Type;
+static PyTypeObject srvsvc_NetConnInfo1_Type;
+static PyTypeObject srvsvc_NetConnCtr1_Type;
+PyObject *py_import_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetConnCtr *in);
+union srvsvc_NetConnCtr *py_export_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetConnInfoCtr_Type;
+static PyTypeObject srvsvc_NetFileInfo2_Type;
+static PyTypeObject srvsvc_NetFileCtr2_Type;
+static PyTypeObject srvsvc_NetFileInfo3_Type;
+static PyTypeObject srvsvc_NetFileCtr3_Type;
+PyObject *py_import_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileInfo *in);
+union srvsvc_NetFileInfo *py_export_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+PyObject *py_import_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileCtr *in);
+union srvsvc_NetFileCtr *py_export_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetFileInfoCtr_Type;
+static PyTypeObject srvsvc_NetSessInfo0_Type;
+static PyTypeObject srvsvc_NetSessCtr0_Type;
+static PyTypeObject srvsvc_NetSessInfo1_Type;
+static PyTypeObject srvsvc_NetSessCtr1_Type;
+static PyTypeObject srvsvc_NetSessInfo2_Type;
+static PyTypeObject srvsvc_NetSessCtr2_Type;
+static PyTypeObject srvsvc_NetSessInfo10_Type;
+static PyTypeObject srvsvc_NetSessCtr10_Type;
+static PyTypeObject srvsvc_NetSessInfo502_Type;
+static PyTypeObject srvsvc_NetSessCtr502_Type;
+PyObject *py_import_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSessCtr *in);
+union srvsvc_NetSessCtr *py_export_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetSessInfoCtr_Type;
+static PyTypeObject srvsvc_NetShareInfo0_Type;
+static PyTypeObject srvsvc_NetShareCtr0_Type;
+static PyTypeObject srvsvc_NetShareInfo1_Type;
+static PyTypeObject srvsvc_NetShareCtr1_Type;
+static PyTypeObject srvsvc_NetShareInfo2_Type;
+static PyTypeObject srvsvc_NetShareCtr2_Type;
+static PyTypeObject srvsvc_NetShareInfo501_Type;
+static PyTypeObject srvsvc_NetShareCtr501_Type;
+static PyTypeObject srvsvc_NetShareInfo502_Type;
+static PyTypeObject srvsvc_NetShareCtr502_Type;
+static PyTypeObject srvsvc_NetShareInfo1004_Type;
+static PyTypeObject srvsvc_NetShareCtr1004_Type;
+static PyTypeObject srvsvc_NetShareInfo1005_Type;
+static PyTypeObject srvsvc_NetShareCtr1005_Type;
+static PyTypeObject srvsvc_NetShareInfo1006_Type;
+static PyTypeObject srvsvc_NetShareCtr1006_Type;
+static PyTypeObject srvsvc_NetShareInfo1007_Type;
+static PyTypeObject srvsvc_NetShareCtr1007_Type;
+static PyTypeObject srvsvc_NetShareCtr1501_Type;
+PyObject *py_import_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareInfo *in);
+union srvsvc_NetShareInfo *py_export_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+PyObject *py_import_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareCtr *in);
+union srvsvc_NetShareCtr *py_export_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetShareInfoCtr_Type;
+static PyTypeObject srvsvc_NetSrvInfo100_Type;
+static PyTypeObject srvsvc_NetSrvInfo101_Type;
+static PyTypeObject srvsvc_NetSrvInfo102_Type;
+static PyTypeObject srvsvc_NetSrvInfo402_Type;
+static PyTypeObject srvsvc_NetSrvInfo403_Type;
+static PyTypeObject srvsvc_NetSrvInfo502_Type;
+static PyTypeObject srvsvc_NetSrvInfo503_Type;
+static PyTypeObject srvsvc_NetSrvInfo599_Type;
+static PyTypeObject srvsvc_NetSrvInfo1005_Type;
+static PyTypeObject srvsvc_NetSrvInfo1010_Type;
+static PyTypeObject srvsvc_NetSrvInfo1016_Type;
+static PyTypeObject srvsvc_NetSrvInfo1017_Type;
+static PyTypeObject srvsvc_NetSrvInfo1018_Type;
+static PyTypeObject srvsvc_NetSrvInfo1107_Type;
+static PyTypeObject srvsvc_NetSrvInfo1501_Type;
+static PyTypeObject srvsvc_NetSrvInfo1502_Type;
+static PyTypeObject srvsvc_NetSrvInfo1503_Type;
+static PyTypeObject srvsvc_NetSrvInfo1506_Type;
+static PyTypeObject srvsvc_NetSrvInfo1509_Type;
+static PyTypeObject srvsvc_NetSrvInfo1510_Type;
+static PyTypeObject srvsvc_NetSrvInfo1511_Type;
+static PyTypeObject srvsvc_NetSrvInfo1512_Type;
+static PyTypeObject srvsvc_NetSrvInfo1513_Type;
+static PyTypeObject srvsvc_NetSrvInfo1514_Type;
+static PyTypeObject srvsvc_NetSrvInfo1515_Type;
+static PyTypeObject srvsvc_NetSrvInfo1516_Type;
+static PyTypeObject srvsvc_NetSrvInfo1518_Type;
+static PyTypeObject srvsvc_NetSrvInfo1520_Type;
+static PyTypeObject srvsvc_NetSrvInfo1521_Type;
+static PyTypeObject srvsvc_NetSrvInfo1522_Type;
+static PyTypeObject srvsvc_NetSrvInfo1523_Type;
+static PyTypeObject srvsvc_NetSrvInfo1524_Type;
+static PyTypeObject srvsvc_NetSrvInfo1525_Type;
+static PyTypeObject srvsvc_NetSrvInfo1528_Type;
+static PyTypeObject srvsvc_NetSrvInfo1529_Type;
+static PyTypeObject srvsvc_NetSrvInfo1530_Type;
+static PyTypeObject srvsvc_NetSrvInfo1533_Type;
+static PyTypeObject srvsvc_NetSrvInfo1534_Type;
+static PyTypeObject srvsvc_NetSrvInfo1535_Type;
+static PyTypeObject srvsvc_NetSrvInfo1536_Type;
+static PyTypeObject srvsvc_NetSrvInfo1537_Type;
+static PyTypeObject srvsvc_NetSrvInfo1538_Type;
+static PyTypeObject srvsvc_NetSrvInfo1539_Type;
+static PyTypeObject srvsvc_NetSrvInfo1540_Type;
+static PyTypeObject srvsvc_NetSrvInfo1541_Type;
+static PyTypeObject srvsvc_NetSrvInfo1542_Type;
+static PyTypeObject srvsvc_NetSrvInfo1543_Type;
+static PyTypeObject srvsvc_NetSrvInfo1544_Type;
+static PyTypeObject srvsvc_NetSrvInfo1545_Type;
+static PyTypeObject srvsvc_NetSrvInfo1546_Type;
+static PyTypeObject srvsvc_NetSrvInfo1547_Type;
+static PyTypeObject srvsvc_NetSrvInfo1548_Type;
+static PyTypeObject srvsvc_NetSrvInfo1549_Type;
+static PyTypeObject srvsvc_NetSrvInfo1550_Type;
+static PyTypeObject srvsvc_NetSrvInfo1552_Type;
+static PyTypeObject srvsvc_NetSrvInfo1553_Type;
+static PyTypeObject srvsvc_NetSrvInfo1554_Type;
+static PyTypeObject srvsvc_NetSrvInfo1555_Type;
+static PyTypeObject srvsvc_NetSrvInfo1556_Type;
+PyObject *py_import_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSrvInfo *in);
+union srvsvc_NetSrvInfo *py_export_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetDiskInfo0_Type;
+static PyTypeObject srvsvc_NetDiskInfo_Type;
+static PyTypeObject srvsvc_Statistics_Type;
+static PyTypeObject srvsvc_NetTransportInfo0_Type;
+static PyTypeObject srvsvc_NetTransportCtr0_Type;
+static PyTypeObject srvsvc_NetTransportInfo1_Type;
+static PyTypeObject srvsvc_NetTransportCtr1_Type;
+static PyTypeObject srvsvc_NetTransportInfo2_Type;
+static PyTypeObject srvsvc_NetTransportCtr2_Type;
+static PyTypeObject srvsvc_NetTransportInfo3_Type;
+static PyTypeObject srvsvc_NetTransportCtr3_Type;
+PyObject *py_import_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportCtr *in);
+union srvsvc_NetTransportCtr *py_export_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_NetTransportInfoCtr_Type;
+static PyTypeObject srvsvc_NetRemoteTODInfo_Type;
+PyObject *py_import_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportInfo *in);
+union srvsvc_NetTransportInfo *py_export_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+static PyTypeObject srvsvc_InterfaceType;
void initsrvsvc(void);static PyTypeObject *Object_Type;
static PyTypeObject *sec_desc_buf_Type;
{
struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetCharDevCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo0_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetCharDevCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_status;
- py_status = PyInt_FromLong(object->status);
+ py_status = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->status);
return py_status;
}
static int py_srvsvc_NetCharDevInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->status = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->status = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->status = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_time;
- py_time = PyInt_FromLong(object->time);
+ py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
return py_time;
}
static int py_srvsvc_NetCharDevInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetCharDevCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo1_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetCharDevCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
.tp_new = py_srvsvc_NetCharDevCtr1_new,
};
-static PyObject *py_import_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevInfo *in)
+PyObject *py_import_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevInfo *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetCharDevInfo *py_export_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetCharDevInfo *py_export_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetCharDevInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
switch (level) {
return ret;
}
-static PyObject *py_import_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevCtr *in)
+PyObject *py_import_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevCtr *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetCharDevCtr *py_export_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetCharDevCtr *py_export_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetCharDevCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevCtr);
switch (level) {
{
struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(obj);
PyObject *py_level;
- py_level = PyInt_FromLong(object->level);
+ py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
return py_level;
}
static int py_srvsvc_NetCharDevInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->level = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetCharDevQCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo0_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetCharDevQCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_priority;
- py_priority = PyInt_FromLong(object->priority);
+ py_priority = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->priority);
return py_priority;
}
static int py_srvsvc_NetCharDevQInfo1_set_priority(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->priority = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->priority = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->priority = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_users;
- py_users = PyInt_FromLong(object->users);
+ py_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->users);
return py_users;
}
static int py_srvsvc_NetCharDevQInfo1_set_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_num_ahead;
- py_num_ahead = PyInt_FromLong(object->num_ahead);
+ py_num_ahead = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_ahead);
return py_num_ahead;
}
static int py_srvsvc_NetCharDevQInfo1_set_num_ahead(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->num_ahead = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_ahead));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_ahead = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_ahead = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetCharDevQCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo1_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetCharDevQCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
.tp_new = py_srvsvc_NetCharDevQCtr1_new,
};
-static PyObject *py_import_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQInfo *in)
+PyObject *py_import_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQInfo *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetCharDevQInfo *py_export_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetCharDevQInfo *py_export_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetCharDevQInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
switch (level) {
return ret;
}
-static PyObject *py_import_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQCtr *in)
+PyObject *py_import_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQCtr *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetCharDevQCtr *py_export_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetCharDevQCtr *py_export_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetCharDevQCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQCtr);
switch (level) {
{
struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(obj);
PyObject *py_level;
- py_level = PyInt_FromLong(object->level);
+ py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
return py_level;
}
static int py_srvsvc_NetCharDevQInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->level = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetConnInfo0 *object = (struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(obj);
PyObject *py_conn_id;
- py_conn_id = PyInt_FromLong(object->conn_id);
+ py_conn_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_id);
return py_conn_id;
}
static int py_srvsvc_NetConnInfo0_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnInfo0 *object = (struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->conn_id = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_id = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_id = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetConnCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo0_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetConnCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_conn_id;
- py_conn_id = PyInt_FromLong(object->conn_id);
+ py_conn_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_id);
return py_conn_id;
}
static int py_srvsvc_NetConnInfo1_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->conn_id = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_id = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_id = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_conn_type;
- py_conn_type = PyInt_FromLong(object->conn_type);
+ py_conn_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_type);
return py_conn_type;
}
static int py_srvsvc_NetConnInfo1_set_conn_type(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->conn_type = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_type));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_type = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_num_open;
- py_num_open = PyInt_FromLong(object->num_open);
+ py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
return py_num_open;
}
static int py_srvsvc_NetConnInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->num_open = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_num_users;
- py_num_users = PyInt_FromLong(object->num_users);
+ py_num_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_users);
return py_num_users;
}
static int py_srvsvc_NetConnInfo1_set_num_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->num_users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_conn_time;
- py_conn_time = PyInt_FromLong(object->conn_time);
+ py_conn_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_time);
return py_conn_time;
}
static int py_srvsvc_NetConnInfo1_set_conn_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->conn_time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->conn_time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetConnCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo1_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetConnCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
.tp_new = py_srvsvc_NetConnCtr1_new,
};
-static PyObject *py_import_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetConnCtr *in)
+PyObject *py_import_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetConnCtr *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetConnCtr *py_export_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetConnCtr *py_export_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetConnCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetConnCtr);
switch (level) {
{
struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(obj);
PyObject *py_level;
- py_level = PyInt_FromLong(object->level);
+ py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
return py_level;
}
static int py_srvsvc_NetConnInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->level = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetFileInfo2 *object = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_fid;
- py_fid = PyInt_FromLong(object->fid);
+ py_fid = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->fid);
return py_fid;
}
static int py_srvsvc_NetFileInfo2_set_fid(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileInfo2 *object = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->fid = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->fid = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->fid = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetFileCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo2_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetFileCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
PyObject *py_fid;
- py_fid = PyInt_FromLong(object->fid);
+ py_fid = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->fid);
return py_fid;
}
static int py_srvsvc_NetFileInfo3_set_fid(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->fid = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->fid = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->fid = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
PyObject *py_permissions;
- py_permissions = PyInt_FromLong(object->permissions);
+ py_permissions = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
return py_permissions;
}
static int py_srvsvc_NetFileInfo3_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->permissions = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permissions = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permissions = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
PyObject *py_num_locks;
- py_num_locks = PyInt_FromLong(object->num_locks);
+ py_num_locks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_locks);
return py_num_locks;
}
static int py_srvsvc_NetFileInfo3_set_num_locks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->num_locks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_locks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_locks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_locks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetFileCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo3_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetFileCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
.tp_new = py_srvsvc_NetFileCtr3_new,
};
-static PyObject *py_import_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileInfo *in)
+PyObject *py_import_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileInfo *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetFileInfo *py_export_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetFileInfo *py_export_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetFileInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
switch (level) {
return ret;
}
-static PyObject *py_import_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileCtr *in)
+PyObject *py_import_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileCtr *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetFileCtr *py_export_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetFileCtr *py_export_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetFileCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetFileCtr);
switch (level) {
{
struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(obj);
PyObject *py_level;
- py_level = PyInt_FromLong(object->level);
+ py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
return py_level;
}
static int py_srvsvc_NetFileInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->level = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetSessCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo0_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetSessCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_num_open;
- py_num_open = PyInt_FromLong(object->num_open);
+ py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
return py_num_open;
}
static int py_srvsvc_NetSessInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->num_open = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_time;
- py_time = PyInt_FromLong(object->time);
+ py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
return py_time;
}
static int py_srvsvc_NetSessInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_idle_time;
- py_idle_time = PyInt_FromLong(object->idle_time);
+ py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
return py_idle_time;
}
static int py_srvsvc_NetSessInfo1_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->idle_time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_user_flags;
- py_user_flags = PyInt_FromLong(object->user_flags);
+ py_user_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
return py_user_flags;
}
static int py_srvsvc_NetSessInfo1_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->user_flags = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->user_flags = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->user_flags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetSessCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo1_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetSessCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_num_open;
- py_num_open = PyInt_FromLong(object->num_open);
+ py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
return py_num_open;
}
static int py_srvsvc_NetSessInfo2_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->num_open = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_time;
- py_time = PyInt_FromLong(object->time);
+ py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
return py_time;
}
static int py_srvsvc_NetSessInfo2_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_idle_time;
- py_idle_time = PyInt_FromLong(object->idle_time);
+ py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
return py_idle_time;
}
static int py_srvsvc_NetSessInfo2_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->idle_time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_user_flags;
- py_user_flags = PyInt_FromLong(object->user_flags);
+ py_user_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
return py_user_flags;
}
static int py_srvsvc_NetSessInfo2_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->user_flags = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->user_flags = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->user_flags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetSessCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo2_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetSessCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
PyObject *py_time;
- py_time = PyInt_FromLong(object->time);
+ py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
return py_time;
}
static int py_srvsvc_NetSessInfo10_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
PyObject *py_idle_time;
- py_idle_time = PyInt_FromLong(object->idle_time);
+ py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
return py_idle_time;
}
static int py_srvsvc_NetSessInfo10_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->idle_time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetSessCtr10_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo10_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetSessCtr10_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_num_open;
- py_num_open = PyInt_FromLong(object->num_open);
+ py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
return py_num_open;
}
static int py_srvsvc_NetSessInfo502_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->num_open = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->num_open = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_time;
- py_time = PyInt_FromLong(object->time);
+ py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
return py_time;
}
static int py_srvsvc_NetSessInfo502_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_idle_time;
- py_idle_time = PyInt_FromLong(object->idle_time);
+ py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
return py_idle_time;
}
static int py_srvsvc_NetSessInfo502_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->idle_time = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->idle_time = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_user_flags;
- py_user_flags = PyInt_FromLong(object->user_flags);
+ py_user_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
return py_user_flags;
}
static int py_srvsvc_NetSessInfo502_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->user_flags = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->user_flags = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->user_flags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetSessCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo502_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetSessCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
.tp_new = py_srvsvc_NetSessCtr502_new,
};
-static PyObject *py_import_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSessCtr *in)
+PyObject *py_import_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSessCtr *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetSessCtr *py_export_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetSessCtr *py_export_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetSessCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetSessCtr);
switch (level) {
{
struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(obj);
PyObject *py_level;
- py_level = PyInt_FromLong(object->level);
+ py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
return py_level;
}
static int py_srvsvc_NetSessInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->level = PyInt_AsLong(value);
- return 0;
-}
-
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
+ return 0;
+}
+
static PyObject *py_srvsvc_NetSessInfoCtr_get_ctr(PyObject *obj, void *closure)
{
struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(obj);
{
struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo0_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_type;
- py_type = PyInt_FromLong(object->type);
+ py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
return py_type;
}
static int py_srvsvc_NetShareInfo1_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->type = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->type = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_type;
- py_type = PyInt_FromLong(object->type);
+ py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
return py_type;
}
static int py_srvsvc_NetShareInfo2_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->type = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->type = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_permissions;
- py_permissions = PyInt_FromLong(object->permissions);
+ py_permissions = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
return py_permissions;
}
static int py_srvsvc_NetShareInfo2_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->permissions = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permissions = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permissions = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_max_users;
- py_max_users = PyInt_FromLong(object->max_users);
+ py_max_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
return py_max_users;
}
static int py_srvsvc_NetShareInfo2_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->max_users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->max_users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->max_users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_current_users;
- py_current_users = PyInt_FromLong(object->current_users);
+ py_current_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->current_users);
return py_current_users;
}
static int py_srvsvc_NetShareInfo2_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->current_users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->current_users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->current_users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo2_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
PyObject *py_type;
- py_type = PyInt_FromLong(object->type);
+ py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
return py_type;
}
static int py_srvsvc_NetShareInfo501_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->type = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->type = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
PyObject *py_csc_policy;
- py_csc_policy = PyInt_FromLong(object->csc_policy);
+ py_csc_policy = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->csc_policy);
return py_csc_policy;
}
static int py_srvsvc_NetShareInfo501_set_csc_policy(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->csc_policy = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->csc_policy));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->csc_policy = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->csc_policy = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr501_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo501_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr501_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_type;
- py_type = PyInt_FromLong(object->type);
+ py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
return py_type;
}
static int py_srvsvc_NetShareInfo502_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->type = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->type = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_permissions;
- py_permissions = PyInt_FromLong(object->permissions);
+ py_permissions = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
return py_permissions;
}
static int py_srvsvc_NetShareInfo502_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->permissions = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permissions = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permissions = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_max_users;
- py_max_users = PyInt_FromLong(object->max_users);
+ py_max_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
return py_max_users;
}
static int py_srvsvc_NetShareInfo502_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->max_users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->max_users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->max_users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_current_users;
- py_current_users = PyInt_FromLong(object->current_users);
+ py_current_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->current_users);
return py_current_users;
}
static int py_srvsvc_NetShareInfo502_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->current_users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->current_users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->current_users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo502_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr1004_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1004_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr1004_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareInfo1005 *object = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(obj);
PyObject *py_dfs_flags;
- py_dfs_flags = PyInt_FromLong(object->dfs_flags);
+ py_dfs_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->dfs_flags);
return py_dfs_flags;
}
static int py_srvsvc_NetShareInfo1005_set_dfs_flags(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo1005 *object = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->dfs_flags = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->dfs_flags = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dfs_flags));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->dfs_flags = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->dfs_flags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr1005_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1005_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr1005_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareInfo1006 *object = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(obj);
PyObject *py_max_users;
- py_max_users = PyInt_FromLong(object->max_users);
+ py_max_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
return py_max_users;
}
static int py_srvsvc_NetShareInfo1006_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo1006 *object = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->max_users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->max_users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->max_users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr1006_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1006_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr1006_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(obj);
PyObject *py_flags;
- py_flags = PyInt_FromLong(object->flags);
+ py_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->flags);
return py_flags;
}
static int py_srvsvc_NetShareInfo1007_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->flags = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->flags = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->flags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr1007_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1007_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr1007_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetShareCtr1501_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(sec_desc_buf_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetShareCtr1501_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
.tp_new = py_srvsvc_NetShareCtr1501_new,
};
-static PyObject *py_import_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareInfo *in)
+PyObject *py_import_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareInfo *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetShareInfo *py_export_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetShareInfo *py_export_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetShareInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
switch (level) {
return ret;
}
-static PyObject *py_import_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareCtr *in)
+PyObject *py_import_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareCtr *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetShareCtr *py_export_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetShareCtr *py_export_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetShareCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetShareCtr);
switch (level) {
{
struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(obj);
PyObject *py_level;
- py_level = PyInt_FromLong(object->level);
+ py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
return py_level;
}
static int py_srvsvc_NetShareInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->level = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(obj);
PyObject *py_platform_id;
- py_platform_id = PyInt_FromLong(object->platform_id);
+ py_platform_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
return py_platform_id;
}
static int py_srvsvc_NetSrvInfo100_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->platform_id = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->platform_id = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->platform_id = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->platform_id = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
PyObject *py_platform_id;
- py_platform_id = PyInt_FromLong(object->platform_id);
+ py_platform_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
return py_platform_id;
}
static int py_srvsvc_NetSrvInfo101_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->platform_id = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->platform_id = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->platform_id = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->platform_id = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
PyObject *py_version_major;
- py_version_major = PyInt_FromLong(object->version_major);
+ py_version_major = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_major);
return py_version_major;
}
static int py_srvsvc_NetSrvInfo101_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->version_major = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_major = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_major = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
PyObject *py_version_minor;
- py_version_minor = PyInt_FromLong(object->version_minor);
+ py_version_minor = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_minor);
return py_version_minor;
}
static int py_srvsvc_NetSrvInfo101_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->version_minor = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_minor = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_minor = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
PyObject *py_server_type;
- py_server_type = PyInt_FromLong(object->server_type);
+ py_server_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->server_type);
return py_server_type;
}
static int py_srvsvc_NetSrvInfo101_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->server_type = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->server_type = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->server_type = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->server_type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_platform_id;
- py_platform_id = PyInt_FromLong(object->platform_id);
+ py_platform_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
return py_platform_id;
}
static int py_srvsvc_NetSrvInfo102_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->platform_id = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->platform_id = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->platform_id = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->platform_id = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_version_major;
- py_version_major = PyInt_FromLong(object->version_major);
+ py_version_major = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_major);
return py_version_major;
}
static int py_srvsvc_NetSrvInfo102_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->version_major = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_major = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_major = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_version_minor;
- py_version_minor = PyInt_FromLong(object->version_minor);
+ py_version_minor = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_minor);
return py_version_minor;
}
static int py_srvsvc_NetSrvInfo102_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->version_minor = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_minor = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->version_minor = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_server_type;
- py_server_type = PyInt_FromLong(object->server_type);
+ py_server_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->server_type);
return py_server_type;
}
static int py_srvsvc_NetSrvInfo102_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- if (PyLong_Check(value)) {
- object->server_type = PyLong_AsLongLong(value);
- } else if (PyInt_Check(value)) {
- object->server_type = PyInt_AsLong(value);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return -1;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->server_type = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->server_type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
}
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_users;
- py_users = PyInt_FromLong(object->users);
+ py_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->users);
return py_users;
}
static int py_srvsvc_NetSrvInfo102_set_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_disc;
- py_disc = PyInt_FromLong(object->disc);
+ py_disc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->disc);
return py_disc;
}
static int py_srvsvc_NetSrvInfo102_set_disc(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->disc = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->disc = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->disc = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_hidden;
- py_hidden = PyInt_FromLong(object->hidden);
+ py_hidden = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hidden);
return py_hidden;
}
static int py_srvsvc_NetSrvInfo102_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->hidden = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hidden = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hidden = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_announce;
- py_announce = PyInt_FromLong(object->announce);
+ py_announce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->announce);
return py_announce;
}
static int py_srvsvc_NetSrvInfo102_set_announce(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->announce = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->announce = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->announce = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_anndelta;
- py_anndelta = PyInt_FromLong(object->anndelta);
+ py_anndelta = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->anndelta);
return py_anndelta;
}
static int py_srvsvc_NetSrvInfo102_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->anndelta = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->anndelta = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->anndelta = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
PyObject *py_licenses;
- py_licenses = PyInt_FromLong(object->licenses);
+ py_licenses = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->licenses);
return py_licenses;
}
static int py_srvsvc_NetSrvInfo102_set_licenses(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->licenses = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->licenses));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->licenses = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->licenses = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_ulist_mtime;
- py_ulist_mtime = PyInt_FromLong(object->ulist_mtime);
+ py_ulist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->ulist_mtime);
return py_ulist_mtime;
}
static int py_srvsvc_NetSrvInfo402_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->ulist_mtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->ulist_mtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->ulist_mtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_glist_mtime;
- py_glist_mtime = PyInt_FromLong(object->glist_mtime);
+ py_glist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->glist_mtime);
return py_glist_mtime;
}
static int py_srvsvc_NetSrvInfo402_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->glist_mtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->glist_mtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->glist_mtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_alist_mtime;
- py_alist_mtime = PyInt_FromLong(object->alist_mtime);
+ py_alist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alist_mtime);
return py_alist_mtime;
}
static int py_srvsvc_NetSrvInfo402_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->alist_mtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alist_mtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alist_mtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_security;
- py_security = PyInt_FromLong(object->security);
+ py_security = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->security);
return py_security;
}
static int py_srvsvc_NetSrvInfo402_set_security(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->security = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->security = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->security = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_numadmin;
- py_numadmin = PyInt_FromLong(object->numadmin);
+ py_numadmin = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numadmin);
return py_numadmin;
}
static int py_srvsvc_NetSrvInfo402_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numadmin = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numadmin = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numadmin = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_lanmask;
- py_lanmask = PyInt_FromLong(object->lanmask);
+ py_lanmask = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lanmask);
return py_lanmask;
}
static int py_srvsvc_NetSrvInfo402_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->lanmask = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lanmask = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lanmask = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_chdevs;
- py_chdevs = PyInt_FromLong(object->chdevs);
+ py_chdevs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevs);
return py_chdevs;
}
static int py_srvsvc_NetSrvInfo402_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->chdevs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_chdevqs;
- py_chdevqs = PyInt_FromLong(object->chdevqs);
+ py_chdevqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevqs);
return py_chdevqs;
}
static int py_srvsvc_NetSrvInfo402_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->chdevqs = PyInt_AsLong(value);
- return 0;
-}
-
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevqs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevqs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
+ return 0;
+}
+
static PyObject *py_srvsvc_NetSrvInfo402_get_chdevjobs(PyObject *obj, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_chdevjobs;
- py_chdevjobs = PyInt_FromLong(object->chdevjobs);
+ py_chdevjobs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevjobs);
return py_chdevjobs;
}
static int py_srvsvc_NetSrvInfo402_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->chdevjobs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevjobs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevjobs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_connections;
- py_connections = PyInt_FromLong(object->connections);
+ py_connections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->connections);
return py_connections;
}
static int py_srvsvc_NetSrvInfo402_set_connections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->connections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->connections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->connections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_shares;
- py_shares = PyInt_FromLong(object->shares);
+ py_shares = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->shares);
return py_shares;
}
static int py_srvsvc_NetSrvInfo402_set_shares(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->shares = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->shares = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->shares = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_openfiles;
- py_openfiles = PyInt_FromLong(object->openfiles);
+ py_openfiles = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->openfiles);
return py_openfiles;
}
static int py_srvsvc_NetSrvInfo402_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->openfiles = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->openfiles = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->openfiles = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_sessopen;
- py_sessopen = PyInt_FromLong(object->sessopen);
+ py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
return py_sessopen;
}
static int py_srvsvc_NetSrvInfo402_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessopen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_sesssvc;
- py_sesssvc = PyInt_FromLong(object->sesssvc);
+ py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
return py_sesssvc;
}
static int py_srvsvc_NetSrvInfo402_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sesssvc = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_sessreqs;
- py_sessreqs = PyInt_FromLong(object->sessreqs);
+ py_sessreqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessreqs);
return py_sessreqs;
}
static int py_srvsvc_NetSrvInfo402_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessreqs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessreqs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessreqs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_opensearch;
- py_opensearch = PyInt_FromLong(object->opensearch);
+ py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
return py_opensearch;
}
static int py_srvsvc_NetSrvInfo402_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->opensearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_activelocks;
- py_activelocks = PyInt_FromLong(object->activelocks);
+ py_activelocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->activelocks);
return py_activelocks;
}
static int py_srvsvc_NetSrvInfo402_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->activelocks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->activelocks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->activelocks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_numreqbufs;
- py_numreqbufs = PyInt_FromLong(object->numreqbufs);
+ py_numreqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numreqbufs);
return py_numreqbufs;
}
static int py_srvsvc_NetSrvInfo402_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numreqbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numreqbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numreqbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_sizereqbufs;
- py_sizereqbufs = PyInt_FromLong(object->sizereqbufs);
+ py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
return py_sizereqbufs;
}
static int py_srvsvc_NetSrvInfo402_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sizereqbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_numbigbufs;
- py_numbigbufs = PyInt_FromLong(object->numbigbufs);
+ py_numbigbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numbigbufs);
return py_numbigbufs;
}
static int py_srvsvc_NetSrvInfo402_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numbigbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numbigbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numbigbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_numfiletasks;
- py_numfiletasks = PyInt_FromLong(object->numfiletasks);
+ py_numfiletasks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numfiletasks);
return py_numfiletasks;
}
static int py_srvsvc_NetSrvInfo402_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numfiletasks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numfiletasks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numfiletasks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_alertsched;
- py_alertsched = PyInt_FromLong(object->alertsched);
+ py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
return py_alertsched;
}
static int py_srvsvc_NetSrvInfo402_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->alertsched = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_erroralert;
- py_erroralert = PyInt_FromLong(object->erroralert);
+ py_erroralert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->erroralert);
return py_erroralert;
}
static int py_srvsvc_NetSrvInfo402_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->erroralert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->erroralert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->erroralert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_logonalert;
- py_logonalert = PyInt_FromLong(object->logonalert);
+ py_logonalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->logonalert);
return py_logonalert;
}
static int py_srvsvc_NetSrvInfo402_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->logonalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->logonalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->logonalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_accessalert;
- py_accessalert = PyInt_FromLong(object->accessalert);
+ py_accessalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->accessalert);
return py_accessalert;
}
static int py_srvsvc_NetSrvInfo402_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->accessalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->accessalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->accessalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_diskalert;
- py_diskalert = PyInt_FromLong(object->diskalert);
+ py_diskalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskalert);
return py_diskalert;
}
static int py_srvsvc_NetSrvInfo402_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->diskalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_netioalert;
- py_netioalert = PyInt_FromLong(object->netioalert);
+ py_netioalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->netioalert);
return py_netioalert;
}
static int py_srvsvc_NetSrvInfo402_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->netioalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->netioalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->netioalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
PyObject *py_maxaudits;
- py_maxaudits = PyInt_FromLong(object->maxaudits);
+ py_maxaudits = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxaudits);
return py_maxaudits;
}
static int py_srvsvc_NetSrvInfo402_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxaudits = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxaudits = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxaudits = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_ulist_mtime;
- py_ulist_mtime = PyInt_FromLong(object->ulist_mtime);
+ py_ulist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->ulist_mtime);
return py_ulist_mtime;
}
static int py_srvsvc_NetSrvInfo403_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->ulist_mtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->ulist_mtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->ulist_mtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_glist_mtime;
- py_glist_mtime = PyInt_FromLong(object->glist_mtime);
+ py_glist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->glist_mtime);
return py_glist_mtime;
}
static int py_srvsvc_NetSrvInfo403_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->glist_mtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->glist_mtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->glist_mtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_alist_mtime;
- py_alist_mtime = PyInt_FromLong(object->alist_mtime);
+ py_alist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alist_mtime);
return py_alist_mtime;
}
static int py_srvsvc_NetSrvInfo403_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->alist_mtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alist_mtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alist_mtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_security;
- py_security = PyInt_FromLong(object->security);
+ py_security = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->security);
return py_security;
}
static int py_srvsvc_NetSrvInfo403_set_security(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->security = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->security = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->security = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_numadmin;
- py_numadmin = PyInt_FromLong(object->numadmin);
+ py_numadmin = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numadmin);
return py_numadmin;
}
static int py_srvsvc_NetSrvInfo403_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numadmin = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numadmin = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numadmin = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_lanmask;
- py_lanmask = PyInt_FromLong(object->lanmask);
+ py_lanmask = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lanmask);
return py_lanmask;
}
static int py_srvsvc_NetSrvInfo403_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->lanmask = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lanmask = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lanmask = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_chdevs;
- py_chdevs = PyInt_FromLong(object->chdevs);
+ py_chdevs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevs);
return py_chdevs;
}
static int py_srvsvc_NetSrvInfo403_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->chdevs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_chdevqs;
- py_chdevqs = PyInt_FromLong(object->chdevqs);
+ py_chdevqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevqs);
return py_chdevqs;
}
static int py_srvsvc_NetSrvInfo403_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->chdevqs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevqs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevqs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_chdevjobs;
- py_chdevjobs = PyInt_FromLong(object->chdevjobs);
+ py_chdevjobs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevjobs);
return py_chdevjobs;
}
static int py_srvsvc_NetSrvInfo403_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->chdevjobs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevjobs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->chdevjobs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_connections;
- py_connections = PyInt_FromLong(object->connections);
+ py_connections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->connections);
return py_connections;
}
static int py_srvsvc_NetSrvInfo403_set_connections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->connections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->connections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->connections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_shares;
- py_shares = PyInt_FromLong(object->shares);
+ py_shares = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->shares);
return py_shares;
}
static int py_srvsvc_NetSrvInfo403_set_shares(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->shares = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->shares = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->shares = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_openfiles;
- py_openfiles = PyInt_FromLong(object->openfiles);
+ py_openfiles = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->openfiles);
return py_openfiles;
}
static int py_srvsvc_NetSrvInfo403_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->openfiles = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->openfiles = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->openfiles = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_sessopen;
- py_sessopen = PyInt_FromLong(object->sessopen);
+ py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
return py_sessopen;
}
static int py_srvsvc_NetSrvInfo403_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessopen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_sesssvc;
- py_sesssvc = PyInt_FromLong(object->sesssvc);
+ py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
return py_sesssvc;
}
static int py_srvsvc_NetSrvInfo403_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sesssvc = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_sessreqs;
- py_sessreqs = PyInt_FromLong(object->sessreqs);
+ py_sessreqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessreqs);
return py_sessreqs;
}
static int py_srvsvc_NetSrvInfo403_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessreqs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessreqs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessreqs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_opensearch;
- py_opensearch = PyInt_FromLong(object->opensearch);
+ py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
return py_opensearch;
}
static int py_srvsvc_NetSrvInfo403_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->opensearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_activelocks;
- py_activelocks = PyInt_FromLong(object->activelocks);
+ py_activelocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->activelocks);
return py_activelocks;
}
static int py_srvsvc_NetSrvInfo403_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->activelocks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->activelocks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->activelocks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_numreqbufs;
- py_numreqbufs = PyInt_FromLong(object->numreqbufs);
+ py_numreqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numreqbufs);
return py_numreqbufs;
}
static int py_srvsvc_NetSrvInfo403_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numreqbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numreqbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numreqbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_sizereqbufs;
- py_sizereqbufs = PyInt_FromLong(object->sizereqbufs);
+ py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
return py_sizereqbufs;
}
static int py_srvsvc_NetSrvInfo403_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sizereqbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_numbigbufs;
- py_numbigbufs = PyInt_FromLong(object->numbigbufs);
+ py_numbigbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numbigbufs);
return py_numbigbufs;
}
static int py_srvsvc_NetSrvInfo403_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numbigbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numbigbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numbigbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_numfiletasks;
- py_numfiletasks = PyInt_FromLong(object->numfiletasks);
+ py_numfiletasks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numfiletasks);
return py_numfiletasks;
}
static int py_srvsvc_NetSrvInfo403_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numfiletasks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numfiletasks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numfiletasks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_alertsched;
- py_alertsched = PyInt_FromLong(object->alertsched);
+ py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
return py_alertsched;
}
static int py_srvsvc_NetSrvInfo403_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->alertsched = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_erroralert;
- py_erroralert = PyInt_FromLong(object->erroralert);
+ py_erroralert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->erroralert);
return py_erroralert;
}
static int py_srvsvc_NetSrvInfo403_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->erroralert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->erroralert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->erroralert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_logonalert;
- py_logonalert = PyInt_FromLong(object->logonalert);
+ py_logonalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->logonalert);
return py_logonalert;
}
static int py_srvsvc_NetSrvInfo403_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->logonalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->logonalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->logonalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_accessalert;
- py_accessalert = PyInt_FromLong(object->accessalert);
+ py_accessalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->accessalert);
return py_accessalert;
}
static int py_srvsvc_NetSrvInfo403_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->accessalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->accessalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->accessalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_diskalert;
- py_diskalert = PyInt_FromLong(object->diskalert);
+ py_diskalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskalert);
return py_diskalert;
}
static int py_srvsvc_NetSrvInfo403_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->diskalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_netioalert;
- py_netioalert = PyInt_FromLong(object->netioalert);
+ py_netioalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->netioalert);
return py_netioalert;
}
static int py_srvsvc_NetSrvInfo403_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->netioalert = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->netioalert = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->netioalert = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_maxaudits;
- py_maxaudits = PyInt_FromLong(object->maxaudits);
+ py_maxaudits = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxaudits);
return py_maxaudits;
}
static int py_srvsvc_NetSrvInfo403_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxaudits = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxaudits = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxaudits = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_auditedevents;
- py_auditedevents = PyInt_FromLong(object->auditedevents);
+ py_auditedevents = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->auditedevents);
return py_auditedevents;
}
static int py_srvsvc_NetSrvInfo403_set_auditedevents(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->auditedevents = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditedevents));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->auditedevents = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->auditedevents = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
PyObject *py_auditprofile;
- py_auditprofile = PyInt_FromLong(object->auditprofile);
+ py_auditprofile = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->auditprofile);
return py_auditprofile;
}
static int py_srvsvc_NetSrvInfo403_set_auditprofile(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->auditprofile = PyInt_AsLong(value);
- return 0;
-}
-
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditprofile));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->auditprofile = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->auditprofile = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
+ return 0;
+}
+
static PyObject *py_srvsvc_NetSrvInfo403_get_autopath(PyObject *obj, void *closure)
{
struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_sessopen;
- py_sessopen = PyInt_FromLong(object->sessopen);
+ py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
return py_sessopen;
}
static int py_srvsvc_NetSrvInfo502_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessopen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_sesssvc;
- py_sesssvc = PyInt_FromLong(object->sesssvc);
+ py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
return py_sesssvc;
}
static int py_srvsvc_NetSrvInfo502_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sesssvc = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_opensearch;
- py_opensearch = PyInt_FromLong(object->opensearch);
+ py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
return py_opensearch;
}
static int py_srvsvc_NetSrvInfo502_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->opensearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_sizereqbufs;
- py_sizereqbufs = PyInt_FromLong(object->sizereqbufs);
+ py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
return py_sizereqbufs;
}
static int py_srvsvc_NetSrvInfo502_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sizereqbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_initworkitems;
- py_initworkitems = PyInt_FromLong(object->initworkitems);
+ py_initworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
return py_initworkitems;
}
static int py_srvsvc_NetSrvInfo502_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_maxworkitems;
- py_maxworkitems = PyInt_FromLong(object->maxworkitems);
+ py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
return py_maxworkitems;
}
static int py_srvsvc_NetSrvInfo502_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_rawworkitems;
- py_rawworkitems = PyInt_FromLong(object->rawworkitems);
+ py_rawworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
return py_rawworkitems;
}
static int py_srvsvc_NetSrvInfo502_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->rawworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->rawworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->rawworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_irpstacksize;
- py_irpstacksize = PyInt_FromLong(object->irpstacksize);
+ py_irpstacksize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
return py_irpstacksize;
}
static int py_srvsvc_NetSrvInfo502_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->irpstacksize = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->irpstacksize = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->irpstacksize = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_maxrawbuflen;
- py_maxrawbuflen = PyInt_FromLong(object->maxrawbuflen);
+ py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
return py_maxrawbuflen;
}
static int py_srvsvc_NetSrvInfo502_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxrawbuflen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_sessusers;
- py_sessusers = PyInt_FromLong(object->sessusers);
+ py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
return py_sessusers;
}
static int py_srvsvc_NetSrvInfo502_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessusers = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_sessconns;
- py_sessconns = PyInt_FromLong(object->sessconns);
+ py_sessconns = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
return py_sessconns;
}
static int py_srvsvc_NetSrvInfo502_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessconns = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessconns = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessconns = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_maxpagedmemoryusage;
- py_maxpagedmemoryusage = PyInt_FromLong(object->maxpagedmemoryusage);
+ py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
return py_maxpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo502_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_maxnonpagedmemoryusage;
- py_maxnonpagedmemoryusage = PyInt_FromLong(object->maxnonpagedmemoryusage);
+ py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
return py_maxnonpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo502_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxnonpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_enablesoftcompat;
- py_enablesoftcompat = PyInt_FromLong(object->enablesoftcompat);
+ py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
return py_enablesoftcompat;
}
static int py_srvsvc_NetSrvInfo502_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablesoftcompat = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_enableforcedlogoff;
- py_enableforcedlogoff = PyInt_FromLong(object->enableforcedlogoff);
+ py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
return py_enableforcedlogoff;
}
static int py_srvsvc_NetSrvInfo502_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableforcedlogoff = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_timesource;
- py_timesource = PyInt_FromLong(object->timesource);
+ py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
return py_timesource;
}
static int py_srvsvc_NetSrvInfo502_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->timesource = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_acceptdownlevelapis;
- py_acceptdownlevelapis = PyInt_FromLong(object->acceptdownlevelapis);
+ py_acceptdownlevelapis = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
return py_acceptdownlevelapis;
}
static int py_srvsvc_NetSrvInfo502_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->acceptdownlevelapis = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->acceptdownlevelapis = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->acceptdownlevelapis = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
PyObject *py_lmannounce;
- py_lmannounce = PyInt_FromLong(object->lmannounce);
+ py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
return py_lmannounce;
}
static int py_srvsvc_NetSrvInfo502_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->lmannounce = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_sessopen;
- py_sessopen = PyInt_FromLong(object->sessopen);
+ py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
return py_sessopen;
}
static int py_srvsvc_NetSrvInfo503_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessopen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_sesssvc;
- py_sesssvc = PyInt_FromLong(object->sesssvc);
+ py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
return py_sesssvc;
}
static int py_srvsvc_NetSrvInfo503_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sesssvc = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_opensearch;
- py_opensearch = PyInt_FromLong(object->opensearch);
+ py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
return py_opensearch;
}
static int py_srvsvc_NetSrvInfo503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->opensearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_sizereqbufs;
- py_sizereqbufs = PyInt_FromLong(object->sizereqbufs);
+ py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
return py_sizereqbufs;
}
static int py_srvsvc_NetSrvInfo503_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sizereqbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_initworkitems;
- py_initworkitems = PyInt_FromLong(object->initworkitems);
+ py_initworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
return py_initworkitems;
}
static int py_srvsvc_NetSrvInfo503_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxworkitems;
- py_maxworkitems = PyInt_FromLong(object->maxworkitems);
+ py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
return py_maxworkitems;
}
static int py_srvsvc_NetSrvInfo503_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_rawworkitems;
- py_rawworkitems = PyInt_FromLong(object->rawworkitems);
+ py_rawworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
return py_rawworkitems;
}
static int py_srvsvc_NetSrvInfo503_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->rawworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->rawworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->rawworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_irpstacksize;
- py_irpstacksize = PyInt_FromLong(object->irpstacksize);
+ py_irpstacksize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
return py_irpstacksize;
}
static int py_srvsvc_NetSrvInfo503_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->irpstacksize = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->irpstacksize = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->irpstacksize = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxrawbuflen;
- py_maxrawbuflen = PyInt_FromLong(object->maxrawbuflen);
+ py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
return py_maxrawbuflen;
}
static int py_srvsvc_NetSrvInfo503_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxrawbuflen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_sessusers;
- py_sessusers = PyInt_FromLong(object->sessusers);
+ py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
return py_sessusers;
}
static int py_srvsvc_NetSrvInfo503_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessusers = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_sessconns;
- py_sessconns = PyInt_FromLong(object->sessconns);
+ py_sessconns = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
return py_sessconns;
}
static int py_srvsvc_NetSrvInfo503_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessconns = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessconns = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessconns = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxpagedmemoryusage;
- py_maxpagedmemoryusage = PyInt_FromLong(object->maxpagedmemoryusage);
+ py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
return py_maxpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo503_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxnonpagedmemoryusage;
- py_maxnonpagedmemoryusage = PyInt_FromLong(object->maxnonpagedmemoryusage);
+ py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
return py_maxnonpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo503_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxnonpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_enablesoftcompat;
- py_enablesoftcompat = PyInt_FromLong(object->enablesoftcompat);
+ py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
return py_enablesoftcompat;
}
static int py_srvsvc_NetSrvInfo503_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablesoftcompat = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_enableforcedlogoff;
- py_enableforcedlogoff = PyInt_FromLong(object->enableforcedlogoff);
+ py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
return py_enableforcedlogoff;
}
static int py_srvsvc_NetSrvInfo503_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableforcedlogoff = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_timesource;
- py_timesource = PyInt_FromLong(object->timesource);
+ py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
return py_timesource;
}
static int py_srvsvc_NetSrvInfo503_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->timesource = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_acceptdownlevelapis;
- py_acceptdownlevelapis = PyInt_FromLong(object->acceptdownlevelapis);
+ py_acceptdownlevelapis = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
return py_acceptdownlevelapis;
}
static int py_srvsvc_NetSrvInfo503_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->acceptdownlevelapis = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->acceptdownlevelapis = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->acceptdownlevelapis = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_lmannounce;
- py_lmannounce = PyInt_FromLong(object->lmannounce);
+ py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
return py_lmannounce;
}
static int py_srvsvc_NetSrvInfo503_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->lmannounce = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxcopyreadlen;
- py_maxcopyreadlen = PyInt_FromLong(object->maxcopyreadlen);
+ py_maxcopyreadlen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
return py_maxcopyreadlen;
}
static int py_srvsvc_NetSrvInfo503_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxcopyreadlen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopyreadlen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopyreadlen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxcopywritelen;
- py_maxcopywritelen = PyInt_FromLong(object->maxcopywritelen);
+ py_maxcopywritelen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
return py_maxcopywritelen;
}
static int py_srvsvc_NetSrvInfo503_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxcopywritelen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopywritelen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopywritelen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_minkeepsearch;
- py_minkeepsearch = PyInt_FromLong(object->minkeepsearch);
+ py_minkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
return py_minkeepsearch;
}
static int py_srvsvc_NetSrvInfo503_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minkeepsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxkeepsearch;
- py_maxkeepsearch = PyInt_FromLong(object->maxkeepsearch);
+ py_maxkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepsearch);
return py_maxkeepsearch;
}
static int py_srvsvc_NetSrvInfo503_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxkeepsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_minkeepcomplsearch;
- py_minkeepcomplsearch = PyInt_FromLong(object->minkeepcomplsearch);
+ py_minkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
return py_minkeepcomplsearch;
}
static int py_srvsvc_NetSrvInfo503_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minkeepcomplsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepcomplsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepcomplsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxkeepcomplsearch;
- py_maxkeepcomplsearch = PyInt_FromLong(object->maxkeepcomplsearch);
+ py_maxkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
return py_maxkeepcomplsearch;
}
static int py_srvsvc_NetSrvInfo503_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxkeepcomplsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepcomplsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepcomplsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_threadcountadd;
- py_threadcountadd = PyInt_FromLong(object->threadcountadd);
+ py_threadcountadd = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadcountadd);
return py_threadcountadd;
}
static int py_srvsvc_NetSrvInfo503_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->threadcountadd = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadcountadd = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadcountadd = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_numlockthreads;
- py_numlockthreads = PyInt_FromLong(object->numlockthreads);
+ py_numlockthreads = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numlockthreads);
return py_numlockthreads;
}
static int py_srvsvc_NetSrvInfo503_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numlockthreads = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numlockthreads = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numlockthreads = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_scavtimeout;
- py_scavtimeout = PyInt_FromLong(object->scavtimeout);
+ py_scavtimeout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
return py_scavtimeout;
}
static int py_srvsvc_NetSrvInfo503_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->scavtimeout = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavtimeout = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavtimeout = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_minrcvqueue;
- py_minrcvqueue = PyInt_FromLong(object->minrcvqueue);
+ py_minrcvqueue = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
return py_minrcvqueue;
}
static int py_srvsvc_NetSrvInfo503_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minrcvqueue = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minrcvqueue = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minrcvqueue = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_minfreeworkitems;
- py_minfreeworkitems = PyInt_FromLong(object->minfreeworkitems);
+ py_minfreeworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
return py_minfreeworkitems;
}
static int py_srvsvc_NetSrvInfo503_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minfreeworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_xactmemsize;
- py_xactmemsize = PyInt_FromLong(object->xactmemsize);
+ py_xactmemsize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->xactmemsize);
return py_xactmemsize;
}
static int py_srvsvc_NetSrvInfo503_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->xactmemsize = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->xactmemsize = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->xactmemsize = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_threadpriority;
- py_threadpriority = PyInt_FromLong(object->threadpriority);
+ py_threadpriority = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadpriority);
return py_threadpriority;
}
static int py_srvsvc_NetSrvInfo503_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->threadpriority = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadpriority = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadpriority = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxmpxct;
- py_maxmpxct = PyInt_FromLong(object->maxmpxct);
+ py_maxmpxct = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
return py_maxmpxct;
}
static int py_srvsvc_NetSrvInfo503_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxmpxct = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxmpxct = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxmpxct = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_oplockbreakwait;
- py_oplockbreakwait = PyInt_FromLong(object->oplockbreakwait);
+ py_oplockbreakwait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
return py_oplockbreakwait;
}
static int py_srvsvc_NetSrvInfo503_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->oplockbreakwait = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakwait = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakwait = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_oplockbreakresponsewait;
- py_oplockbreakresponsewait = PyInt_FromLong(object->oplockbreakresponsewait);
+ py_oplockbreakresponsewait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
return py_oplockbreakresponsewait;
}
static int py_srvsvc_NetSrvInfo503_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->oplockbreakresponsewait = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakresponsewait = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakresponsewait = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_enableoplocks;
- py_enableoplocks = PyInt_FromLong(object->enableoplocks);
+ py_enableoplocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
return py_enableoplocks;
}
static int py_srvsvc_NetSrvInfo503_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableoplocks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplocks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplocks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_enableoplockforceclose;
- py_enableoplockforceclose = PyInt_FromLong(object->enableoplockforceclose);
+ py_enableoplockforceclose = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
return py_enableoplockforceclose;
}
static int py_srvsvc_NetSrvInfo503_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableoplockforceclose = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplockforceclose = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplockforceclose = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_enablefcbopens;
- py_enablefcbopens = PyInt_FromLong(object->enablefcbopens);
+ py_enablefcbopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
return py_enablefcbopens;
}
static int py_srvsvc_NetSrvInfo503_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablefcbopens = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablefcbopens = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablefcbopens = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_enableraw;
- py_enableraw = PyInt_FromLong(object->enableraw);
+ py_enableraw = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
return py_enableraw;
}
static int py_srvsvc_NetSrvInfo503_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableraw = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableraw = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableraw = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_enablesharednetdrives;
- py_enablesharednetdrives = PyInt_FromLong(object->enablesharednetdrives);
+ py_enablesharednetdrives = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
return py_enablesharednetdrives;
}
static int py_srvsvc_NetSrvInfo503_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablesharednetdrives = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesharednetdrives = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesharednetdrives = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_minfreeconnections;
- py_minfreeconnections = PyInt_FromLong(object->minfreeconnections);
+ py_minfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
return py_minfreeconnections;
}
static int py_srvsvc_NetSrvInfo503_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minfreeconnections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeconnections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeconnections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
PyObject *py_maxfreeconnections;
- py_maxfreeconnections = PyInt_FromLong(object->maxfreeconnections);
+ py_maxfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
return py_maxfreeconnections;
}
static int py_srvsvc_NetSrvInfo503_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxfreeconnections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxfreeconnections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxfreeconnections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_sessopen;
- py_sessopen = PyInt_FromLong(object->sessopen);
+ py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
return py_sessopen;
}
static int py_srvsvc_NetSrvInfo599_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessopen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_sesssvc;
- py_sesssvc = PyInt_FromLong(object->sesssvc);
+ py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
return py_sesssvc;
}
static int py_srvsvc_NetSrvInfo599_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sesssvc = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesssvc = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_opensearch;
- py_opensearch = PyInt_FromLong(object->opensearch);
+ py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
return py_opensearch;
}
static int py_srvsvc_NetSrvInfo599_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->opensearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_sizereqbufs;
- py_sizereqbufs = PyInt_FromLong(object->sizereqbufs);
+ py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
return py_sizereqbufs;
}
static int py_srvsvc_NetSrvInfo599_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sizereqbufs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sizereqbufs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_initworkitems;
- py_initworkitems = PyInt_FromLong(object->initworkitems);
+ py_initworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
return py_initworkitems;
}
static int py_srvsvc_NetSrvInfo599_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxworkitems;
- py_maxworkitems = PyInt_FromLong(object->maxworkitems);
+ py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
return py_maxworkitems;
}
static int py_srvsvc_NetSrvInfo599_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_rawworkitems;
- py_rawworkitems = PyInt_FromLong(object->rawworkitems);
+ py_rawworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
return py_rawworkitems;
}
static int py_srvsvc_NetSrvInfo599_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->rawworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->rawworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->rawworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_irpstacksize;
- py_irpstacksize = PyInt_FromLong(object->irpstacksize);
+ py_irpstacksize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
return py_irpstacksize;
}
static int py_srvsvc_NetSrvInfo599_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->irpstacksize = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->irpstacksize = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->irpstacksize = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxrawbuflen;
- py_maxrawbuflen = PyInt_FromLong(object->maxrawbuflen);
+ py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
return py_maxrawbuflen;
}
static int py_srvsvc_NetSrvInfo599_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxrawbuflen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_sessusers;
- py_sessusers = PyInt_FromLong(object->sessusers);
+ py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
return py_sessusers;
}
static int py_srvsvc_NetSrvInfo599_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessusers = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_sessconns;
- py_sessconns = PyInt_FromLong(object->sessconns);
+ py_sessconns = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
return py_sessconns;
}
static int py_srvsvc_NetSrvInfo599_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessconns = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessconns = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessconns = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxpagedmemoryusage;
- py_maxpagedmemoryusage = PyInt_FromLong(object->maxpagedmemoryusage);
+ py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
return py_maxpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo599_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxnonpagedmemoryusage;
- py_maxnonpagedmemoryusage = PyInt_FromLong(object->maxnonpagedmemoryusage);
+ py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
return py_maxnonpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo599_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxnonpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_enablesoftcompat;
- py_enablesoftcompat = PyInt_FromLong(object->enablesoftcompat);
+ py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
return py_enablesoftcompat;
}
static int py_srvsvc_NetSrvInfo599_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablesoftcompat = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_enableforcedlogoff;
- py_enableforcedlogoff = PyInt_FromLong(object->enableforcedlogoff);
+ py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
return py_enableforcedlogoff;
}
static int py_srvsvc_NetSrvInfo599_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableforcedlogoff = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_timesource;
- py_timesource = PyInt_FromLong(object->timesource);
+ py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
return py_timesource;
}
static int py_srvsvc_NetSrvInfo599_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->timesource = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_acceptdownlevelapis;
- py_acceptdownlevelapis = PyInt_FromLong(object->acceptdownlevelapis);
+ py_acceptdownlevelapis = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
return py_acceptdownlevelapis;
}
static int py_srvsvc_NetSrvInfo599_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->acceptdownlevelapis = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->acceptdownlevelapis = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->acceptdownlevelapis = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_lmannounce;
- py_lmannounce = PyInt_FromLong(object->lmannounce);
+ py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
return py_lmannounce;
}
static int py_srvsvc_NetSrvInfo599_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->lmannounce = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxcopyreadlen;
- py_maxcopyreadlen = PyInt_FromLong(object->maxcopyreadlen);
+ py_maxcopyreadlen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
return py_maxcopyreadlen;
}
static int py_srvsvc_NetSrvInfo599_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxcopyreadlen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopyreadlen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopyreadlen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxcopywritelen;
- py_maxcopywritelen = PyInt_FromLong(object->maxcopywritelen);
+ py_maxcopywritelen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
return py_maxcopywritelen;
}
static int py_srvsvc_NetSrvInfo599_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxcopywritelen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopywritelen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopywritelen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_minkeepsearch;
- py_minkeepsearch = PyInt_FromLong(object->minkeepsearch);
+ py_minkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
return py_minkeepsearch;
}
static int py_srvsvc_NetSrvInfo599_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minkeepsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_minkeepcomplsearch;
- py_minkeepcomplsearch = PyInt_FromLong(object->minkeepcomplsearch);
+ py_minkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
return py_minkeepcomplsearch;
}
static int py_srvsvc_NetSrvInfo599_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minkeepcomplsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepcomplsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepcomplsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxkeepcomplsearch;
- py_maxkeepcomplsearch = PyInt_FromLong(object->maxkeepcomplsearch);
+ py_maxkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
return py_maxkeepcomplsearch;
}
static int py_srvsvc_NetSrvInfo599_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxkeepcomplsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepcomplsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepcomplsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_threadcountadd;
- py_threadcountadd = PyInt_FromLong(object->threadcountadd);
+ py_threadcountadd = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadcountadd);
return py_threadcountadd;
}
static int py_srvsvc_NetSrvInfo599_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->threadcountadd = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadcountadd = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadcountadd = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_numlockthreads;
- py_numlockthreads = PyInt_FromLong(object->numlockthreads);
+ py_numlockthreads = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numlockthreads);
return py_numlockthreads;
}
static int py_srvsvc_NetSrvInfo599_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->numlockthreads = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numlockthreads = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->numlockthreads = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_scavtimeout;
- py_scavtimeout = PyInt_FromLong(object->scavtimeout);
+ py_scavtimeout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
return py_scavtimeout;
}
static int py_srvsvc_NetSrvInfo599_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->scavtimeout = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavtimeout = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavtimeout = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_minrcvqueue;
- py_minrcvqueue = PyInt_FromLong(object->minrcvqueue);
+ py_minrcvqueue = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
return py_minrcvqueue;
}
static int py_srvsvc_NetSrvInfo599_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minrcvqueue = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minrcvqueue = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minrcvqueue = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_minfreeworkitems;
- py_minfreeworkitems = PyInt_FromLong(object->minfreeworkitems);
+ py_minfreeworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
return py_minfreeworkitems;
}
static int py_srvsvc_NetSrvInfo599_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minfreeworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_xactmemsize;
- py_xactmemsize = PyInt_FromLong(object->xactmemsize);
+ py_xactmemsize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->xactmemsize);
return py_xactmemsize;
}
static int py_srvsvc_NetSrvInfo599_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->xactmemsize = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->xactmemsize = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->xactmemsize = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_threadpriority;
- py_threadpriority = PyInt_FromLong(object->threadpriority);
+ py_threadpriority = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadpriority);
return py_threadpriority;
}
static int py_srvsvc_NetSrvInfo599_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->threadpriority = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadpriority = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->threadpriority = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxmpxct;
- py_maxmpxct = PyInt_FromLong(object->maxmpxct);
+ py_maxmpxct = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
return py_maxmpxct;
}
static int py_srvsvc_NetSrvInfo599_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxmpxct = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxmpxct = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxmpxct = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_oplockbreakwait;
- py_oplockbreakwait = PyInt_FromLong(object->oplockbreakwait);
+ py_oplockbreakwait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
return py_oplockbreakwait;
}
static int py_srvsvc_NetSrvInfo599_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->oplockbreakwait = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakwait = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakwait = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_oplockbreakresponsewait;
- py_oplockbreakresponsewait = PyInt_FromLong(object->oplockbreakresponsewait);
+ py_oplockbreakresponsewait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
return py_oplockbreakresponsewait;
}
static int py_srvsvc_NetSrvInfo599_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->oplockbreakresponsewait = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakresponsewait = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakresponsewait = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_enableoplocks;
- py_enableoplocks = PyInt_FromLong(object->enableoplocks);
+ py_enableoplocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
return py_enableoplocks;
}
static int py_srvsvc_NetSrvInfo599_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableoplocks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplocks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplocks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_enableoplockforceclose;
- py_enableoplockforceclose = PyInt_FromLong(object->enableoplockforceclose);
+ py_enableoplockforceclose = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
return py_enableoplockforceclose;
}
static int py_srvsvc_NetSrvInfo599_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableoplockforceclose = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplockforceclose = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplockforceclose = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_enablefcbopens;
- py_enablefcbopens = PyInt_FromLong(object->enablefcbopens);
+ py_enablefcbopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
return py_enablefcbopens;
}
static int py_srvsvc_NetSrvInfo599_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablefcbopens = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablefcbopens = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablefcbopens = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_enableraw;
- py_enableraw = PyInt_FromLong(object->enableraw);
+ py_enableraw = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
return py_enableraw;
}
static int py_srvsvc_NetSrvInfo599_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableraw = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableraw = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableraw = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_enablesharednetdrives;
- py_enablesharednetdrives = PyInt_FromLong(object->enablesharednetdrives);
+ py_enablesharednetdrives = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
return py_enablesharednetdrives;
}
static int py_srvsvc_NetSrvInfo599_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablesharednetdrives = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesharednetdrives = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesharednetdrives = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_minfreeconnections;
- py_minfreeconnections = PyInt_FromLong(object->minfreeconnections);
+ py_minfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
return py_minfreeconnections;
}
static int py_srvsvc_NetSrvInfo599_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minfreeconnections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeconnections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeconnections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxfreeconnections;
- py_maxfreeconnections = PyInt_FromLong(object->maxfreeconnections);
+ py_maxfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
return py_maxfreeconnections;
}
static int py_srvsvc_NetSrvInfo599_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxfreeconnections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxfreeconnections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxfreeconnections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_initsesstable;
- py_initsesstable = PyInt_FromLong(object->initsesstable);
+ py_initsesstable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsesstable);
return py_initsesstable;
}
static int py_srvsvc_NetSrvInfo599_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initsesstable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsesstable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsesstable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_initconntable;
- py_initconntable = PyInt_FromLong(object->initconntable);
+ py_initconntable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initconntable);
return py_initconntable;
}
static int py_srvsvc_NetSrvInfo599_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initconntable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initconntable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initconntable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_initfiletable;
- py_initfiletable = PyInt_FromLong(object->initfiletable);
+ py_initfiletable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initfiletable);
return py_initfiletable;
}
static int py_srvsvc_NetSrvInfo599_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initfiletable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initfiletable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initfiletable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_initsearchtable;
- py_initsearchtable = PyInt_FromLong(object->initsearchtable);
+ py_initsearchtable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsearchtable);
return py_initsearchtable;
}
static int py_srvsvc_NetSrvInfo599_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initsearchtable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsearchtable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsearchtable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_alertsched;
- py_alertsched = PyInt_FromLong(object->alertsched);
+ py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
return py_alertsched;
}
static int py_srvsvc_NetSrvInfo599_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->alertsched = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_errortreshold;
- py_errortreshold = PyInt_FromLong(object->errortreshold);
+ py_errortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->errortreshold);
return py_errortreshold;
}
static int py_srvsvc_NetSrvInfo599_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->errortreshold = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->errortreshold = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->errortreshold = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_networkerrortreshold;
- py_networkerrortreshold = PyInt_FromLong(object->networkerrortreshold);
+ py_networkerrortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->networkerrortreshold);
return py_networkerrortreshold;
}
static int py_srvsvc_NetSrvInfo599_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->networkerrortreshold = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->networkerrortreshold = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->networkerrortreshold = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_diskspacetreshold;
- py_diskspacetreshold = PyInt_FromLong(object->diskspacetreshold);
+ py_diskspacetreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskspacetreshold);
return py_diskspacetreshold;
}
static int py_srvsvc_NetSrvInfo599_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->diskspacetreshold = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskspacetreshold = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskspacetreshold = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_reserved;
- py_reserved = PyInt_FromLong(object->reserved);
+ py_reserved = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
return py_reserved;
}
static int py_srvsvc_NetSrvInfo599_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->reserved = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->reserved = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->reserved = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxlinkdelay;
- py_maxlinkdelay = PyInt_FromLong(object->maxlinkdelay);
+ py_maxlinkdelay = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxlinkdelay);
return py_maxlinkdelay;
}
static int py_srvsvc_NetSrvInfo599_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxlinkdelay = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxlinkdelay = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxlinkdelay = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_minlinkthroughput;
- py_minlinkthroughput = PyInt_FromLong(object->minlinkthroughput);
+ py_minlinkthroughput = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minlinkthroughput);
return py_minlinkthroughput;
}
static int py_srvsvc_NetSrvInfo599_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minlinkthroughput = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minlinkthroughput = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minlinkthroughput = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_linkinfovalidtime;
- py_linkinfovalidtime = PyInt_FromLong(object->linkinfovalidtime);
+ py_linkinfovalidtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->linkinfovalidtime);
return py_linkinfovalidtime;
}
static int py_srvsvc_NetSrvInfo599_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->linkinfovalidtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->linkinfovalidtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->linkinfovalidtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_scavqosinfoupdatetime;
- py_scavqosinfoupdatetime = PyInt_FromLong(object->scavqosinfoupdatetime);
+ py_scavqosinfoupdatetime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavqosinfoupdatetime);
return py_scavqosinfoupdatetime;
}
static int py_srvsvc_NetSrvInfo599_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->scavqosinfoupdatetime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavqosinfoupdatetime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavqosinfoupdatetime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
PyObject *py_maxworkitemidletime;
- py_maxworkitemidletime = PyInt_FromLong(object->maxworkitemidletime);
+ py_maxworkitemidletime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitemidletime);
return py_maxworkitemidletime;
}
static int py_srvsvc_NetSrvInfo599_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxworkitemidletime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitemidletime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitemidletime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1010 *object = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(obj);
PyObject *py_disc;
- py_disc = PyInt_FromLong(object->disc);
+ py_disc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->disc);
return py_disc;
}
static int py_srvsvc_NetSrvInfo1010_set_disc(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1010 *object = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->disc = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->disc = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->disc = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1016 *object = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(obj);
PyObject *py_hidden;
- py_hidden = PyInt_FromLong(object->hidden);
+ py_hidden = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hidden);
return py_hidden;
}
static int py_srvsvc_NetSrvInfo1016_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1016 *object = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->hidden = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hidden = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hidden = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1017 *object = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(obj);
PyObject *py_announce;
- py_announce = PyInt_FromLong(object->announce);
+ py_announce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->announce);
return py_announce;
}
static int py_srvsvc_NetSrvInfo1017_set_announce(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1017 *object = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->announce = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->announce = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->announce = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1018 *object = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(obj);
PyObject *py_anndelta;
- py_anndelta = PyInt_FromLong(object->anndelta);
+ py_anndelta = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->anndelta);
return py_anndelta;
}
static int py_srvsvc_NetSrvInfo1018_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1018 *object = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->anndelta = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->anndelta = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->anndelta = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1107 *object = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(obj);
PyObject *py_users;
- py_users = PyInt_FromLong(object->users);
+ py_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->users);
return py_users;
}
static int py_srvsvc_NetSrvInfo1107_set_users(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1107 *object = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->users = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->users = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->users = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1501 *object = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(obj);
PyObject *py_sessopens;
- py_sessopens = PyInt_FromLong(object->sessopens);
+ py_sessopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopens);
return py_sessopens;
}
static int py_srvsvc_NetSrvInfo1501_set_sessopens(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1501 *object = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessopens = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopens));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopens = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessopens = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1502 *object = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(obj);
PyObject *py_sessvcs;
- py_sessvcs = PyInt_FromLong(object->sessvcs);
+ py_sessvcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessvcs);
return py_sessvcs;
}
static int py_srvsvc_NetSrvInfo1502_set_sessvcs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1502 *object = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessvcs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessvcs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessvcs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessvcs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1503 *object = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(obj);
PyObject *py_opensearch;
- py_opensearch = PyInt_FromLong(object->opensearch);
+ py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
return py_opensearch;
}
static int py_srvsvc_NetSrvInfo1503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1503 *object = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->opensearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->opensearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1506 *object = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(obj);
PyObject *py_maxworkitems;
- py_maxworkitems = PyInt_FromLong(object->maxworkitems);
+ py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
return py_maxworkitems;
}
static int py_srvsvc_NetSrvInfo1506_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1506 *object = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1509 *object = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(obj);
PyObject *py_maxrawbuflen;
- py_maxrawbuflen = PyInt_FromLong(object->maxrawbuflen);
+ py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
return py_maxrawbuflen;
}
static int py_srvsvc_NetSrvInfo1509_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1509 *object = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxrawbuflen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxrawbuflen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1510 *object = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(obj);
PyObject *py_sessusers;
- py_sessusers = PyInt_FromLong(object->sessusers);
+ py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
return py_sessusers;
}
static int py_srvsvc_NetSrvInfo1510_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1510 *object = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sessusers = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sessusers = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1511 *object = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(obj);
PyObject *py_sesscons;
- py_sesscons = PyInt_FromLong(object->sesscons);
+ py_sesscons = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesscons);
return py_sesscons;
}
static int py_srvsvc_NetSrvInfo1511_set_sesscons(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1511 *object = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sesscons = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesscons));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesscons = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sesscons = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1512 *object = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(obj);
PyObject *py_maxnonpagedmemoryusage;
- py_maxnonpagedmemoryusage = PyInt_FromLong(object->maxnonpagedmemoryusage);
+ py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
return py_maxnonpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo1512_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1512 *object = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxnonpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxnonpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1513 *object = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(obj);
PyObject *py_maxpagedmemoryusage;
- py_maxpagedmemoryusage = PyInt_FromLong(object->maxpagedmemoryusage);
+ py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
return py_maxpagedmemoryusage;
}
static int py_srvsvc_NetSrvInfo1513_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1513 *object = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxpagedmemoryusage = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxpagedmemoryusage = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1514 *object = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(obj);
PyObject *py_enablesoftcompat;
- py_enablesoftcompat = PyInt_FromLong(object->enablesoftcompat);
+ py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
return py_enablesoftcompat;
}
static int py_srvsvc_NetSrvInfo1514_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1514 *object = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablesoftcompat = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesoftcompat = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1515 *object = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(obj);
PyObject *py_enableforcedlogoff;
- py_enableforcedlogoff = PyInt_FromLong(object->enableforcedlogoff);
+ py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
return py_enableforcedlogoff;
}
static int py_srvsvc_NetSrvInfo1515_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1515 *object = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableforcedlogoff = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableforcedlogoff = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1516 *object = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(obj);
PyObject *py_timesource;
- py_timesource = PyInt_FromLong(object->timesource);
+ py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
return py_timesource;
}
static int py_srvsvc_NetSrvInfo1516_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1516 *object = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->timesource = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->timesource = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1518 *object = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(obj);
PyObject *py_lmannounce;
- py_lmannounce = PyInt_FromLong(object->lmannounce);
+ py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
return py_lmannounce;
}
static int py_srvsvc_NetSrvInfo1518_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1518 *object = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->lmannounce = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->lmannounce = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1520 *object = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(obj);
PyObject *py_maxcopyreadlen;
- py_maxcopyreadlen = PyInt_FromLong(object->maxcopyreadlen);
+ py_maxcopyreadlen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
return py_maxcopyreadlen;
}
static int py_srvsvc_NetSrvInfo1520_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1520 *object = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxcopyreadlen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopyreadlen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopyreadlen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1521 *object = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(obj);
PyObject *py_maxcopywritelen;
- py_maxcopywritelen = PyInt_FromLong(object->maxcopywritelen);
+ py_maxcopywritelen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
return py_maxcopywritelen;
}
static int py_srvsvc_NetSrvInfo1521_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1521 *object = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxcopywritelen = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopywritelen = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxcopywritelen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1522 *object = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(obj);
PyObject *py_minkeepsearch;
- py_minkeepsearch = PyInt_FromLong(object->minkeepsearch);
+ py_minkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
return py_minkeepsearch;
}
static int py_srvsvc_NetSrvInfo1522_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1522 *object = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minkeepsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1523 *object = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(obj);
PyObject *py_maxkeepsearch;
- py_maxkeepsearch = PyInt_FromLong(object->maxkeepsearch);
+ py_maxkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepsearch);
return py_maxkeepsearch;
}
static int py_srvsvc_NetSrvInfo1523_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1523 *object = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxkeepsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1524 *object = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(obj);
PyObject *py_minkeepcomplsearch;
- py_minkeepcomplsearch = PyInt_FromLong(object->minkeepcomplsearch);
+ py_minkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
return py_minkeepcomplsearch;
}
static int py_srvsvc_NetSrvInfo1524_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1524 *object = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minkeepcomplsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepcomplsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minkeepcomplsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1525 *object = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(obj);
PyObject *py_maxkeepcomplsearch;
- py_maxkeepcomplsearch = PyInt_FromLong(object->maxkeepcomplsearch);
+ py_maxkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
return py_maxkeepcomplsearch;
}
static int py_srvsvc_NetSrvInfo1525_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1525 *object = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxkeepcomplsearch = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepcomplsearch = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxkeepcomplsearch = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1528 *object = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(obj);
PyObject *py_scavtimeout;
- py_scavtimeout = PyInt_FromLong(object->scavtimeout);
+ py_scavtimeout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
return py_scavtimeout;
}
static int py_srvsvc_NetSrvInfo1528_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1528 *object = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->scavtimeout = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavtimeout = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavtimeout = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1529 *object = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(obj);
PyObject *py_minrcvqueue;
- py_minrcvqueue = PyInt_FromLong(object->minrcvqueue);
+ py_minrcvqueue = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
return py_minrcvqueue;
}
static int py_srvsvc_NetSrvInfo1529_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1529 *object = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minrcvqueue = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minrcvqueue = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minrcvqueue = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1530 *object = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(obj);
PyObject *py_minfreeworkitems;
- py_minfreeworkitems = PyInt_FromLong(object->minfreeworkitems);
+ py_minfreeworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
return py_minfreeworkitems;
}
static int py_srvsvc_NetSrvInfo1530_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1530 *object = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minfreeworkitems = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeworkitems = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeworkitems = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1533 *object = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(obj);
PyObject *py_maxmpxct;
- py_maxmpxct = PyInt_FromLong(object->maxmpxct);
+ py_maxmpxct = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
return py_maxmpxct;
}
static int py_srvsvc_NetSrvInfo1533_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1533 *object = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxmpxct = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxmpxct = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxmpxct = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1534 *object = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(obj);
PyObject *py_oplockbreakwait;
- py_oplockbreakwait = PyInt_FromLong(object->oplockbreakwait);
+ py_oplockbreakwait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
return py_oplockbreakwait;
}
static int py_srvsvc_NetSrvInfo1534_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1534 *object = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->oplockbreakwait = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakwait = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakwait = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1535 *object = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(obj);
PyObject *py_oplockbreakresponsewait;
- py_oplockbreakresponsewait = PyInt_FromLong(object->oplockbreakresponsewait);
+ py_oplockbreakresponsewait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
return py_oplockbreakresponsewait;
}
static int py_srvsvc_NetSrvInfo1535_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1535 *object = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->oplockbreakresponsewait = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakresponsewait = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->oplockbreakresponsewait = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1536 *object = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(obj);
PyObject *py_enableoplocks;
- py_enableoplocks = PyInt_FromLong(object->enableoplocks);
+ py_enableoplocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
return py_enableoplocks;
}
static int py_srvsvc_NetSrvInfo1536_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1536 *object = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableoplocks = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplocks = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplocks = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1537 *object = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(obj);
PyObject *py_enableoplockforceclose;
- py_enableoplockforceclose = PyInt_FromLong(object->enableoplockforceclose);
+ py_enableoplockforceclose = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
return py_enableoplockforceclose;
}
static int py_srvsvc_NetSrvInfo1537_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1537 *object = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableoplockforceclose = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplockforceclose = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableoplockforceclose = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1538 *object = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(obj);
PyObject *py_enablefcbopens;
- py_enablefcbopens = PyInt_FromLong(object->enablefcbopens);
+ py_enablefcbopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
return py_enablefcbopens;
}
static int py_srvsvc_NetSrvInfo1538_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1538 *object = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablefcbopens = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablefcbopens = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablefcbopens = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1539 *object = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(obj);
PyObject *py_enableraw;
- py_enableraw = PyInt_FromLong(object->enableraw);
+ py_enableraw = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
return py_enableraw;
}
static int py_srvsvc_NetSrvInfo1539_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1539 *object = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enableraw = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableraw = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enableraw = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1540 *object = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(obj);
PyObject *py_enablesharednetdrives;
- py_enablesharednetdrives = PyInt_FromLong(object->enablesharednetdrives);
+ py_enablesharednetdrives = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
return py_enablesharednetdrives;
}
static int py_srvsvc_NetSrvInfo1540_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1540 *object = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->enablesharednetdrives = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesharednetdrives = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->enablesharednetdrives = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1541 *object = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(obj);
PyObject *py_minfreeconnections;
- py_minfreeconnections = PyInt_FromLong(object->minfreeconnections);
+ py_minfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
return py_minfreeconnections;
}
static int py_srvsvc_NetSrvInfo1541_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1541 *object = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minfreeconnections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeconnections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minfreeconnections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1542 *object = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(obj);
PyObject *py_maxfreeconnections;
- py_maxfreeconnections = PyInt_FromLong(object->maxfreeconnections);
+ py_maxfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
return py_maxfreeconnections;
}
static int py_srvsvc_NetSrvInfo1542_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1542 *object = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxfreeconnections = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxfreeconnections = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxfreeconnections = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1543 *object = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(obj);
PyObject *py_initsesstable;
- py_initsesstable = PyInt_FromLong(object->initsesstable);
+ py_initsesstable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsesstable);
return py_initsesstable;
}
static int py_srvsvc_NetSrvInfo1543_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1543 *object = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initsesstable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsesstable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsesstable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1544 *object = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(obj);
PyObject *py_initconntable;
- py_initconntable = PyInt_FromLong(object->initconntable);
+ py_initconntable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initconntable);
return py_initconntable;
}
static int py_srvsvc_NetSrvInfo1544_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1544 *object = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initconntable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initconntable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initconntable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1545 *object = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(obj);
PyObject *py_initfiletable;
- py_initfiletable = PyInt_FromLong(object->initfiletable);
+ py_initfiletable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initfiletable);
return py_initfiletable;
}
static int py_srvsvc_NetSrvInfo1545_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1545 *object = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initfiletable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initfiletable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initfiletable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1546 *object = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(obj);
PyObject *py_initsearchtable;
- py_initsearchtable = PyInt_FromLong(object->initsearchtable);
+ py_initsearchtable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsearchtable);
return py_initsearchtable;
}
static int py_srvsvc_NetSrvInfo1546_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1546 *object = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->initsearchtable = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsearchtable = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->initsearchtable = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1547 *object = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(obj);
PyObject *py_alertsched;
- py_alertsched = PyInt_FromLong(object->alertsched);
+ py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
return py_alertsched;
}
static int py_srvsvc_NetSrvInfo1547_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1547 *object = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->alertsched = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->alertsched = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1548 *object = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(obj);
PyObject *py_errortreshold;
- py_errortreshold = PyInt_FromLong(object->errortreshold);
+ py_errortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->errortreshold);
return py_errortreshold;
}
static int py_srvsvc_NetSrvInfo1548_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1548 *object = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->errortreshold = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->errortreshold = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->errortreshold = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1549 *object = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(obj);
PyObject *py_networkerrortreshold;
- py_networkerrortreshold = PyInt_FromLong(object->networkerrortreshold);
+ py_networkerrortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->networkerrortreshold);
return py_networkerrortreshold;
}
static int py_srvsvc_NetSrvInfo1549_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1549 *object = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->networkerrortreshold = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->networkerrortreshold = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->networkerrortreshold = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1550 *object = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(obj);
PyObject *py_diskspacetreshold;
- py_diskspacetreshold = PyInt_FromLong(object->diskspacetreshold);
+ py_diskspacetreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskspacetreshold);
return py_diskspacetreshold;
}
static int py_srvsvc_NetSrvInfo1550_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1550 *object = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->diskspacetreshold = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskspacetreshold = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->diskspacetreshold = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1552 *object = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(obj);
PyObject *py_maxlinkdelay;
- py_maxlinkdelay = PyInt_FromLong(object->maxlinkdelay);
+ py_maxlinkdelay = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxlinkdelay);
return py_maxlinkdelay;
}
static int py_srvsvc_NetSrvInfo1552_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1552 *object = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxlinkdelay = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxlinkdelay = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxlinkdelay = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1553 *object = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(obj);
PyObject *py_minlinkthroughput;
- py_minlinkthroughput = PyInt_FromLong(object->minlinkthroughput);
+ py_minlinkthroughput = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minlinkthroughput);
return py_minlinkthroughput;
}
static int py_srvsvc_NetSrvInfo1553_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1553 *object = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->minlinkthroughput = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minlinkthroughput = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->minlinkthroughput = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1554 *object = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(obj);
PyObject *py_linkinfovalidtime;
- py_linkinfovalidtime = PyInt_FromLong(object->linkinfovalidtime);
+ py_linkinfovalidtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->linkinfovalidtime);
return py_linkinfovalidtime;
}
static int py_srvsvc_NetSrvInfo1554_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1554 *object = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->linkinfovalidtime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->linkinfovalidtime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->linkinfovalidtime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1555 *object = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(obj);
PyObject *py_scavqosinfoupdatetime;
- py_scavqosinfoupdatetime = PyInt_FromLong(object->scavqosinfoupdatetime);
+ py_scavqosinfoupdatetime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavqosinfoupdatetime);
return py_scavqosinfoupdatetime;
}
static int py_srvsvc_NetSrvInfo1555_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1555 *object = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->scavqosinfoupdatetime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavqosinfoupdatetime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->scavqosinfoupdatetime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetSrvInfo1556 *object = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(obj);
PyObject *py_maxworkitemidletime;
- py_maxworkitemidletime = PyInt_FromLong(object->maxworkitemidletime);
+ py_maxworkitemidletime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitemidletime);
return py_maxworkitemidletime;
}
static int py_srvsvc_NetSrvInfo1556_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetSrvInfo1556 *object = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->maxworkitemidletime = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitemidletime = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->maxworkitemidletime = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
.tp_new = py_srvsvc_NetSrvInfo1556_new,
};
-static PyObject *py_import_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSrvInfo *in)
+PyObject *py_import_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSrvInfo *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetSrvInfo *py_export_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetSrvInfo *py_export_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetSrvInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
switch (level) {
{
struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
PyObject *py___disk_offset;
- py___disk_offset = PyInt_FromLong(object->__disk_offset);
+ py___disk_offset = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->__disk_offset);
return py___disk_offset;
}
static int py_srvsvc_NetDiskInfo0_set___disk_offset(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->__disk_offset = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_offset));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->__disk_offset = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->__disk_offset = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
PyObject *py___disk_length;
- py___disk_length = PyInt_FromLong(object->__disk_length);
+ py___disk_length = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->__disk_length);
return py___disk_length;
}
static int py_srvsvc_NetDiskInfo0_set___disk_length(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->__disk_length = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_length));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->__disk_length = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->__disk_length = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetDiskInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int disks_cntr_1;
- for (disks_cntr_1 = 0; disks_cntr_1 < object->count; disks_cntr_1++) {
+ for (disks_cntr_1 = 0; disks_cntr_1 < (object->count); disks_cntr_1++) {
PyObject *py_disks_1;
py_disks_1 = pytalloc_reference_ex(&srvsvc_NetDiskInfo0_Type, object->disks, &object->disks[disks_cntr_1]);
PyList_SetItem(py_disks, disks_cntr_1, py_disks_1);
static int py_srvsvc_NetDiskInfo_set_disks(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->disks);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->disks));
if (value == Py_None) {
object->disks = NULL;
} else {
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_start;
- py_start = PyInt_FromLong(object->start);
+ py_start = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->start);
return py_start;
}
static int py_srvsvc_Statistics_set_start(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->start = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->start));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->start = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->start = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_fopens;
- py_fopens = PyInt_FromLong(object->fopens);
+ py_fopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->fopens);
return py_fopens;
}
static int py_srvsvc_Statistics_set_fopens(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->fopens = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fopens));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->fopens = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->fopens = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_devopens;
- py_devopens = PyInt_FromLong(object->devopens);
+ py_devopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->devopens);
return py_devopens;
}
static int py_srvsvc_Statistics_set_devopens(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->devopens = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->devopens));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->devopens = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->devopens = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_jobsqueued;
- py_jobsqueued = PyInt_FromLong(object->jobsqueued);
+ py_jobsqueued = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->jobsqueued);
return py_jobsqueued;
}
static int py_srvsvc_Statistics_set_jobsqueued(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->jobsqueued = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->jobsqueued));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->jobsqueued = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->jobsqueued = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_sopens;
- py_sopens = PyInt_FromLong(object->sopens);
+ py_sopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sopens);
return py_sopens;
}
static int py_srvsvc_Statistics_set_sopens(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->sopens = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sopens));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sopens = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->sopens = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_stimeouts;
- py_stimeouts = PyInt_FromLong(object->stimeouts);
+ py_stimeouts = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->stimeouts);
return py_stimeouts;
}
static int py_srvsvc_Statistics_set_stimeouts(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->stimeouts = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->stimeouts));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->stimeouts = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->stimeouts = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_serrorout;
- py_serrorout = PyInt_FromLong(object->serrorout);
+ py_serrorout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->serrorout);
return py_serrorout;
}
static int py_srvsvc_Statistics_set_serrorout(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->serrorout = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serrorout));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->serrorout = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->serrorout = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_pwerrors;
- py_pwerrors = PyInt_FromLong(object->pwerrors);
+ py_pwerrors = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->pwerrors);
return py_pwerrors;
}
static int py_srvsvc_Statistics_set_pwerrors(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->pwerrors = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pwerrors));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->pwerrors = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->pwerrors = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_permerrors;
- py_permerrors = PyInt_FromLong(object->permerrors);
+ py_permerrors = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permerrors);
return py_permerrors;
}
static int py_srvsvc_Statistics_set_permerrors(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->permerrors = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permerrors));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permerrors = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->permerrors = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_syserrors;
- py_syserrors = PyInt_FromLong(object->syserrors);
+ py_syserrors = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->syserrors);
return py_syserrors;
}
static int py_srvsvc_Statistics_set_syserrors(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->syserrors = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->syserrors));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->syserrors = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->syserrors = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_bytessent_low;
- py_bytessent_low = PyInt_FromLong(object->bytessent_low);
+ py_bytessent_low = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytessent_low);
return py_bytessent_low;
}
static int py_srvsvc_Statistics_set_bytessent_low(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->bytessent_low = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_low));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytessent_low = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytessent_low = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_bytessent_high;
- py_bytessent_high = PyInt_FromLong(object->bytessent_high);
+ py_bytessent_high = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytessent_high);
return py_bytessent_high;
}
static int py_srvsvc_Statistics_set_bytessent_high(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->bytessent_high = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_high));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytessent_high = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytessent_high = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_bytesrcvd_low;
- py_bytesrcvd_low = PyInt_FromLong(object->bytesrcvd_low);
+ py_bytesrcvd_low = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytesrcvd_low);
return py_bytesrcvd_low;
}
static int py_srvsvc_Statistics_set_bytesrcvd_low(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->bytesrcvd_low = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_low));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytesrcvd_low = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytesrcvd_low = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_bytesrcvd_high;
- py_bytesrcvd_high = PyInt_FromLong(object->bytesrcvd_high);
+ py_bytesrcvd_high = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytesrcvd_high);
return py_bytesrcvd_high;
}
static int py_srvsvc_Statistics_set_bytesrcvd_high(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->bytesrcvd_high = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_high));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytesrcvd_high = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bytesrcvd_high = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_avresponse;
- py_avresponse = PyInt_FromLong(object->avresponse);
+ py_avresponse = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->avresponse);
return py_avresponse;
}
static int py_srvsvc_Statistics_set_avresponse(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->avresponse = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->avresponse));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->avresponse = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->avresponse = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_reqbufneed;
- py_reqbufneed = PyInt_FromLong(object->reqbufneed);
+ py_reqbufneed = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->reqbufneed);
return py_reqbufneed;
}
static int py_srvsvc_Statistics_set_reqbufneed(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->reqbufneed = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reqbufneed));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->reqbufneed = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->reqbufneed = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
PyObject *py_bigbufneed;
- py_bigbufneed = PyInt_FromLong(object->bigbufneed);
+ py_bigbufneed = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bigbufneed);
return py_bigbufneed;
}
static int py_srvsvc_Statistics_set_bigbufneed(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->bigbufneed = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bigbufneed));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bigbufneed = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->bigbufneed = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
PyObject *py_vcs;
- py_vcs = PyInt_FromLong(object->vcs);
+ py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
return py_vcs;
}
static int py_srvsvc_NetTransportInfo0_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->vcs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int addr_cntr_1;
- for (addr_cntr_1 = 0; addr_cntr_1 < object->addr_len; addr_cntr_1++) {
+ for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
PyObject *py_addr_1;
- py_addr_1 = PyInt_FromLong(object->addr[addr_cntr_1]);
+ py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
}
}
static int py_srvsvc_NetTransportInfo0_set_addr(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->addr);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
if (value == Py_None) {
object->addr = NULL;
} else {
if (!object->addr) { return -1;; }
talloc_set_name_const(object->addr, "ARRAY: object->addr");
for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
- PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, addr_cntr_1), return -1;);
- object->addr[addr_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
+ if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ long test_var;
+ test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
}
}
}
{
struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
PyObject *py_addr_len;
- py_addr_len = PyInt_FromLong(object->addr_len);
+ py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
return py_addr_len;
}
static int py_srvsvc_NetTransportInfo0_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->addr_len = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetTransportCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetTransportCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_vcs;
- py_vcs = PyInt_FromLong(object->vcs);
+ py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
return py_vcs;
}
static int py_srvsvc_NetTransportInfo1_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->vcs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int addr_cntr_1;
- for (addr_cntr_1 = 0; addr_cntr_1 < object->addr_len; addr_cntr_1++) {
+ for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
PyObject *py_addr_1;
- py_addr_1 = PyInt_FromLong(object->addr[addr_cntr_1]);
+ py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
}
}
static int py_srvsvc_NetTransportInfo1_set_addr(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->addr);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
if (value == Py_None) {
object->addr = NULL;
} else {
if (!object->addr) { return -1;; }
talloc_set_name_const(object->addr, "ARRAY: object->addr");
for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
- PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, addr_cntr_1), return -1;);
- object->addr[addr_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
+ if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ long test_var;
+ test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
}
}
}
{
struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
PyObject *py_addr_len;
- py_addr_len = PyInt_FromLong(object->addr_len);
+ py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
return py_addr_len;
}
static int py_srvsvc_NetTransportInfo1_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->addr_len = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetTransportCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo1_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetTransportCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_vcs;
- py_vcs = PyInt_FromLong(object->vcs);
+ py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
return py_vcs;
}
static int py_srvsvc_NetTransportInfo2_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->vcs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int addr_cntr_1;
- for (addr_cntr_1 = 0; addr_cntr_1 < object->addr_len; addr_cntr_1++) {
+ for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
PyObject *py_addr_1;
- py_addr_1 = PyInt_FromLong(object->addr[addr_cntr_1]);
+ py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
}
}
static int py_srvsvc_NetTransportInfo2_set_addr(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->addr);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
if (value == Py_None) {
object->addr = NULL;
} else {
if (!object->addr) { return -1;; }
talloc_set_name_const(object->addr, "ARRAY: object->addr");
for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
- PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, addr_cntr_1), return -1;);
- object->addr[addr_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
+ if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ long test_var;
+ test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
}
}
}
{
struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_addr_len;
- py_addr_len = PyInt_FromLong(object->addr_len);
+ py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
return py_addr_len;
}
static int py_srvsvc_NetTransportInfo2_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->addr_len = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
PyObject *py_unknown;
- py_unknown = PyInt_FromLong(object->unknown);
+ py_unknown = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->unknown);
return py_unknown;
}
static int py_srvsvc_NetTransportInfo2_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->unknown = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetTransportCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo2_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetTransportCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
PyObject *py_vcs;
- py_vcs = PyInt_FromLong(object->vcs);
+ py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
return py_vcs;
}
static int py_srvsvc_NetTransportInfo3_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->vcs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->vcs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int addr_cntr_1;
- for (addr_cntr_1 = 0; addr_cntr_1 < object->addr_len; addr_cntr_1++) {
+ for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
PyObject *py_addr_1;
- py_addr_1 = PyInt_FromLong(object->addr[addr_cntr_1]);
+ py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
}
}
static int py_srvsvc_NetTransportInfo3_set_addr(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->addr);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
if (value == Py_None) {
object->addr = NULL;
} else {
if (!object->addr) { return -1;; }
talloc_set_name_const(object->addr, "ARRAY: object->addr");
for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
- PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, addr_cntr_1), return -1;);
- object->addr[addr_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
+ if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
+ long test_var;
+ test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr[addr_cntr_1] = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
}
}
}
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
PyObject *py_addr_len;
- py_addr_len = PyInt_FromLong(object->addr_len);
+ py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
return py_addr_len;
}
static int py_srvsvc_NetTransportInfo3_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->addr_len = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->addr_len = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
PyObject *py_unknown1;
- py_unknown1 = PyInt_FromLong(object->unknown1);
+ py_unknown1 = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
return py_unknown1;
}
static int py_srvsvc_NetTransportInfo3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->unknown1 = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown1 = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown1 = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
PyObject *py_unknown2;
- py_unknown2 = PyInt_FromLong(object->unknown2);
+ py_unknown2 = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
return py_unknown2;
}
static int py_srvsvc_NetTransportInfo3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->unknown2 = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown2 = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown2 = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int unknown3_cntr_0;
- for (unknown3_cntr_0 = 0; unknown3_cntr_0 < 256; unknown3_cntr_0++) {
+ for (unknown3_cntr_0 = 0; unknown3_cntr_0 < (256); unknown3_cntr_0++) {
PyObject *py_unknown3_0;
- py_unknown3_0 = PyInt_FromLong(object->unknown3[unknown3_cntr_0]);
+ py_unknown3_0 = PyInt_FromLong((uint16_t)object->unknown3[unknown3_cntr_0]);
PyList_SetItem(py_unknown3, unknown3_cntr_0, py_unknown3_0);
}
}
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
{
int unknown3_cntr_0;
+ if (ARRAY_SIZE(object->unknown3) != PyList_GET_SIZE(value)) {
+ PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->unknown3), PyList_GET_SIZE(value));
+ return -1;
+ }
for (unknown3_cntr_0 = 0; unknown3_cntr_0 < PyList_GET_SIZE(value); unknown3_cntr_0++) {
- PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, unknown3_cntr_0), return -1;);
- object->unknown3[unknown3_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, unknown3_cntr_0));
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3[unknown3_cntr_0]));
+ if (PyLong_Check(PyList_GET_ITEM(value, unknown3_cntr_0))) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown3_cntr_0));
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown3[unknown3_cntr_0] = test_var;
+ } else if (PyInt_Check(PyList_GET_ITEM(value, unknown3_cntr_0))) {
+ long test_var;
+ test_var = PyInt_AsLong(PyList_GET_ITEM(value, unknown3_cntr_0));
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->unknown3[unknown3_cntr_0] = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
}
}
return 0;
{
struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(obj);
PyObject *py_count;
- py_count = PyInt_FromLong(object->count);
+ py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
return py_count;
}
static int py_srvsvc_NetTransportCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->count = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->count = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
}
{
int array_cntr_1;
- for (array_cntr_1 = 0; array_cntr_1 < object->count; array_cntr_1++) {
+ for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
PyObject *py_array_1;
py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo3_Type, object->array, &object->array[array_cntr_1]);
PyList_SetItem(py_array, array_cntr_1, py_array_1);
static int py_srvsvc_NetTransportCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(py_obj);
- talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->array);
+ talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
if (value == Py_None) {
object->array = NULL;
} else {
.tp_new = py_srvsvc_NetTransportCtr3_new,
};
-static PyObject *py_import_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportCtr *in)
+PyObject *py_import_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportCtr *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetTransportCtr *py_export_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetTransportCtr *py_export_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetTransportCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportCtr);
switch (level) {
{
struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(obj);
PyObject *py_level;
- py_level = PyInt_FromLong(object->level);
+ py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
return py_level;
}
static int py_srvsvc_NetTransportInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->level = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_elapsed;
- py_elapsed = PyInt_FromLong(object->elapsed);
+ py_elapsed = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->elapsed);
return py_elapsed;
}
static int py_srvsvc_NetRemoteTODInfo_set_elapsed(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->elapsed = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->elapsed));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->elapsed = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->elapsed = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_msecs;
- py_msecs = PyInt_FromLong(object->msecs);
+ py_msecs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->msecs);
return py_msecs;
}
static int py_srvsvc_NetRemoteTODInfo_set_msecs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->msecs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->msecs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->msecs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->msecs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_hours;
- py_hours = PyInt_FromLong(object->hours);
+ py_hours = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hours);
return py_hours;
}
static int py_srvsvc_NetRemoteTODInfo_set_hours(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->hours = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hours));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hours = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hours = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_mins;
- py_mins = PyInt_FromLong(object->mins);
+ py_mins = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->mins);
return py_mins;
}
static int py_srvsvc_NetRemoteTODInfo_set_mins(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->mins = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->mins));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->mins = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->mins = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_secs;
- py_secs = PyInt_FromLong(object->secs);
+ py_secs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->secs);
return py_secs;
}
static int py_srvsvc_NetRemoteTODInfo_set_secs(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->secs = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->secs));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->secs = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->secs = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_hunds;
- py_hunds = PyInt_FromLong(object->hunds);
+ py_hunds = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hunds);
return py_hunds;
}
static int py_srvsvc_NetRemoteTODInfo_set_hunds(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->hunds = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hunds));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hunds = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->hunds = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
static int py_srvsvc_NetRemoteTODInfo_set_timezone(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->timezone = PyInt_AsLong(value);
+ {
+ const long long int_max = ndr_sizeof2intmax(sizeof(object->timezone));
+ const long long int_min = -int_max - 1;
+ if (PyLong_Check(value)) {
+ long long test_var;
+ test_var = PyLong_AsLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var < int_min || test_var > int_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range %lld - %lld, got %lld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, int_min, int_max, test_var);
+ return -1;
+ }
+ object->timezone = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < int_min || test_var > int_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range %lld - %lld, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, int_min, int_max, test_var);
+ return -1;
+ }
+ object->timezone = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_tinterval;
- py_tinterval = PyInt_FromLong(object->tinterval);
+ py_tinterval = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->tinterval);
return py_tinterval;
}
static int py_srvsvc_NetRemoteTODInfo_set_tinterval(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->tinterval = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tinterval));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->tinterval = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->tinterval = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_day;
- py_day = PyInt_FromLong(object->day);
+ py_day = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->day);
return py_day;
}
static int py_srvsvc_NetRemoteTODInfo_set_day(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->day = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->day));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->day = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->day = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_month;
- py_month = PyInt_FromLong(object->month);
+ py_month = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->month);
return py_month;
}
static int py_srvsvc_NetRemoteTODInfo_set_month(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->month = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->month));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->month = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->month = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_year;
- py_year = PyInt_FromLong(object->year);
+ py_year = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->year);
return py_year;
}
static int py_srvsvc_NetRemoteTODInfo_set_year(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->year = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->year));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->year = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->year = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
PyObject *py_weekday;
- py_weekday = PyInt_FromLong(object->weekday);
+ py_weekday = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->weekday);
return py_weekday;
}
static int py_srvsvc_NetRemoteTODInfo_set_weekday(PyObject *py_obj, PyObject *value, void *closure)
{
struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
- object->weekday = PyInt_AsLong(value);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weekday));
+ if (PyLong_Check(value)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(value);
+ if (PyErr_Occurred() != NULL) {
+ return -1;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->weekday = test_var;
+ } else if (PyInt_Check(value)) {
+ long test_var;
+ test_var = PyInt_AsLong(value);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return -1;
+ }
+ object->weekday = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return -1;
+ }
+ }
return 0;
}
.tp_new = py_srvsvc_NetRemoteTODInfo_new,
};
-static PyObject *py_import_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportInfo *in)
+PyObject *py_import_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportInfo *in)
{
PyObject *ret;
return NULL;
}
-static union srvsvc_NetTransportInfo *py_export_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
+union srvsvc_NetTransportInfo *py_export_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
union srvsvc_NetTransportInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportInfo);
switch (level) {
return false;
}
r->in.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_info_ctr);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
PyTuple_SetItem(result, 0, py_info_ctr);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_opcode, return false;);
- r->in.opcode = PyInt_AsLong(py_opcode);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.opcode));
+ if (PyLong_Check(py_opcode)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_opcode);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.opcode = test_var;
+ } else if (PyInt_Check(py_opcode)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_opcode);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.opcode = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
return false;
}
r->in.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_info_ctr);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
PyTuple_SetItem(result, 0, py_info_ctr);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
{
union srvsvc_NetCharDevQInfo *info_switch_0;
info_switch_0 = py_export_srvsvc_NetCharDevQInfo(r, r->in.level, py_info);
r->in.parm_error = NULL;
} else {
r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
- PY_CHECK_TYPE(&PyInt_Type, py_parm_error, return false;);
- *r->in.parm_error = PyInt_AsLong(py_parm_error);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
+ if (PyLong_Check(py_parm_error)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_parm_error);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else if (PyInt_Check(py_parm_error)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_parm_error);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
py_parm_error = Py_None;
Py_INCREF(py_parm_error);
} else {
- py_parm_error = PyInt_FromLong(*r->out.parm_error);
+ py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
}
result = py_parm_error;
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
r->in.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_info_ctr);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
PyTuple_SetItem(result, 0, py_info_ctr);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
r->in.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_info_ctr);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
PyTuple_SetItem(result, 0, py_info_ctr);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_fid, return false;);
- r->in.fid = PyInt_AsLong(py_fid);
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
+ if (PyLong_Check(py_fid)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_fid);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.fid = test_var;
+ } else if (PyInt_Check(py_fid)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_fid);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.fid = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_fid, return false;);
- r->in.fid = PyInt_AsLong(py_fid);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
+ if (PyLong_Check(py_fid)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_fid);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.fid = test_var;
+ } else if (PyInt_Check(py_fid)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_fid);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.fid = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
return false;
}
r->in.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_info_ctr);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
PyTuple_SetItem(result, 0, py_info_ctr);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
r->in.info = talloc_ptrtype(r, r->in.info);
{
union srvsvc_NetShareInfo *info_switch_1;
r->in.parm_error = NULL;
} else {
r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
- PY_CHECK_TYPE(&PyInt_Type, py_parm_error, return false;);
- *r->in.parm_error = PyInt_AsLong(py_parm_error);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
+ if (PyLong_Check(py_parm_error)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_parm_error);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else if (PyInt_Check(py_parm_error)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_parm_error);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
py_parm_error = Py_None;
Py_INCREF(py_parm_error);
} else {
- py_parm_error = PyInt_FromLong(*r->out.parm_error);
+ py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
}
result = py_parm_error;
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
PyTuple_SetItem(result, 0, py_info_ctr);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
r->in.info = talloc_ptrtype(r, r->in.info);
{
union srvsvc_NetShareInfo *info_switch_1;
r->in.parm_error = NULL;
} else {
r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
- PY_CHECK_TYPE(&PyInt_Type, py_parm_error, return false;);
- *r->in.parm_error = PyInt_AsLong(py_parm_error);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
+ if (PyLong_Check(py_parm_error)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_parm_error);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else if (PyInt_Check(py_parm_error)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_parm_error);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
py_parm_error = Py_None;
Py_INCREF(py_parm_error);
} else {
- py_parm_error = PyInt_FromLong(*r->out.parm_error);
+ py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
}
result = py_parm_error;
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_reserved, return false;);
- r->in.reserved = PyInt_AsLong(py_reserved);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
+ if (PyLong_Check(py_reserved)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_reserved);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.reserved = test_var;
+ } else if (PyInt_Check(py_reserved)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_reserved);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.reserved = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_reserved, return false;);
- r->in.reserved = PyInt_AsLong(py_reserved);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
+ if (PyLong_Check(py_reserved)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_reserved);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.reserved = test_var;
+ } else if (PyInt_Check(py_reserved)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_reserved);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.reserved = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
{
PyObject *result;
PyObject *py_type;
- py_type = PyInt_FromLong(*r->out.type);
+ py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.type);
result = py_type;
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_SetWERROR(r->out.result);
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
r->in.info = talloc_ptrtype(r, r->in.info);
{
union srvsvc_NetSrvInfo *info_switch_1;
r->in.parm_error = NULL;
} else {
r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
- PY_CHECK_TYPE(&PyInt_Type, py_parm_error, return false;);
- *r->in.parm_error = PyInt_AsLong(py_parm_error);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
+ if (PyLong_Check(py_parm_error)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_parm_error);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else if (PyInt_Check(py_parm_error)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_parm_error);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.parm_error = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
py_parm_error = Py_None;
Py_INCREF(py_parm_error);
} else {
- py_parm_error = PyInt_FromLong(*r->out.parm_error);
+ py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
}
result = py_parm_error;
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
r->in.info = talloc_ptrtype(r, r->in.info);
PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, py_info, return false;);
if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
return false;
}
r->in.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_info);
- PY_CHECK_TYPE(&PyInt_Type, py_maxlen, return false;);
- r->in.maxlen = PyInt_AsLong(py_maxlen);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxlen));
+ if (PyLong_Check(py_maxlen)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_maxlen);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.maxlen = test_var;
+ } else if (PyInt_Check(py_maxlen)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_maxlen);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.maxlen = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, r->out.info, r->out.info);
PyTuple_SetItem(result, 0, py_info);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
- PY_CHECK_TYPE(&PyInt_Type, py_options, return false;);
- r->in.options = PyInt_AsLong(py_options);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.options));
+ if (PyLong_Check(py_options)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_options);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.options = test_var;
+ } else if (PyInt_Check(py_options)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_options);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.options = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
{
union srvsvc_NetTransportInfo *info_switch_0;
info_switch_0 = py_export_srvsvc_NetTransportInfo(r, r->in.level, py_info);
return false;
}
r->in.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_transports);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, r->out.transports, r->out.transports);
PyTuple_SetItem(result, 0, py_transports);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
r->in.info0 = talloc_ptrtype(r, r->in.info0);
PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, py_info0, return false;);
if (talloc_reference(r, pytalloc_get_mem_ctx(py_info0)) == NULL) {
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_servicebits, return false;);
- r->in.servicebits = PyInt_AsLong(py_servicebits);
- PY_CHECK_TYPE(&PyInt_Type, py_updateimmediately, return false;);
- r->in.updateimmediately = PyInt_AsLong(py_updateimmediately);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
+ if (PyLong_Check(py_servicebits)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_servicebits);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.servicebits = test_var;
+ } else if (PyInt_Check(py_servicebits)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_servicebits);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.servicebits = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
+ if (PyLong_Check(py_updateimmediately)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.updateimmediately = test_var;
+ } else if (PyInt_Check(py_updateimmediately)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_updateimmediately);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.updateimmediately = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_pathflags, return false;);
- r->in.pathflags = PyInt_AsLong(py_pathflags);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
+ if (PyLong_Check(py_pathflags)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_pathflags);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathflags = test_var;
+ } else if (PyInt_Check(py_pathflags)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_pathflags);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathflags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
{
PyObject *result;
PyObject *py_pathtype;
- py_pathtype = PyInt_FromLong(*r->out.pathtype);
+ py_pathtype = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.pathtype);
result = py_pathtype;
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_SetWERROR(r->out.result);
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_maxbuf, return false;);
- r->in.maxbuf = PyInt_AsLong(py_maxbuf);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxbuf));
+ if (PyLong_Check(py_maxbuf)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_maxbuf);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.maxbuf = test_var;
+ } else if (PyInt_Check(py_maxbuf)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_maxbuf);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.maxbuf = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (PyUnicode_Check(py_prefix)) {
r->in.prefix = PyString_AS_STRING(PyUnicode_AsEncodedString(py_prefix, "utf-8", "ignore"));
} else if (PyString_Check(py_prefix)) {
return false;
}
r->in.pathtype = talloc_ptrtype(r, r->in.pathtype);
- PY_CHECK_TYPE(&PyInt_Type, py_pathtype, return false;);
- *r->in.pathtype = PyInt_AsLong(py_pathtype);
- PY_CHECK_TYPE(&PyInt_Type, py_pathflags, return false;);
- r->in.pathflags = PyInt_AsLong(py_pathflags);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.pathtype));
+ if (PyLong_Check(py_pathtype)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_pathtype);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.pathtype = test_var;
+ } else if (PyInt_Check(py_pathtype)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_pathtype);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.pathtype = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
+ if (PyLong_Check(py_pathflags)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_pathflags);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathflags = test_var;
+ } else if (PyInt_Check(py_pathflags)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_pathflags);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathflags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
}
{
int can_path_cntr_0;
- for (can_path_cntr_0 = 0; can_path_cntr_0 < r->in.maxbuf; can_path_cntr_0++) {
+ for (can_path_cntr_0 = 0; can_path_cntr_0 < (r->in.maxbuf); can_path_cntr_0++) {
PyObject *py_can_path_0;
- py_can_path_0 = PyInt_FromLong(r->out.can_path[can_path_cntr_0]);
+ py_can_path_0 = PyInt_FromLong((uint16_t)r->out.can_path[can_path_cntr_0]);
PyList_SetItem(py_can_path, can_path_cntr_0, py_can_path_0);
}
}
PyTuple_SetItem(result, 0, py_can_path);
- py_pathtype = PyInt_FromLong(*r->out.pathtype);
+ py_pathtype = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.pathtype);
PyTuple_SetItem(result, 1, py_pathtype);
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_SetWERROR(r->out.result);
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path2)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_pathtype, return false;);
- r->in.pathtype = PyInt_AsLong(py_pathtype);
- PY_CHECK_TYPE(&PyInt_Type, py_pathflags, return false;);
- r->in.pathflags = PyInt_AsLong(py_pathflags);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathtype));
+ if (PyLong_Check(py_pathtype)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_pathtype);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathtype = test_var;
+ } else if (PyInt_Check(py_pathtype)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_pathtype);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathtype = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
+ if (PyLong_Check(py_pathflags)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_pathflags);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathflags = test_var;
+ } else if (PyInt_Check(py_pathflags)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_pathflags);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.pathflags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_name_type, return false;);
- r->in.name_type = PyInt_AsLong(py_name_type);
- PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
- r->in.flags = PyInt_AsLong(py_flags);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
+ if (PyLong_Check(py_name_type)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_name_type);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.name_type = test_var;
+ } else if (PyInt_Check(py_name_type)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_name_type);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.name_type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
+ if (PyLong_Check(py_flags)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_flags);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.flags = test_var;
+ } else if (PyInt_Check(py_flags)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_flags);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.flags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name2)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_name_type, return false;);
- r->in.name_type = PyInt_AsLong(py_name_type);
- PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
- r->in.flags = PyInt_AsLong(py_flags);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
+ if (PyLong_Check(py_name_type)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_name_type);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.name_type = test_var;
+ } else if (PyInt_Check(py_name_type)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_name_type);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.name_type = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
+ if (PyLong_Check(py_flags)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_flags);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.flags = test_var;
+ } else if (PyInt_Check(py_flags)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_flags);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.flags = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
return false;
}
r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
- PY_CHECK_TYPE(&PyInt_Type, py_max_buffer, return false;);
- r->in.max_buffer = PyInt_AsLong(py_max_buffer);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
+ if (PyLong_Check(py_max_buffer)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else if (PyInt_Check(py_max_buffer)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_max_buffer);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.max_buffer = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
if (py_resume_handle == Py_None) {
r->in.resume_handle = NULL;
} else {
r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
- PY_CHECK_TYPE(&PyInt_Type, py_resume_handle, return false;);
- *r->in.resume_handle = PyInt_AsLong(py_resume_handle);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
+ if (PyLong_Check(py_resume_handle)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else if (PyInt_Check(py_resume_handle)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_resume_handle);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ *r->in.resume_handle = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
}
return true;
}
result = PyTuple_New(3);
py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
PyTuple_SetItem(result, 0, py_info_ctr);
- py_totalentries = PyInt_FromLong(*r->out.totalentries);
+ py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
PyTuple_SetItem(result, 1, py_totalentries);
if (r->out.resume_handle == NULL) {
py_resume_handle = Py_None;
Py_INCREF(py_resume_handle);
} else {
- py_resume_handle = PyInt_FromLong(*r->out.resume_handle);
+ py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
}
PyTuple_SetItem(result, 2, py_resume_handle);
if (!W_ERROR_IS_OK(r->out.result)) {
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
return false;
}
- PY_CHECK_TYPE(&PyInt_Type, py_reserved, return false;);
- r->in.reserved = PyInt_AsLong(py_reserved);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
+ if (PyLong_Check(py_reserved)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_reserved);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.reserved = test_var;
+ } else if (PyInt_Check(py_reserved)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_reserved);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.reserved = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
return false;
}
- if (PyLong_Check(py_securityinformation)) {
- r->in.securityinformation = PyLong_AsLongLong(py_securityinformation);
- } else if (PyInt_Check(py_securityinformation)) {
- r->in.securityinformation = PyInt_AsLong(py_securityinformation);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return false;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
+ if (PyLong_Check(py_securityinformation)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.securityinformation = test_var;
+ } else if (PyInt_Check(py_securityinformation)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_securityinformation);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.securityinformation = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
}
return true;
}
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
return false;
}
- if (PyLong_Check(py_securityinformation)) {
- r->in.securityinformation = PyLong_AsLongLong(py_securityinformation);
- } else if (PyInt_Check(py_securityinformation)) {
- r->in.securityinformation = PyInt_AsLong(py_securityinformation);
- } else {
- PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
- PyInt_Type.tp_name, PyLong_Type.tp_name);
- return false;
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
+ if (PyLong_Check(py_securityinformation)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.securityinformation = test_var;
+ } else if (PyInt_Check(py_securityinformation)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_securityinformation);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.securityinformation = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
}
r->in.sd_buf = talloc_ptrtype(r, r->in.sd_buf);
PY_CHECK_TYPE(sec_desc_buf_Type, py_sd_buf, return false;);
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
- r->in.level = PyInt_AsLong(py_level);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
+ if (PyLong_Check(py_level)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_level);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else if (PyInt_Check(py_level)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_level);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.level = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
{
union srvsvc_NetTransportInfo *info_switch_0;
info_switch_0 = py_export_srvsvc_NetTransportInfo(r, r->in.level, py_info);
return false;
}
}
- PY_CHECK_TYPE(&PyInt_Type, py_servicebitsofinterest, return false;);
- r->in.servicebitsofinterest = PyInt_AsLong(py_servicebitsofinterest);
- PY_CHECK_TYPE(&PyInt_Type, py_servicebits, return false;);
- r->in.servicebits = PyInt_AsLong(py_servicebits);
- PY_CHECK_TYPE(&PyInt_Type, py_updateimmediately, return false;);
- r->in.updateimmediately = PyInt_AsLong(py_updateimmediately);
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebitsofinterest));
+ if (PyLong_Check(py_servicebitsofinterest)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_servicebitsofinterest);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.servicebitsofinterest = test_var;
+ } else if (PyInt_Check(py_servicebitsofinterest)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_servicebitsofinterest);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.servicebitsofinterest = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
+ if (PyLong_Check(py_servicebits)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_servicebits);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.servicebits = test_var;
+ } else if (PyInt_Check(py_servicebits)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_servicebits);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.servicebits = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
+ {
+ const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
+ if (PyLong_Check(py_updateimmediately)) {
+ unsigned long long test_var;
+ test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
+ if (PyErr_Occurred() != NULL) {
+ return false;
+ }
+ if (test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.updateimmediately = test_var;
+ } else if (PyInt_Check(py_updateimmediately)) {
+ long test_var;
+ test_var = PyInt_AsLong(py_updateimmediately);
+ if (test_var < 0 || test_var > uint_max) {
+ PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
+ return false;
+ }
+ r->in.updateimmediately = test_var;
+ } else {
+ PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
+ PyInt_Type.tp_name, PyLong_Type.tp_name);
+ return false;
+ }
+ }
return true;
}
if (m == NULL)
return;
- PyModule_AddObject(m, "STYPE_TEMPORARY", PyInt_FromLong(0x40000000));
- PyModule_AddObject(m, "STYPE_HIDDEN", PyInt_FromLong(0x80000000));
- PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_MANUAL_REINT", PyInt_FromLong(0x00000000));
- PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_MASK", PyInt_FromLong(0x00000030));
- PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_SHIFT", PyInt_FromLong(4));
- PyModule_AddObject(m, "STYPE_DISKTREE", PyInt_FromLong(STYPE_DISKTREE));
- PyModule_AddObject(m, "STYPE_DISKTREE_TEMPORARY", PyInt_FromLong(STYPE_DISKTREE_TEMPORARY));
- PyModule_AddObject(m, "STYPE_DISKTREE_HIDDEN", PyInt_FromLong(STYPE_DISKTREE_HIDDEN));
- PyModule_AddObject(m, "STYPE_PRINTQ", PyInt_FromLong(STYPE_PRINTQ));
- PyModule_AddObject(m, "STYPE_PRINTQ_TEMPORARY", PyInt_FromLong(STYPE_PRINTQ_TEMPORARY));
- PyModule_AddObject(m, "STYPE_PRINTQ_HIDDEN", PyInt_FromLong(STYPE_PRINTQ_HIDDEN));
- PyModule_AddObject(m, "STYPE_DEVICE", PyInt_FromLong(STYPE_DEVICE));
- PyModule_AddObject(m, "STYPE_DEVICE_TEMPORARY", PyInt_FromLong(STYPE_DEVICE_TEMPORARY));
- PyModule_AddObject(m, "STYPE_DEVICE_HIDDEN", PyInt_FromLong(STYPE_DEVICE_HIDDEN));
- PyModule_AddObject(m, "STYPE_IPC", PyInt_FromLong(STYPE_IPC));
- PyModule_AddObject(m, "STYPE_IPC_TEMPORARY", PyInt_FromLong(STYPE_IPC_TEMPORARY));
- PyModule_AddObject(m, "STYPE_IPC_HIDDEN", PyInt_FromLong(STYPE_IPC_HIDDEN));
- PyModule_AddObject(m, "SHARE_1005_IN_DFS", PyInt_FromLong(SHARE_1005_IN_DFS));
- PyModule_AddObject(m, "SHARE_1005_DFS_ROOT", PyInt_FromLong(SHARE_1005_DFS_ROOT));
- PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_AUTO_REINT", PyInt_FromLong(SHARE_1005_CSC_CACHE_AUTO_REINT));
- PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_VDO", PyInt_FromLong(SHARE_1005_CSC_CACHE_VDO));
- PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_NONE", PyInt_FromLong(SHARE_1005_CSC_CACHE_NONE));
- PyModule_AddObject(m, "SHARE_1005_RESTRICT_EXCLUSIVE_OPENS", PyInt_FromLong(SHARE_1005_RESTRICT_EXCLUSIVE_OPENS));
- PyModule_AddObject(m, "SHARE_1005_FORCE_SHARED_DELETE", PyInt_FromLong(SHARE_1005_FORCE_SHARED_DELETE));
- PyModule_AddObject(m, "SHARE_1005_ALLOW_NAMESPACE_CACHING", PyInt_FromLong(SHARE_1005_ALLOW_NAMESPACE_CACHING));
- PyModule_AddObject(m, "SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM", PyInt_FromLong(SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM));
- PyModule_AddObject(m, "SHARE_1005_FORCE_LEVELII_OPLOCK", PyInt_FromLong(SHARE_1005_FORCE_LEVELII_OPLOCK));
- PyModule_AddObject(m, "SHARE_1005_ENABLE_HASH", PyInt_FromLong(SHARE_1005_ENABLE_HASH));
- PyModule_AddObject(m, "SHARE_1005_ENABLE_CA", PyInt_FromLong(SHARE_1005_ENABLE_CA));
- PyModule_AddObject(m, "SHARE_1005_ENCRYPT_DATA", PyInt_FromLong(SHARE_1005_ENCRYPT_DATA));
- PyModule_AddObject(m, "PLATFORM_ID_DOS", PyInt_FromLong(PLATFORM_ID_DOS));
- PyModule_AddObject(m, "PLATFORM_ID_OS2", PyInt_FromLong(PLATFORM_ID_OS2));
- PyModule_AddObject(m, "PLATFORM_ID_NT", PyInt_FromLong(PLATFORM_ID_NT));
- PyModule_AddObject(m, "PLATFORM_ID_OSF", PyInt_FromLong(PLATFORM_ID_OSF));
- PyModule_AddObject(m, "PLATFORM_ID_VMS", PyInt_FromLong(PLATFORM_ID_VMS));
+ PyModule_AddObject(m, "STYPE_TEMPORARY", ndr_PyLong_FromUnsignedLongLong(0x40000000));
+ PyModule_AddObject(m, "STYPE_HIDDEN", ndr_PyLong_FromUnsignedLongLong(0x80000000));
+ PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_MANUAL_REINT", ndr_PyLong_FromUnsignedLongLong(0x00000000));
+ PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_MASK", ndr_PyLong_FromUnsignedLongLong(0x00000030));
+ PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_SHIFT", ndr_PyLong_FromUnsignedLongLong(4));
+ PyModule_AddObject(m, "STYPE_DISKTREE", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE));
+ PyModule_AddObject(m, "STYPE_DISKTREE_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE_TEMPORARY));
+ PyModule_AddObject(m, "STYPE_DISKTREE_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE_HIDDEN));
+ PyModule_AddObject(m, "STYPE_PRINTQ", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ));
+ PyModule_AddObject(m, "STYPE_PRINTQ_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ_TEMPORARY));
+ PyModule_AddObject(m, "STYPE_PRINTQ_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ_HIDDEN));
+ PyModule_AddObject(m, "STYPE_DEVICE", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE));
+ PyModule_AddObject(m, "STYPE_DEVICE_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE_TEMPORARY));
+ PyModule_AddObject(m, "STYPE_DEVICE_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE_HIDDEN));
+ PyModule_AddObject(m, "STYPE_IPC", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC));
+ PyModule_AddObject(m, "STYPE_IPC_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC_TEMPORARY));
+ PyModule_AddObject(m, "STYPE_IPC_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC_HIDDEN));
+ PyModule_AddObject(m, "STYPE_CLUSTER_FS", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS));
+ PyModule_AddObject(m, "STYPE_CLUSTER_FS_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS_TEMPORARY));
+ PyModule_AddObject(m, "STYPE_CLUSTER_FS_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS_HIDDEN));
+ PyModule_AddObject(m, "STYPE_CLUSTER_SOFS", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS));
+ PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS_TEMPORARY));
+ PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS_HIDDEN));
+ PyModule_AddObject(m, "STYPE_CLUSTER_DFS", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS));
+ PyModule_AddObject(m, "STYPE_CLUSTER_DFS_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS_TEMPORARY));
+ PyModule_AddObject(m, "STYPE_CLUSTER_DFS_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS_HIDDEN));
+ PyModule_AddObject(m, "SHARE_1005_IN_DFS", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_IN_DFS));
+ PyModule_AddObject(m, "SHARE_1005_DFS_ROOT", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_DFS_ROOT));
+ PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_AUTO_REINT", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_AUTO_REINT));
+ PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_VDO", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_VDO));
+ PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_NONE", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_NONE));
+ PyModule_AddObject(m, "SHARE_1005_RESTRICT_EXCLUSIVE_OPENS", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_RESTRICT_EXCLUSIVE_OPENS));
+ PyModule_AddObject(m, "SHARE_1005_FORCE_SHARED_DELETE", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_FORCE_SHARED_DELETE));
+ PyModule_AddObject(m, "SHARE_1005_ALLOW_NAMESPACE_CACHING", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ALLOW_NAMESPACE_CACHING));
+ PyModule_AddObject(m, "SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM));
+ PyModule_AddObject(m, "SHARE_1005_FORCE_LEVELII_OPLOCK", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_FORCE_LEVELII_OPLOCK));
+ PyModule_AddObject(m, "SHARE_1005_ENABLE_HASH", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENABLE_HASH));
+ PyModule_AddObject(m, "SHARE_1005_ENABLE_CA", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENABLE_CA));
+ PyModule_AddObject(m, "SHARE_1005_ENCRYPT_DATA", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENCRYPT_DATA));
+ PyModule_AddObject(m, "PLATFORM_ID_DOS", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_DOS));
+ PyModule_AddObject(m, "PLATFORM_ID_OS2", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_OS2));
+ PyModule_AddObject(m, "PLATFORM_ID_NT", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_NT));
+ PyModule_AddObject(m, "PLATFORM_ID_OSF", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_OSF));
+ PyModule_AddObject(m, "PLATFORM_ID_VMS", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_VMS));
Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
PyModule_AddObject(m, "NetCharDevInfo0", (PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr0_Type);