mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-29 13:57:31 +08:00
Merge pull request #120 from aburks/master
Fixes #118: unity_output_Spy should use the platform-agnostic macros for memory.
This commit is contained in:
@ -7,8 +7,9 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "unity_output_Spy.h"
|
#include "unity_output_Spy.h"
|
||||||
|
#include "unity_fixture.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static int size;
|
static int size;
|
||||||
@ -21,14 +22,14 @@ void UnityOutputCharSpy_Create(int s)
|
|||||||
size = s;
|
size = s;
|
||||||
count = 0;
|
count = 0;
|
||||||
spy_enable = 0;
|
spy_enable = 0;
|
||||||
buffer = malloc(size);
|
buffer = UNITY_FIXTURE_MALLOC(size);
|
||||||
memset(buffer, 0, size);
|
memset(buffer, 0, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnityOutputCharSpy_Destroy(void)
|
void UnityOutputCharSpy_Destroy(void)
|
||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
free(buffer);
|
UNITY_FIXTURE_FREE(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
int UnityOutputCharSpy_OutputChar(int c)
|
int UnityOutputCharSpy_OutputChar(int c)
|
||||||
|
Reference in New Issue
Block a user