Kaydet (Commit) 6345ac6d authored tarafından Guido van Rossum's avatar Guido van Rossum

Add cast to realloc/malloc call to shut up AIX compiler. (Vladimir Marangozov)

üst 197346fa
...@@ -998,8 +998,8 @@ audioop_ratecv(self, args) ...@@ -998,8 +998,8 @@ audioop_ratecv(self, args)
inrate /= d; inrate /= d;
outrate /= d; outrate /= d;
prev_i = malloc(nchannels * sizeof(int)); prev_i = (int *) malloc(nchannels * sizeof(int));
cur_i = malloc(nchannels * sizeof(int)); cur_i = (int *) malloc(nchannels * sizeof(int));
len /= size * nchannels; /* # of frames */ len /= size * nchannels; /* # of frames */
if (state == Py_None) { if (state == Py_None) {
......
...@@ -182,8 +182,9 @@ PyFrame_New(tstate, code, globals, locals) ...@@ -182,8 +182,9 @@ PyFrame_New(tstate, code, globals, locals)
f = free_list; f = free_list;
free_list = free_list->f_back; free_list = free_list->f_back;
if (f->f_nlocals + f->f_stacksize < extras) { if (f->f_nlocals + f->f_stacksize < extras) {
f = realloc(f, sizeof(PyFrameObject) + f = (PyFrameObject *)
extras*sizeof(PyObject *)); realloc(f, sizeof(PyFrameObject) +
extras*sizeof(PyObject *));
if (f == NULL) if (f == NULL)
return (PyFrameObject *)PyErr_NoMemory(); return (PyFrameObject *)PyErr_NoMemory();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment