Push down extern handle variable to files that need it
This will make the patching process less invasive as we start to remove this variable from all source files. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
7f98460e37
commit
de36c5fac4
18 changed files with 48 additions and 3 deletions
|
@ -47,6 +47,9 @@
|
||||||
#include "remove.h"
|
#include "remove.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** Add a package to the transaction. */
|
/** Add a package to the transaction. */
|
||||||
int SYMEXPORT alpm_add_pkg(pmpkg_t *pkg)
|
int SYMEXPORT alpm_add_pkg(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
/* Globals */
|
/* Globals */
|
||||||
enum _pmerrno_t pm_errno SYMEXPORT;
|
enum _pmerrno_t pm_errno SYMEXPORT;
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** \addtogroup alpm_interface Interface Functions
|
/** \addtogroup alpm_interface Interface Functions
|
||||||
* @brief Functions to initialize and release libalpm
|
* @brief Functions to initialize and release libalpm
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
#include "deps.h"
|
#include "deps.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
#define LAZY_LOAD(info, errret) \
|
#define LAZY_LOAD(info, errret) \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -36,6 +36,9 @@
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
#include "deps.h" /* _alpm_splitdep */
|
#include "deps.h" /* _alpm_splitdep */
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a package changelog for reading. Similar to fopen in functionality,
|
* Open a package changelog for reading. Similar to fopen in functionality,
|
||||||
* except that the returned 'file stream' is from an archive.
|
* except that the returned 'file stream' is from an archive.
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
#include "deps.h"
|
#include "deps.h"
|
||||||
#include "dload.h"
|
#include "dload.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** Update a package database
|
/** Update a package database
|
||||||
*
|
*
|
||||||
* An update of the package database \a db will be attempted. Unless
|
* An update of the package database \a db will be attempted. Unless
|
||||||
|
|
|
@ -40,6 +40,9 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "deps.h"
|
#include "deps.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2,
|
pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2,
|
||||||
const char *reason)
|
const char *reason)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** \addtogroup alpm_databases Database Functions
|
/** \addtogroup alpm_databases Database Functions
|
||||||
* @brief Functions to query and manipulate the database of libalpm
|
* @brief Functions to query and manipulate the database of libalpm
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -36,6 +36,9 @@
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
void _alpm_dep_free(pmdepend_t *dep)
|
void _alpm_dep_free(pmdepend_t *dep)
|
||||||
{
|
{
|
||||||
FREE(dep->name);
|
FREE(dep->name);
|
||||||
|
|
|
@ -51,6 +51,9 @@
|
||||||
#include "trans.h"
|
#include "trans.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
static int mount_point_cmp(const void *p1, const void *p2)
|
static int mount_point_cmp(const void *p1, const void *p2)
|
||||||
{
|
{
|
||||||
const alpm_mountpoint_t *mp1 = p1;
|
const alpm_mountpoint_t *mp1 = p1;
|
||||||
|
|
|
@ -42,6 +42,9 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
#ifdef HAVE_LIBCURL
|
#ifdef HAVE_LIBCURL
|
||||||
static double prevprogress; /* last download amount */
|
static double prevprogress; /* last download amount */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
#include "alpm.h"
|
#include "alpm.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_strerrorlast(void)
|
const char SYMEXPORT *alpm_strerrorlast(void)
|
||||||
{
|
{
|
||||||
return alpm_strerror(pm_errno);
|
return alpm_strerror(pm_errno);
|
||||||
|
|
|
@ -75,9 +75,6 @@ struct __pmhandle_t {
|
||||||
pgp_verify_t sigverify; /* Default signature verification level */
|
pgp_verify_t sigverify; /* Default signature verification level */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* global handle variable */
|
|
||||||
extern pmhandle_t *handle;
|
|
||||||
|
|
||||||
pmhandle_t *_alpm_handle_new(void);
|
pmhandle_t *_alpm_handle_new(void);
|
||||||
void _alpm_handle_free(pmhandle_t *handle);
|
void _alpm_handle_free(pmhandle_t *handle);
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "alpm.h"
|
#include "alpm.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** \addtogroup alpm_log Logging Functions
|
/** \addtogroup alpm_log Logging Functions
|
||||||
* @brief Functions to log using libalpm
|
* @brief Functions to log using libalpm
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
#include "deps.h"
|
#include "deps.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** \addtogroup alpm_packages Package Functions
|
/** \addtogroup alpm_packages Package Functions
|
||||||
* @brief Functions to manipulate libalpm packages
|
* @brief Functions to manipulate libalpm packages
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
#include "deps.h"
|
#include "deps.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
int SYMEXPORT alpm_remove_pkg(pmpkg_t *pkg)
|
int SYMEXPORT alpm_remove_pkg(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
pmtrans_t *trans;
|
pmtrans_t *trans;
|
||||||
|
|
|
@ -50,6 +50,9 @@
|
||||||
#include "diskspace.h"
|
#include "diskspace.h"
|
||||||
#include "signing.h"
|
#include "signing.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** Check for new version of pkg in sync repos
|
/** Check for new version of pkg in sync repos
|
||||||
* (only the first occurrence is considered in sync)
|
* (only the first occurrence is considered in sync)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -43,6 +43,9 @@
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "alpm.h"
|
#include "alpm.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
/** \addtogroup alpm_trans Transaction Functions
|
/** \addtogroup alpm_trans Transaction Functions
|
||||||
* @brief Functions to manipulate libalpm transactions
|
* @brief Functions to manipulate libalpm transactions
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -57,6 +57,9 @@
|
||||||
#include "alpm_list.h"
|
#include "alpm_list.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
|
/* global handle variable */
|
||||||
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
#ifndef HAVE_STRSEP
|
#ifndef HAVE_STRSEP
|
||||||
/* This is a replacement for strsep which is not portable (missing on Solaris).
|
/* This is a replacement for strsep which is not portable (missing on Solaris).
|
||||||
* Copyright (c) 2001 by François Gouget <fgouget_at_codeweavers.com> */
|
* Copyright (c) 2001 by François Gouget <fgouget_at_codeweavers.com> */
|
||||||
|
|
Loading…
Add table
Reference in a new issue