git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6851
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
#if defined(__GNUC__) || defined(DOXYGEN)
/** @brief Like strdup, but xbt_die() on error */
#if defined(__GNUC__) || defined(DOXYGEN)
/** @brief Like strdup, but xbt_die() on error */
- static XBT_INLINE char *xbt_strdup(const char *s)
+static inline __attribute__((always_inline)) char *xbt_strdup(const char *s)
{
char *res = NULL;
if (s) {
{
char *res = NULL;
if (s) {
/** @brief Like malloc, but xbt_die() on error
@hideinitializer */
/** @brief Like malloc, but xbt_die() on error
@hideinitializer */
-static XBT_INLINE void *xbt_malloc(unsigned int n)
+static inline __attribute__((always_inline)) void *xbt_malloc(unsigned int n)
{
void *res;
/* if (n==0) {
{
void *res;
/* if (n==0) {
/** @brief like malloc, but xbt_die() on error and memset data to 0
@hideinitializer */
/** @brief like malloc, but xbt_die() on error and memset data to 0
@hideinitializer */
-static XBT_INLINE void *xbt_malloc0(unsigned int n)
+static inline __attribute__((always_inline)) void *xbt_malloc0(unsigned int n)
{
void *res;
//if (n==0) xbt_die("calloc(0) is not portable");
{
void *res;
//if (n==0) xbt_die("calloc(0) is not portable");
/** @brief like realloc, but xbt_die() on error
@hideinitializer */
/** @brief like realloc, but xbt_die() on error
@hideinitializer */
-static XBT_INLINE void *xbt_realloc(void *p, unsigned int s)
+static inline __attribute__((always_inline)) void *xbt_realloc(void *p, unsigned int s)
{
void *res = res;
//if (s==0) xbt_die("realloc(0) is not portable");
{
void *res = res;
//if (s==0) xbt_die("realloc(0) is not portable");