- callbacks now have a uintptr_t "cbData" parameter (instead of
haphazard void*/uintptr_t, cb/ctx/data)
- resource loading code now more uniformly deals with u8* pointers
instead of void*

allocators: add support for page_aligned_alloc via boost::shared_ptr.
add evil hack to avoid the need for default ctor and ensure alignment in
SingleAllocator
archive: improve Decompressor
compression:
. near complete rewrite (previous code was a poorly factored mess)
. fix bug related to buffer allocation
. no longer provide get_output API (prone to abuse)
. add call to get max. size of output buffer (for preallocation)

This was SVN commit r5370.
This commit is contained in:
janwas
2007-09-25 09:39:20 +00:00
parent 11eafe2401
commit f4adce44bf
39 changed files with 784 additions and 602 deletions
+3 -3
View File
@@ -50,9 +50,9 @@ struct BuildDirEntListState
};
// called for each matching directory entry; add its full pathname to array.
static void BuildDirEntListCB(const char* path, const DirEnt* UNUSED(ent), void* context)
static void BuildDirEntListCB(const char* path, const DirEnt* UNUSED(ent), uintptr_t cbData)
{
BuildDirEntListState* s = (BuildDirEntListState*)context;
BuildDirEntListState* s = (BuildDirEntListState*)cbData;
jsval val = ToJSVal( CStr ( path ) );
// note: <path> is already directory + name!
@@ -105,7 +105,7 @@ JSBool JSI_VFS::BuildDirEntList( JSContext* cx, JSObject* UNUSED(obj), uintN arg
// build array in the callback function
BuildDirEntListState state(cx);
vfs_dir_enum( path, flags, filter, BuildDirEntListCB, &state );
vfs_dir_enum( path, flags, filter, BuildDirEntListCB, (uintptr_t)&state );
*rval = OBJECT_TO_JSVAL( state.filename_array );
return( JS_TRUE );