MCPcopy Create free account
hub / github.com/boostorg/build / object_new_range

Function object_new_range

v2/engine/object.c:250–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248 */
249
250OBJECT * object_new_range( char const * const string, int const size )
251{
252 ++strcount_in;
253
254#ifdef BJAM_NO_MEM_CACHE
255 {
256 struct hash_item * const m = (struct hash_item *)BJAM_MALLOC( sizeof(
257 struct hash_header ) + size + 1 );
258 strtotal += size + 1;
259 memcpy( m->data, string, size );
260 m->data[ size ] = '\0';
261 m->header.magic = OBJECT_MAGIC;
262 return (OBJECT *)m->data;
263 }
264#else
265 if ( !strhash.data )
266 string_set_init( &strhash );
267 return (OBJECT *)string_set_insert( &strhash, string, size );
268#endif
269}
270
271
272/*

Callers 6

canonicWindowsPathFunction · 0.85
object_newFunction · 0.85
function_runFunction · 0.85
file_dirscan_Function · 0.85
file_query_Function · 0.85
regex_splitFunction · 0.85

Calls 2

string_set_initFunction · 0.85
string_set_insertFunction · 0.85

Tested by

no test coverage detected