vendor/tracemonkey/jshash.cpp in johnson-2.0.0.pre0 vs vendor/tracemonkey/jshash.cpp in johnson-2.0.0.pre1

- old
+ new

@@ -1,6 +1,6 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version @@ -38,14 +38,14 @@ * ***** END LICENSE BLOCK ***** */ /* * PR hash table package. */ -#include "jsstddef.h" #include <stdlib.h> #include <string.h> #include "jstypes.h" +#include "jsstdint.h" #include "jsbit.h" #include "jsutil.h" /* Added by JSIFY */ #include "jshash.h" /* Added by JSIFY */ /* Compute the number of buckets in ht */ @@ -71,11 +71,11 @@ } static void DefaultFreeTable(void *pool, void *item, size_t size) { - free(item); + js_free(item); } static JSHashEntry * DefaultAllocEntry(void *pool, const void *key) { @@ -84,11 +84,11 @@ static void DefaultFreeEntry(void *pool, JSHashEntry *he, uintN flag) { if (flag == HT_FREE_ENTRY) - free(he); + js_free(he); } static JSHashAllocOps defaultHashAllocOps = { DefaultAllocTable, DefaultFreeTable, DefaultAllocEntry, DefaultFreeEntry @@ -244,10 +244,10 @@ nold * sizeof oldbuckets[0]); return JS_TRUE; } JS_PUBLIC_API(JSHashEntry *) -JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **hep, +JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **&hep, JSHashNumber keyHash, const void *key, void *value) { uint32 n; JSHashEntry *he;