HCoop
/
bpt
/
guile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/stable-2.0'
[bpt/guile.git]
/
lib
/
malloca.c
diff --git
a/lib/malloca.c
b/lib/malloca.c
index
eca5598
..
2d4c479
100644
(file)
--- a/
lib/malloca.c
+++ b/
lib/malloca.c
@@
-13,8
+13,7
@@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
@@
-22,6
+21,8
@@
/* Specification. */
#include "malloca.h"
/* Specification. */
#include "malloca.h"
+#include <stdint.h>
+
#include "verify.h"
/* The speed critical point in this file is freea() applied to an alloca()
#include "verify.h"
/* The speed critical point in this file is freea() applied to an alloca()
@@
-85,7
+86,7
@@
mmalloca (size_t n)
((int *) p)[-1] = MAGIC_NUMBER;
/* Enter p into the hash table. */
((int *) p)[-1] = MAGIC_NUMBER;
/* Enter p into the hash table. */
- slot = (u
nsigned long
) p % HASH_TABLE_SIZE;
+ slot = (u
intptr_t
) p % HASH_TABLE_SIZE;
((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
mmalloca_results[slot] = p;
((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
mmalloca_results[slot] = p;
@@
-118,7
+119,7
@@
freea (void *p)
{
/* Looks like a mmalloca() result. To see whether it really is one,
perform a lookup in the hash table. */
{
/* Looks like a mmalloca() result. To see whether it really is one,
perform a lookup in the hash table. */
- size_t slot = (u
nsigned long
) p % HASH_TABLE_SIZE;
+ size_t slot = (u
intptr_t
) p % HASH_TABLE_SIZE;
void **chain = &mmalloca_results[slot];
for (; *chain != NULL;)
{
void **chain = &mmalloca_results[slot];
for (; *chain != NULL;)
{