1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

pyldb: Add warning about pyldb_MessageElement_AsMessageElement()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2016-03-08 10:39:24 +13:00
parent 0dbab0e33e
commit 02de793e01

View File

@ -60,11 +60,18 @@ typedef struct {
} PyLdbModuleObject;
#define pyldb_Module_AsModule(pyobj) ((PyLdbModuleObject *)pyobj)->mod
/*
* NOTE: el (and so the return value of
* pyldb_MessageElement_AsMessageElement()) may not be a valid talloc
* context, it could be part of an array
*/
typedef struct {
PyObject_HEAD
TALLOC_CTX *mem_ctx;
struct ldb_message_element *el;
} PyLdbMessageElementObject;
#define pyldb_MessageElement_AsMessageElement(pyobj) ((PyLdbMessageElementObject *)pyobj)->el
typedef struct {