Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-demo-http-get-json
Diff: data/HTTPiCal.cpp
- Revision:
- 41:37e7df011c1f
- Parent:
- 40:bcb19f8dbba3
- Child:
- 42:ab259a9d1d36
diff -r bcb19f8dbba3 -r 37e7df011c1f data/HTTPiCal.cpp --- a/data/HTTPiCal.cpp Tue Mar 14 02:59:32 2017 +0000 +++ b/data/HTTPiCal.cpp Sun Apr 16 20:55:07 2017 +0000 @@ -1,5 +1,11 @@ #include "HTTPiCal.h" +#include "Utility.h" // private memory manager +#ifndef UTILITY_H +#define swMalloc malloc // use the standard +#define swFree free +#endif + //#define DEBUG "iCal" #include <cstdio> #if (defined(DEBUG) && !defined(TARGET_LPC11U24)) @@ -15,7 +21,7 @@ #endif HTTPiCal::HTTPiCal(int count) { - EventList = (Event_T *)malloc(count * sizeof(Event_T)); + EventList = (Event_T *)swMalloc(count * sizeof(Event_T)); if (EventList) { EventSpaceCount = count; EventCount = 0; @@ -27,7 +33,7 @@ HTTPiCal::~HTTPiCal() { if (EventList) - free(EventList); + swFree(EventList); } void HTTPiCal::SetTimeWindow(time_t StartTime, time_t EndTime) {