diff options
| author | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
| commit | e0737c56c1e384e05064a0c6e1ac46979371041b (patch) | |
| tree | a0123d694a2d36c43dabdf0a3907392fce11d457 /boost/tools/build/src/engine/object.h | |
| parent | b4aebf2d137b892f53503b13785ecae900062ff7 (diff) | |
New upstream version 2.0.0+repackupstream/2.0.0+repack
Diffstat (limited to 'boost/tools/build/src/engine/object.h')
| -rw-r--r-- | boost/tools/build/src/engine/object.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/boost/tools/build/src/engine/object.h b/boost/tools/build/src/engine/object.h new file mode 100644 index 00000000..cabb9f6f --- /dev/null +++ b/boost/tools/build/src/engine/object.h @@ -0,0 +1,44 @@ +/* + * Copyright 2011 Steven Watanabe + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * object.h - object manipulation routines + */ + +#ifndef BOOST_JAM_OBJECT_H +#define BOOST_JAM_OBJECT_H + +typedef struct _object OBJECT; + +OBJECT * object_new( char const * const ); +OBJECT * object_new_range( char const * const, int const size ); +void object_done( void ); + +#if defined(NDEBUG) && !defined(BJAM_NO_MEM_CACHE) + +struct hash_header +{ + unsigned int hash; + struct hash_item * next; +}; + +#define object_str( obj ) ((char const *)(obj)) +#define object_copy( obj ) (obj) +#define object_free( obj ) ((void)0) +#define object_equal( lhs, rhs ) ((lhs) == (rhs)) +#define object_hash( obj ) (((struct hash_header *)((char *)(obj) - sizeof(struct hash_header)))->hash) + +#else + +char const * object_str ( OBJECT * ); +OBJECT * object_copy ( OBJECT * ); +void object_free ( OBJECT * ); +int object_equal( OBJECT *, OBJECT * ); +unsigned int object_hash ( OBJECT * ); + +#endif + +#endif |
