tizen 2.4 release
[framework/web/wrt-commons.git] / modules / core / include / dpl / free_deleter.h
old mode 100644 (file)
new mode 100755 (executable)
similarity index 59%
rename from modules_mobile/core/include/dpl/noreturn.h
rename to modules/core/include/dpl/free_deleter.h
index 93845b7..4a09904
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
  *    limitations under the License.
  */
 /*
- * @file        noreturn.h
- * @author      Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
+ * @file        free_deleter.h
+ * @author      Pawel Czajkowski (p.czajkowski@samsung.com)
  * @version     1.0
- * @brief       This file is the implementation file of noreturn
+ * @brief       This file is the implementation file deleter with use std::free()
  */
-#ifndef DPL_NORETURN_H
-#define DPL_NORETURN_H
+#ifndef FREE_DELETER_H
+#define FREE_DELETER_H
 
-#define DPL_NORETURN __attribute__((__noreturn__))
-
-#endif // DPL_NORETURN_H
+#include <cstdlib>
+namespace DPL
+{
+struct free_deleter
+{
+    void operator()(void *p) { std::free(p); }
+};
+}// DPL
+#endif // FREE_DELETER_H