/[pcre]/code/branches/pcre16/sljit/sljitConfigInternal.h
ViewVC logotype

Diff of /code/branches/pcre16/sljit/sljitConfigInternal.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 704 by zherczeg, Wed Sep 21 12:35:36 2011 UTC revision 740 by zherczeg, Mon Oct 31 06:10:14 2011 UTC
# Line 129  Line 129 
129    
130  /* General allocation. */  /* General allocation. */
131  #define SLJIT_MALLOC(size) malloc(size)  #define SLJIT_MALLOC(size) malloc(size)
132    #define SLJIT_MALLOC_ZEROED(size) calloc((size), 1)
133  #define SLJIT_FREE(ptr) free(ptr)  #define SLJIT_FREE(ptr) free(ptr)
134  #define SLJIT_MEMMOVE(dest, src, len) memmove(dest, src, len)  #define SLJIT_MEMMOVE(dest, src, len) memmove(dest, src, len)
135    
# Line 161  Line 162 
162  #define SLJIT_UNUSED_ARG(arg) (void)arg  #define SLJIT_UNUSED_ARG(arg) (void)arg
163  #endif  #endif
164    
165    #if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
166    /* Static ABI functions. For all-in-one programs. */
167    
168    #if defined(__GNUC__)
169    /* Disable unused warnings in gcc. */
170    #define SLJIT_API_FUNC_ATTRIBUTE static __attribute__((unused))
171    #else
172    #define SLJIT_API_FUNC_ATTRIBUTE static
173    #endif
174    
175    #else
176    #define SLJIT_API_FUNC_ATTRIBUTE
177    #endif /* (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC) */
178    
179  #ifndef SLJIT_CACHE_FLUSH  #ifndef SLJIT_CACHE_FLUSH
180    
181  #if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) && !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)  #if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) && !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
# Line 332  void sljit_free_exec(void* ptr); Line 347  void sljit_free_exec(void* ptr);
347  /* Feel free to redefine these two macros. */  /* Feel free to redefine these two macros. */
348  #ifndef SLJIT_ASSERT  #ifndef SLJIT_ASSERT
349    
350    #define SLJIT_HALT_PROCESS() \
351            *((int*)0) = 0
352    
353  #define SLJIT_ASSERT(x) \  #define SLJIT_ASSERT(x) \
354          do { \          do { \
355                  if (SLJIT_UNLIKELY(!(x))) { \                  if (SLJIT_UNLIKELY(!(x))) { \
356                          printf("Assertion failed at " __FILE__ ":%d\n", __LINE__); \                          printf("Assertion failed at " __FILE__ ":%d\n", __LINE__); \
357                          *((int*)0) = 0; \                          SLJIT_HALT_PROCESS(); \
358                  } \                  } \
359          } while (0)          } while (0)
360    
# Line 347  void sljit_free_exec(void* ptr); Line 365  void sljit_free_exec(void* ptr);
365  #define SLJIT_ASSERT_STOP() \  #define SLJIT_ASSERT_STOP() \
366          do { \          do { \
367                  printf("Should never been reached " __FILE__ ":%d\n", __LINE__); \                  printf("Should never been reached " __FILE__ ":%d\n", __LINE__); \
368                  *((int*)0) = 0; \                  SLJIT_HALT_PROCESS(); \
369          } while (0)          } while (0)
370    
371  #endif /* !SLJIT_ASSERT_STOP */  #endif /* !SLJIT_ASSERT_STOP */
# Line 364  void sljit_free_exec(void* ptr); Line 382  void sljit_free_exec(void* ptr);
382    
383  #endif /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */  #endif /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
384    
385    #ifndef SLJIT_COMPILE_ASSERT
386    
387    /* Should be improved eventually. */
388    #define SLJIT_COMPILE_ASSERT(x, description) \
389            SLJIT_ASSERT(x)
390    
391    #endif /* !SLJIT_COMPILE_ASSERT */
392    
393  #endif  #endif

Legend:
Removed from v.704  
changed lines
  Added in v.740

  ViewVC Help
Powered by ViewVC 1.1.5