[libnet-dbus-perl] 169/335: Add binding for unregister_object_path. Add missing OUTPUT: section

Intrigeri intrigeri at moszumanska.debian.org
Sat Mar 21 01:07:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.

commit bda7f68209c0e192bb6036c0abbaf999eae82c10
Author: Daniel P. Berrange <dan at berrange.com>
Date:   Wed Dec 21 12:08:24 2005 +0000

    Add binding for unregister_object_path. Add missing OUTPUT: section
---
 DBus.xs | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/DBus.xs b/DBus.xs
index 6aea07d..753726e 100644
--- a/DBus.xs
+++ b/DBus.xs
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: DBus.xs,v 1.17 2005/11/21 10:54:48 dan Exp $
+ * $Id: DBus.xs,v 1.18 2005/12/21 12:08:24 dan Exp $
  */
 
 #include "EXTERN.h"
@@ -554,7 +554,24 @@ _register_object_path(con, path, code)
     CODE:
         SvREFCNT_inc(code);
         if (!(dbus_connection_register_object_path(con, path, &_path_callback_vtable, code))) {
-          croak("not enough memory to register object path");
+          croak("failure when registering object path");
+        }
+
+void
+_unregister_object_path(con, path)
+        DBusConnection *con;
+        char *path;
+    PREINIT:
+        SV *code;
+    CODE:
+        if (!(dbus_connection_get_object_path_data(con, path, (void **)&code))) {
+	  croak("failure when getting object path callback data");
+	}
+        if (code != NULL) {
+	  SvREFCNT_dec(code);
+	}
+        if (!(dbus_connection_unregister_object_path(con, path))) {
+          croak("failure when unregistering object path");
         }
 
 void
@@ -624,6 +641,8 @@ dbus_bus_request_name(con, service_name)
           _croak_error(&error);
         }
         RETVAL = reply;
+    OUTPUT:
+        RETVAL
 
 void
 DESTROY(con)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git



More information about the Pkg-perl-cvs-commits mailing list