Changeset 857633 in git
- Timestamp:
- Jan 17, 2022, 12:27:24 PM (2 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 2d5c1931cd9af26341282db39ce50f9e5ae279ff
- Parents:
- d37ac663bc0d1888fc296b3446deb4daed0939a0
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/scanner.cc
rd37ac6 r857633 586 586 EXTERN_VAR int inerror; 587 587 588 #ifndef SING_NDEBUG 589 // this is to shadow the malloc/realloc 590 // used by yy_flex_malloc/yy_flex_realloc 591 // so that we can mark stuff as static 592 static void* my_malloc(size_t size) 593 { 594 void* addr = omAlloc(size); 595 omMarkAsStaticAddr(addr); 596 return addr; 597 } 598 599 static void* my_realloc(void* addr, size_t size) 600 { 601 void* new_addr = omRealloc(addr, size); 602 omMarkAsStaticAddr(new_addr); 603 return new_addr; 604 } 605 #undef malloc 606 #define malloc my_malloc 607 #undef realloc 608 #define realloc my_realloc 609 #else 588 #ifdef HAVE_OMALLOC 610 589 #undef malloc 611 590 #define malloc omAlloc 612 591 #undef realloc 613 592 #define realloc omRealloc 614 #endif615 593 #undef free 616 594 #define free omFree 595 #endif 596 617 597 static char * dupyytext() 618 598 { -
Singular/scanner.ll
rd37ac6 r857633 26 26 extern int inerror; 27 27 28 #ifndef SING_NDEBUG 29 // this is to shadow the malloc/realloc 30 // used by yy_flex_malloc/yy_flex_realloc 31 // so that we can mark stuff as static 32 static void* my_malloc(size_t size) 33 { 34 void* addr = omAlloc(size); 35 omMarkAsStaticAddr(addr); 36 return addr; 37 } 38 39 static void* my_realloc(void* addr, size_t size) 40 { 41 void* new_addr = omRealloc(addr, size); 42 omMarkAsStaticAddr(new_addr); 43 return new_addr; 44 } 45 #undef malloc 46 #define malloc my_malloc 47 #undef realloc 48 #define realloc my_realloc 49 #else 28 #ifdef HAVE_OMALLOC 50 29 #undef malloc 51 30 #define malloc omAlloc 52 31 #undef realloc 53 32 #define realloc omRealloc 54 #endif55 33 #undef free 56 34 #define free omFree 35 #endif 36 57 37 static char * dupyytext() 58 38 {
Note: See TracChangeset
for help on using the changeset viewer.