summaryrefslogtreecommitdiffstats
path: root/source/python/py_conv.h
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-03-28 04:14:43 +0000
committerTim Potter <tpot@samba.org>2002-03-28 04:14:43 +0000
commit1e48f872a494228e82fd32c789b3dcea6b014211 (patch)
tree14479b36957f0bba2a4deca2aad8284390f31bed /source/python/py_conv.h
parent9b2777d3bcef92b10cdc43a4c1e90beb48382a17 (diff)
downloadsamba-1e48f872a494228e82fd32c789b3dcea6b014211.tar.gz
samba-1e48f872a494228e82fd32c789b3dcea6b014211.tar.xz
samba-1e48f872a494228e82fd32c789b3dcea6b014211.zip
Aborted experiment to avoid namespace pollution and prototype hell and
moved to 'make proto' based solution.
Diffstat (limited to 'source/python/py_conv.h')
-rw-r--r--source/python/py_conv.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/python/py_conv.h b/source/python/py_conv.h
index 3b1ad8a9b9b..0de2d674de2 100644
--- a/source/python/py_conv.h
+++ b/source/python/py_conv.h
@@ -18,8 +18,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef _PY_SPOOLSS_CONV_H
-#define _PY_SPOOLSS_CONV_H
+#ifndef _PY_CONV_H
+#define _PY_CONV_H
enum pyconv_types { PY_UNISTR, PY_UINT32, PY_UINT16 };
@@ -32,4 +32,9 @@ struct pyconv {
PyObject *from_struct(void *s, struct pyconv *conv);
void to_struct(void *s, PyObject *dict, struct pyconv *conv);
-#endif /* _PY_SPOOLSS_CONV_H */
+/* Another version of offsetof (-: */
+
+#undef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+
+#endif /* _PY_CONV_H */