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

Function object_new_range

src/engine/object.cpp:236–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234 */
235
236OBJECT * object_new_range( char const * const string, int32_t size )
237{
238 ++strcount_in;
239
240#ifdef BJAM_NO_MEM_CACHE
241 {
242 struct hash_item * const m = (struct hash_item *)BJAM_MALLOC( sizeof(
243 struct hash_header ) + size + 1 );
244 strtotal += size + 1;
245 memcpy( m->data, string, size );
246 m->data[ size ] = '\0';
247#ifndef NDEBUG
248 m->header.magic = OBJECT_MAGIC;
249#endif
250 return (OBJECT *)m->data;
251 }
252#else
253 if ( !strhash.data )
254 string_set_init( &strhash );
255 return (OBJECT *)string_set_insert( &strhash, string, size );
256#endif
257}
258
259
260/*

Callers 8

object_newFunction · 0.85
function_runFunction · 0.85
debug_add_breakpointFunction · 0.85
get_breakpoint_by_nameFunction · 0.85
canonicWindowsPathFunction · 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