summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-06-22 12:34:32 +1000
committerAndrew Tridgell <tridge@samba.org>2011-06-22 14:47:07 +1000
commitdd5350b0a87c82be7d0b0d124885ecfd73bb1b5b (patch)
tree5a7c8e440d8ef7512ca35d0a97c113049d65ae71 /source4/lib
parentc4a7908f46e7005f323eeca5fd38ec9e88a54aa9 (diff)
downloadsamba-dd5350b0a87c82be7d0b0d124885ecfd73bb1b5b.tar.gz
samba-dd5350b0a87c82be7d0b0d124885ecfd73bb1b5b.tar.bz2
samba-dd5350b0a87c82be7d0b0d124885ecfd73bb1b5b.zip
ldb: expose syntax oids to python
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/pyldb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index b568bc2ccd..1bcdaabe13 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -3222,4 +3222,14 @@ void initldb(void)
PyModule_AddObject(m, "Control", (PyObject *)&PyLdbControl);
PyModule_AddObject(m, "__version__", PyString_FromString(PACKAGE_VERSION));
+
+#define ADD_LDB_STRING(val) PyModule_AddObject(m, #val, PyString_FromString(val))
+
+ ADD_LDB_STRING(LDB_SYNTAX_DN);
+ ADD_LDB_STRING(LDB_SYNTAX_DN);
+ ADD_LDB_STRING(LDB_SYNTAX_DIRECTORY_STRING);
+ ADD_LDB_STRING(LDB_SYNTAX_INTEGER);
+ ADD_LDB_STRING(LDB_SYNTAX_BOOLEAN);
+ ADD_LDB_STRING(LDB_SYNTAX_OCTET_STRING);
+ ADD_LDB_STRING(LDB_SYNTAX_UTC_TIME);
}