Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Comment out unused private fields (fix compilation error).
[simgrid.git] / include / xbt / module.h
index d2ce7aaea27ac31421f944f9e1b596163140e634..ee9d5481609390c45f45863cb92c745e026f3dcf 100644 (file)
@@ -1,22 +1,28 @@
-/* $Id$ */
-
 /* module - modularize the code                                             */
 
-/* Authors: Martin Quinson                                                  */
-/* Copyright (C) 2004 the Martin Quinson.                                   */
+/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
-   under the terms of the license (GNU LGPL) which comes with this package. */
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef XBT_MODULE_H
+#define XBT_MODULE_H
+
+// avoid deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v337)
+#ifndef XBT_MODULE_H_NO_DEPRECATED_WARNING
+#warning xbt/module.h is deprecated and will be removed in v3.37.
+#endif
+
+#include <simgrid/engine.h>
+#include <xbt/base.h>
 
-#ifndef _XBT_MODULE_H
-#define _XBT_MODULE_H
+SG_BEGIN_DECL
 
-typedef struct xbt_module_ xbt_module_t;
+XBT_ATTRIB_DEPRECATED_v337("Please use simgrid_init(&argc, argv) instead") static void xbt_init(int* argc, char** argv)
+{
+  simgrid_init(argc, argv);
+}
 
-typedef xbt_module_t (*xbt_module_new_fct_t)(int argc, char **argv);
-typedef int (*xbt_module_finalize_fct_t)(void);
+SG_END_DECL
 
-void xbt_init(int *argc,char **argv);
-void xbt_init_defaultlog(int *argc,char **argv, const char *defaultlog);
-void xbt_exit(void);
-#endif /* _XBT_MODULE_H */
+#endif /* XBT_MODULE_H */