use py_talloc_reference instead of py_talloc_import
authorAndrew Tridgell <tridge@samba.org>
Wed, 1 Jul 2009 04:06:38 +0000 (14:06 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 1 Jul 2009 05:15:37 +0000 (15:15 +1000)
This is one of the few cases where we want the object to be owned by
both the python object and C code

source4/param/pyparam.c

index 8786ab67bb6134cc972b16e152904df8797591e5..979182c6782db21b15bf3b96caf007f1b0f61120 100644 (file)
@@ -43,7 +43,7 @@ PyAPI_DATA(PyTypeObject) PyLoadparmService;
 
 PyObject *PyLoadparmService_FromService(struct loadparm_service *service)
 {
-       return py_talloc_import(&PyLoadparmService, service);
+       return py_talloc_reference(&PyLoadparmService, service);
 }
 
 static PyObject *py_lp_ctx_get_helper(struct loadparm_context *lp_ctx, const char *service_name, const char *param_name)