Changeset 59239b8 for src/libcfa/stdlib
- Timestamp:
- Jan 30, 2017, 12:29:29 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 1e6e231a
- Parents:
- f97b614
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/libcfa/stdlib ¶
rf97b614 r59239b8 29 29 30 30 extern "C" { void * malloc( size_t ); } // use default C routine for void * 31 forall( otype T) T * malloc( void );32 forall( otype T) T * malloc( char fill );33 forall( otype T) T * malloc( T * ptr, size_t size );34 forall( otype T) T * malloc( T * ptr, size_t size, unsigned char fill );31 forall( dtype T | sized(T) ) T * malloc( void ); 32 forall( dtype T | sized(T) ) T * malloc( char fill ); 33 forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size ); 34 forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size, unsigned char fill ); 35 35 extern "C" { void * calloc( size_t nmemb, size_t size ); } // use default C routine for void * 36 forall( otype T) T * calloc( size_t nmemb );36 forall( dtype T | sized(T) ) T * calloc( size_t nmemb ); 37 37 extern "C" { void * realloc( void * ptr, size_t size ); } // use default C routine for void * 38 forall( otype T) T * realloc( T * ptr, size_t size );39 forall( otype T) T * realloc( T * ptr, size_t size, unsigned char fill );38 forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ); 39 forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size, unsigned char fill ); 40 40 41 forall( otype T) T * aligned_alloc( size_t alignment );42 forall( otype T) T * memalign( size_t alignment ); // deprecated43 forall( otype T) int posix_memalign( T ** ptr, size_t alignment );41 forall( dtype T | sized(T) ) T * aligned_alloc( size_t alignment ); 42 forall( dtype T | sized(T) ) T * memalign( size_t alignment ); // deprecated 43 forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t alignment ); 44 44 45 45 extern "C" { … … 48 48 } // extern "C" 49 49 50 forall( otype T, ttype Params| { void ?{}(T *, Params); } ) T * new( Params p );50 forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) T * new( Params p ); 51 51 forall( dtype T | { void ^?{}(T *); } ) void delete( T * ptr ); 52 52
Note: See TracChangeset
for help on using the changeset viewer.