aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-11-17 02:17:50 -0800
committerTectu <joel@unormal.org>2012-11-17 02:17:50 -0800
commit2c337b8dc86fbf2990603a51c2414a5f2a9646ec (patch)
tree4d830f4fc2764b2dfa83f5b3b20f6eae4b50fb89 /src
parent1ea82a4d37a86f32d6a4385d86d74edaa0bfb729 (diff)
parentd1836d49fee08eaa08a837e9f6176f3d41fbb735 (diff)
downloaduGFX-2c337b8dc86fbf2990603a51c2414a5f2a9646ec.tar.gz
uGFX-2c337b8dc86fbf2990603a51c2414a5f2a9646ec.tar.bz2
uGFX-2c337b8dc86fbf2990603a51c2414a5f2a9646ec.zip
Merge pull request #21 from inmarket/master
GWIN, gdisp Nokia and SSD1289 updates
Diffstat (limited to 'src')
-rw-r--r--src/gwin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gwin.c b/src/gwin.c
index 344252f9..022f5959 100644
--- a/src/gwin.c
+++ b/src/gwin.c
@@ -58,7 +58,7 @@ static GHandle gwinInit(GWindowObject *gw, coord_t x, coord_t y, coord_t width,
// Allocate the structure if necessary
if (!gw) {
- if (!(gw = (GWindowObject *)malloc(size)))
+ if (!(gw = (GWindowObject *)chHeapAlloc(NULL, size)))
return 0;
gw->flags = GWIN_FLG_DYNAMIC;
} else
@@ -113,7 +113,7 @@ void gwinDestroyWindow(GHandle gh) {
case GW_BUTTON:
if ((gh->flags & GBTN_FLG_ALLOCTXT)) {
gh->flags &= ~GBTN_FLG_ALLOCTXT; // To be sure, to be sure
- free((char *)((GButtonObject *)gh)->txt);
+ chHeapFree((void *)((GButtonObject *)gh)->txt);
}
break;
#endif
@@ -124,7 +124,7 @@ void gwinDestroyWindow(GHandle gh) {
// Clean up the structure
if (gh->flags & GWIN_FLG_DYNAMIC) {
gh->flags = 0; // To be sure, to be sure
- free(gh);
+ chHeapFree((void *)gh);
}
}
@@ -799,7 +799,7 @@ void gwinSetButtonText(GHandle gh, const char *txt, bool_t useAlloc) {
if ((gh->flags & GBTN_FLG_ALLOCTXT)) {
gh->flags &= ~GBTN_FLG_ALLOCTXT;
if (gbw->txt) {
- free((char *)gbw->txt);
+ chHeapFree((void *)gbw->txt);
gbw->txt = "";
}
}
@@ -807,7 +807,7 @@ void gwinSetButtonText(GHandle gh, const char *txt, bool_t useAlloc) {
if (txt && useAlloc) {
char *str;
- if ((str = (char *)malloc(strlen(txt)+1))) {
+ if ((str = (char *)chHeapAlloc(NULL, strlen(txt)+1))) {
gh->flags |= GBTN_FLG_ALLOCTXT;
strcpy(str, txt);
}