FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-07-2011, 09:36 PM
Dan McGee
 
Default Remove global handle variable

Signed-off-by: Dan McGee <dan@archlinux.org>
---
lib/libalpm/alpm.c | 8 --------
lib/libalpm/handle.c | 4 ----
lib/libalpm/log.c | 3 ---
3 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 86b1619..5d475ce 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -34,9 +34,6 @@
#include "log.h"
#include "util.h"

-/* Globals */
-extern pmhandle_t *handle;
-
/** addtogroup alpm_interface Interface Functions
* @brief Functions to initialize and release libalpm
* @{
@@ -86,8 +83,6 @@ pmhandle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath,
myhandle->curl = curl_easy_init();
#endif

- /* TODO temporary until global var removed */
- handle = myhandle;
return myhandle;

cleanup:
@@ -123,9 +118,6 @@ int SYMEXPORT alpm_release(pmhandle_t *myhandle)
}

_alpm_handle_free(myhandle);
- myhandle = NULL;
- /* TODO temporary until global var removed */
- handle = NULL;

#ifdef HAVE_LIBCURL
curl_global_cleanup();
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index c2bad4c..898ce41 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -37,9 +37,6 @@
#include "trans.h"
#include "alpm.h"

-/* global var for handle (private to libalpm) */
-pmhandle_t *handle = NULL;
-
pmhandle_t *_alpm_handle_new()
{
pmhandle_t *handle;
@@ -87,7 +84,6 @@ void _alpm_handle_free(pmhandle_t *handle)
FREELIST(handle->ignorepkg);
FREELIST(handle->ignoregrp);
FREE(handle);
-
}

alpm_cb_log SYMEXPORT alpm_option_get_logcb(pmhandle_t *handle)
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index 34c9762..91bcb82 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -30,9 +30,6 @@
#include "util.h"
#include "alpm.h"

-/* global handle variable */
-extern pmhandle_t *handle;
-
/** addtogroup alpm_log Logging Functions
* @brief Functions to log using libalpm
* @{
--
1.7.5.2
 

Thread Tools




All times are GMT. The time now is 08:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org