Skip to content

Commit

Permalink
Fix build process again with new file layout
Browse files Browse the repository at this point in the history
  • Loading branch information
robmueller committed Jul 17, 2011
1 parent 5edad7c commit 13b9925
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 60 deletions.
File renamed without changes.
12 changes: 0 additions & 12 deletions Cache/FastMmap/Makefile.PL

This file was deleted.

29 changes: 0 additions & 29 deletions Cache/FastMmap/README

This file was deleted.

24 changes: 11 additions & 13 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
Cache/FastMmap.pm
Cache/FastMmap/CImpl.pm
Cache/FastMmap/CImpl.xs
Cache/FastMmap/Makefile.PL
Cache/FastMmap/mmap_cache.c
Cache/FastMmap/mmap_cache.h
Cache/FastMmap/mmap_cache_internals.h
Cache/FastMmap/mmap_cache_test.c
Cache/FastMmap/OnLeave.pm
Cache/FastMmap/ppport.h
Cache/FastMmap/README
Cache/FastMmap/unix.c
Cache/FastMmap/win32.c
lib/Cache/FastMmap.pm
lib/Cache/FastMmap/CImpl.pm
lib/Cache/FastMmap/OnLeave.pm
CImpl.xs
mmap_cache.c
mmap_cache.h
mmap_cache_internals.h
mmap_cache_test.c
ppport.h
unix.c
win32.c
Changes
Makefile.PL
MANIFEST This list of files
Expand Down
18 changes: 13 additions & 5 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ use ExtUtils::MakeMaker;

WriteMakefile(
'NAME' => 'Cache::FastMmap',
'VERSION_FROM' => 'Cache/FastMmap.pm',
'ABSTRACT_FROM' => 'Cache/FastMmap.pm',
'VERSION_FROM' => 'lib/Cache/FastMmap.pm',
'ABSTRACT_FROM' => 'lib/Cache/FastMmap.pm',
'AUTHOR' => 'Rob Mueller <[email protected]>',
'PREREQ_PM' => {
'Storable' => 0,
},
'DIR' => [
'Cache/FastMmap'
],
'LIBS' => [''],
'INC' => '-I.',
'OBJECT' => 'CImpl.o mmap_cache.o ' . ($^O eq 'MSWin32' ? 'win32.o' : 'unix.o'),
# 'OPTIMIZE' => '-g -DDEBUG -ansi -pedantic',
);

package MY;

sub constants {
$_[0]->{DLBASE} = "CImpl";
$_[0]->{FULLEXT} = "Cache/FastMmap/CImpl";
return shift->SUPER::constants();
}
3 changes: 2 additions & 1 deletion Cache/FastMmap.pm → lib/Cache/FastMmap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ our $VERSION = '1.37';
our %LiveCaches;

use Cache::FastMmap::CImpl;
use Cache::FastMmap::OnLeave;

use constant FC_ISDIRTY => 1;
# }}}
Expand Down Expand Up @@ -1190,7 +1191,7 @@ sub _lock_page {
my $Unlock = Cache::FastMmap::OnLeave->new(sub {
$Cache->fc_unlock() if $Cache->fc_is_locked();
});
$Cache->fc_lock(shift);
$Cache->fc_lock($_[1]);
return $Unlock;
}

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions Cache/FastMmap/mmap_cache.c → mmap_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ int mmc_lock(mmap_cache * cache, MU32 p_cur) {
MU32 p_offset;
void * p_ptr;

/* Argument sanity check */
if (p_cur > cache->c_num_pages)
return -1 + _mmc_set_error(cache, 0, "page %u is larger than number of pages", p_cur);

/* Check not already locked */
if (cache->p_cur != -1)
return -1 + _mmc_set_error(cache, 0, "page %u is already locked, can't lock multiple pages", cache->p_cur);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 13b9925

Please sign in to comment.