projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefileの整理
[YACASL2.git]
/
include
/
cmem.h
diff --git
a/include/cmem.h
b/include/cmem.h
index
a38c81d
..
c670226
100644
(file)
--- a/
include/cmem.h
+++ b/
include/cmem.h
@@
-9,6
+9,13
@@
#define ARRAYSIZE(array) (sizeof(array)/sizeof(array[0]))
#endif
#define ARRAYSIZE(array) (sizeof(array)/sizeof(array[0]))
#endif
+/**
+ * メモリを解放
+ */
+#ifndef FREE
+#define FREE(ptr) {free(ptr); ptr = NULL;}
+#endif
+
/**
* mallocを実行し、0で初期化
* メモリを確保できない場合はエラーを出力して終了
/**
* mallocを実行し、0で初期化
* メモリを確保できない場合はエラーを出力して終了
@@
-26,8
+33,4
@@
void *calloc_chk(size_t nmemb, size_t size, char *tag);
*/
char *strdup_chk(const char *s, char *tag);
*/
char *strdup_chk(const char *s, char *tag);
-/**
- * メモリを解放
- */
-void free_chk(void *ptr, char *tag);
#endif
#endif