~ubuntu-branches/ubuntu/trusty/bmagic/trusty

« back to all changes in this revision

Viewing changes to src/bmdef.h

  • Committer: Bazaar Package Importer
  • Author(s): Roberto C. Sanchez
  • Date: 2011-03-03 12:22:16 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20110303122216-qll5migewxnxe3s5
Tags: 3.7.0-1
* New upstream release (Closes: #615929)
* Update to Standards-Version 3.9.1 (no changes)
* Specify Debian source format as '3.0 (quilt)'

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
// aligned and bit 0 is never set. It means we are safe to use it.
68
68
// BM library keeps GAP flag in pointer.
69
69
 
70
 
// Note: this hack is not universally portable so if it does not work
71
 
// in some particular case disable it by defining BM_DISBALE_BIT_IN_PTR
72
 
 
73
 
#ifdef BM_DISBALE_BIT_IN_PTR
74
 
 
75
 
# define BMGAP_PTR(ptr)    ((bm::gap_word_t*)ptr)
76
 
# define BMSET_PTRGAP(ptr) (void(0))
77
 
# define BM_IS_GAP(obj, ptr, idx) ( (obj).is_block_gap(idx) ) 
78
 
 
79
 
#else
 
70
 
80
71
 
81
72
# if ULONG_MAX != 0xffffffff || defined(_WIN64)  // 64-bit
82
73
 
94
85
 
95
86
# define BMGAP_PTR(ptr) ((bm::gap_word_t*)BMPTR_CLEARBIT0(ptr))
96
87
# define BMSET_PTRGAP(ptr) ptr = (bm::word_t*)BMPTR_SETBIT0(ptr)
97
 
# define BM_IS_GAP(obj, ptr, idx) ( BMPTR_TESTBIT0(ptr)!=0 )
98
 
 
99
 
#endif
 
88
# define BM_IS_GAP(ptr) ( BMPTR_TESTBIT0(ptr)!=0 )
 
89
 
 
90
 
100
91
 
101
92
 
102
93