]> granicus.if.org Git - python/commitdiff
Add cast to realloc/malloc call to shut up AIX compiler. (Vladimir Marangozov)
authorGuido van Rossum <guido@python.org>
Fri, 31 Oct 1997 20:32:13 +0000 (20:32 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 31 Oct 1997 20:32:13 +0000 (20:32 +0000)
Modules/audioop.c
Objects/frameobject.c

index c6d9df5bcb98f121dfb16ca26bb4e1650c88b634..50a899e511af9b9874c911905492adab3d691a4a 100644 (file)
@@ -998,8 +998,8 @@ audioop_ratecv(self, args)
        inrate /= d;
        outrate /= d;
 
-       prev_i = malloc(nchannels * sizeof(int));
-       cur_i = malloc(nchannels * sizeof(int));
+       prev_i = (int *) malloc(nchannels * sizeof(int));
+       cur_i = (int *) malloc(nchannels * sizeof(int));
        len /= size * nchannels;        /* # of frames */
 
        if (state == Py_None) {
index 295b613fe745a6ca13d94dcf971fd2df8cf4c4b8..03f54dd94747b349a8404f75b372d7337712dbc1 100644 (file)
@@ -182,8 +182,9 @@ PyFrame_New(tstate, code, globals, locals)
                f = free_list;
                free_list = free_list->f_back;
                if (f->f_nlocals + f->f_stacksize < extras) {
-                       f = realloc(f, sizeof(PyFrameObject) +
-                                      extras*sizeof(PyObject *));
+                       f = (PyFrameObject *)
+                               realloc(f, sizeof(PyFrameObject) +
+                                       extras*sizeof(PyObject *));
                        if (f == NULL)
                                return (PyFrameObject *)PyErr_NoMemory();
                }