From e507381de4127c9db0f6d8d3acbe3a727bd5c066 Mon Sep 17 00:00:00 2001 From: Bruno Abinader Date: Tue, 16 Jun 2009 09:19:36 -0400 Subject: [PATCH] Removed unused/duplicated/deprecated includes. Removed unused 'cimport purple' from .pxd files, reduced imports by adding only used includes (on .pyx files), removed deprecated connection.pyx file. Signed-off-by: Bruno Abinader --- account.pyx | 12 +++++++++++- account_cbs.pxd | 2 -- blist_cbs.pxd | 2 -- buddy.pyx | 4 +++- connection.pyx | 27 --------------------------- connection_cbs.pxd | 2 -- conversation.pyx | 2 +- conversation_cbs.pxd | 2 -- notify_cbs.pxd | 2 -- protocol.pyx | 10 +++++++++- proxy.pyx | 3 ++- purple.pyx | 2 -- request_cbs.pxd | 2 -- signal_cbs.pxd | 2 -- 14 files changed, 26 insertions(+), 48 deletions(-) delete mode 100644 connection.pyx diff --git a/account.pyx b/account.pyx index 5935ba9..a33df6c 100644 --- a/account.pyx +++ b/account.pyx @@ -17,7 +17,15 @@ # along with this program. If not, see . # -cimport purple +cimport account +cimport accountopt +cimport blist +cimport plugin +cimport prefs +cimport prpl +cimport savedstatuses +cimport server +cimport status cdef class Account: """ @@ -669,3 +677,5 @@ cdef class Account: return True else: return False + +include "buddy.pyx" diff --git a/account_cbs.pxd b/account_cbs.pxd index 2d8bf68..06cd2ca 100644 --- a/account_cbs.pxd +++ b/account_cbs.pxd @@ -17,8 +17,6 @@ # along with this program. If not, see . # -cimport purple - cdef extern from *: ctypedef char const_char "const char" diff --git a/blist_cbs.pxd b/blist_cbs.pxd index fc587e5..0739b97 100644 --- a/blist_cbs.pxd +++ b/blist_cbs.pxd @@ -17,8 +17,6 @@ # along with this program. If not, see . # -cimport purple - cdef extern from *: ctypedef char const_char "const char" diff --git a/buddy.pyx b/buddy.pyx index a464b37..ce45965 100644 --- a/buddy.pyx +++ b/buddy.pyx @@ -17,7 +17,9 @@ # along with this program. If not, see . # -cimport purple +cimport account +cimport blist +cimport status cdef class Buddy: '''Buddy class diff --git a/connection.pyx b/connection.pyx deleted file mode 100644 index fe9cb75..0000000 --- a/connection.pyx +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia -# -# This file is part of python-purple. -# -# python-purple is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# python-purple is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -cimport purple - -cdef class Connection: - """ Connection class """ - cdef connection.PurpleConnection *__conn - - def __init__(self): - pass diff --git a/connection_cbs.pxd b/connection_cbs.pxd index 501f39e..16576c2 100644 --- a/connection_cbs.pxd +++ b/connection_cbs.pxd @@ -17,8 +17,6 @@ # along with this program. If not, see . # -cimport purple - cdef extern from *: ctypedef char const_char "const char" diff --git a/conversation.pyx b/conversation.pyx index 643d781..665c77a 100644 --- a/conversation.pyx +++ b/conversation.pyx @@ -17,7 +17,7 @@ # along with this program. If not, see . # -cimport purple +cimport conversation cdef class Conversation: """ diff --git a/conversation_cbs.pxd b/conversation_cbs.pxd index 542bfcd..891a785 100644 --- a/conversation_cbs.pxd +++ b/conversation_cbs.pxd @@ -17,8 +17,6 @@ # along with this program. If not, see . # -cimport purple - cdef extern from *: ctypedef char const_char "const char" ctypedef glib.guchar const_guchar "const guchar" diff --git a/notify_cbs.pxd b/notify_cbs.pxd index bdb8da7..fb9f061 100644 --- a/notify_cbs.pxd +++ b/notify_cbs.pxd @@ -17,8 +17,6 @@ # along with this program. If not, see . # -cimport purple - cdef extern from *: ctypedef char const_char "const char" ctypedef int size_t diff --git a/protocol.pyx b/protocol.pyx index 08c1e36..afde2cc 100644 --- a/protocol.pyx +++ b/protocol.pyx @@ -17,7 +17,15 @@ # along with this program. If not, see . # -cimport purple +cimport glib + +cimport accountopt +cimport plugin +cimport prefs +cimport prpl + +cdef extern from *: + ctypedef char const_char "const char" cdef class Protocol: """ diff --git a/proxy.pyx b/proxy.pyx index 13a1bdd..f02cd97 100644 --- a/proxy.pyx +++ b/proxy.pyx @@ -17,7 +17,8 @@ # along with this program. If not, see . # -cimport purple +cimport account +cimport proxy cdef class ProxyInfoType: cdef proxy.PurpleProxyType c_type diff --git a/purple.pyx b/purple.pyx index 24cfe2c..5ff3e77 100644 --- a/purple.pyx +++ b/purple.pyx @@ -439,6 +439,4 @@ include "protocol.pyx" #include "plugin.pyx" include "proxy.pyx" include "account.pyx" -include "buddy.pyx" -#include "connection.pyx" include "conversation.pyx" diff --git a/request_cbs.pxd b/request_cbs.pxd index e45bc24..ca0f661 100644 --- a/request_cbs.pxd +++ b/request_cbs.pxd @@ -17,8 +17,6 @@ # along with this program. If not, see . # -cimport purple - cdef extern from *: ctypedef char const_char "const char" ctypedef int size_t diff --git a/signal_cbs.pxd b/signal_cbs.pxd index 81a064d..9d9a078 100644 --- a/signal_cbs.pxd +++ b/signal_cbs.pxd @@ -17,8 +17,6 @@ # along with this program. If not, see . # -cimport purple - signal_cbs = {} cdef extern from *: -- 1.7.9.5