mirror of
https://github.com/samba-team/samba.git
synced 2025-08-15 13:49:28 +03:00
pyparam: Use talloc.Object.
This commit is contained in:
@ -362,7 +362,6 @@ static PyMappingMethods py_lp_ctx_mapping = {
|
||||
PyTypeObject PyLoadparmContext = {
|
||||
.tp_name = "LoadParm",
|
||||
.tp_basicsize = sizeof(py_talloc_Object),
|
||||
.tp_dealloc = py_talloc_dealloc,
|
||||
.tp_getset = py_lp_ctx_getset,
|
||||
.tp_methods = py_lp_ctx_methods,
|
||||
.tp_new = py_lp_ctx_new,
|
||||
@ -409,7 +408,6 @@ static PyMethodDef py_lp_service_methods[] = {
|
||||
|
||||
PyTypeObject PyLoadparmService = {
|
||||
.tp_name = "LoadparmService",
|
||||
.tp_dealloc = py_talloc_dealloc,
|
||||
.tp_basicsize = sizeof(py_talloc_Object),
|
||||
.tp_methods = py_lp_service_methods,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
@ -429,6 +427,12 @@ static PyMethodDef pyparam_methods[] = {
|
||||
void initparam(void)
|
||||
{
|
||||
PyObject *m;
|
||||
PyTypeObject *talloc_type = PyTalloc_GetObjectType();
|
||||
if (talloc_type == NULL)
|
||||
return;
|
||||
|
||||
PyLoadparmContext.tp_base = talloc_type;
|
||||
PyLoadparmService.tp_base = talloc_type;
|
||||
|
||||
if (PyType_Ready(&PyLoadparmContext) < 0)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user