Staging
v0.5.1
https://github.com/python/cpython
Revision 4ef3a23a35a391602202dce10376be9e43588fa6 authored by Anthony Baxter on 30 March 2006, 12:59:11 UTC, committed by Anthony Baxter on 30 March 2006, 12:59:11 UTC
1 parent ecdc0a9
Raw File
Tip revision: 4ef3a23a35a391602202dce10376be9e43588fa6 authored by Anthony Baxter on 30 March 2006, 12:59:11 UTC
whitespace normalisation
Tip revision: 4ef3a23
asdl.c
#include "Python.h"
#include "asdl.h"

asdl_seq *
asdl_seq_new(int size, PyArena *arena)
{
	asdl_seq *seq = NULL;
	size_t n = sizeof(asdl_seq) +
			(size ? (sizeof(void *) * (size - 1)) : 0);

    seq = (asdl_seq *)PyArena_Malloc(arena, n);
	if (!seq) {
		PyErr_NoMemory();
		return NULL;
	}
	memset(seq, 0, n);
	seq->size = size;
	return seq;
}
back to top