Permalink
Browse files

Remove pkgs perl wrapper and define it in ALPM.xs.

This remove the undocumented _get_pkgcache method.
  • Loading branch information...
1 parent 8402f56 commit 0f0746e9c89b66041b7fc45d88a891f479f79351 @juster committed Jan 24, 2012
Showing with 17 additions and 19 deletions.
  1. +17 −12 ALPM.xs
  2. +0 −7 lib/ALPM/DB.pm
View
29 ALPM.xs
@@ -142,23 +142,16 @@ alpm_db_register_sync(self, sync_name)
# PRIVATE DATABASE METHODS
#-----------------------------------------------------------------
-# Remove PREFIX
-MODULE = ALPM PACKAGE = ALPM::DB PREFIX = alpm_db
-
-PackageList
-alpm_db_get_pkgcache(db)
- ALPM_DB db
+MODULE = ALPM PACKAGE = ALPM::DB PREFIX = alpm_db
# Wrapper for this checks if a transaction is active.
# We have to reverse the arguments because it is a method.
negative_is_error
alpm_db_update(db, force)
- ALPM_DB db
- int force
- CODE:
- RETVAL = alpm_db_update(force, db);
- OUTPUT:
- RETVAL
+ ALPM_DB db
+ int force
+ C_ARGS:
+ force, db
GroupList
alpm_db_get_grpcache(db)
@@ -174,6 +167,18 @@ alpm_db_search(db, needles)
# PUBLIC DATABASE METHODS
#-----------------------------------------------------------------
+MODULE = ALPM PACKAGE = ALPM::DB
+
+void
+pkgs(db)
+ ALPM_DB db
+ PREINIT:
+ alpm_list_t *L, *pkgs;
+ CODE:
+ pkgs = alpm_db_get_pkgcache(db);
+ LIST2STACK(pkgs, c2p_pkg);
+ FREELIST(pkgs);
+
MODULE = ALPM PACKAGE = ALPM::DB PREFIX = alpm_db_
negative_is_error
View
@@ -50,13 +50,6 @@ sub search
return @{ $result };
}
-sub pkgs
-{
- my $self = shift;
-
- return @{ $self->_get_pkgcache() };
-}
-
sub groups
{
my $self = shift;

0 comments on commit 0f0746e

Please sign in to comment.