From 207fc4cffe21b58b7f0447706a903e5f66b8bcd8 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 29 Jun 2018 10:23:52 -0400 Subject: Move SUBTYPE_P into compat_compiler.h --- src/common/util.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/common') diff --git a/src/common/util.h b/src/common/util.h index c59c79c30e..032842d8dc 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -43,18 +43,6 @@ #include "lib/encoding/cstring.h" #include "lib/fs/winlib.h" -/** Macro: yield a pointer to an enclosing structure given a pointer to - * a substructure at offset off. Example: - *
- *   struct base { ... };
- *   struct subtype { int x; struct base b; } x;
- *   struct base *bp = &x.base;
- *   struct *sp = SUBTYPE_P(bp, struct subtype, b);
- * 
- */ -#define SUBTYPE_P(p, subtype, basemember) \ - ((void*) ( ((char*)(p)) - offsetof(subtype, basemember) )) - /* Math functions */ /* String manipulation */ -- cgit v1.2.3-54-g00ecf