Skip to content

Commit d643761

Browse files
Merge branch 'master' of https://github.com/TobinCavanaugh/sstr
2 parents 517aaaf + 0c1386c commit d643761

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ for (; i >= 0; i--) {
4141
#include <stdio.h>
4242
#include "sstr.h"
4343

44-
void PrintThing(int x, float y, $ z) {
44+
void *PrintThing(int x, float y, $ z) {
4545
$ str = $from_fmt("%d, %f, %s", x, y, z);
4646

4747
time_t rawtime;
@@ -68,7 +68,9 @@ void PrintThing(int x, float y, $ z) {
6868
int main() {
6969
int i = 1000000;
7070
for (; i >= 0; i--) {
71-
PrintThing(100, .5f, "String");
71+
char * result = PrintThing(100, .5f, "String");
72+
printf("%s\n", result);
73+
free(result);
7274
}
7375
}
7476

0 commit comments

Comments
 (0)