Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/talloc/pytalloc.h

    r740 r988  
    1818*/
    1919
    20 #ifndef _PY_TALLOC_H_
    21 #define _PY_TALLOC_H_
     20#ifndef _PYTALLOC_H_
     21#define _PYTALLOC_H_
    2222
    2323#include <Python.h>
     
    2727        PyObject_HEAD
    2828        TALLOC_CTX *talloc_ctx;
    29         void *ptr;
    30 } py_talloc_Object;
     29        void *ptr; /* eg the array element */
     30} pytalloc_Object;
    3131
    32 PyTypeObject *PyTalloc_GetObjectType(void);
    33 int PyTalloc_Check(PyObject *);
     32/* Return the PyTypeObject for pytalloc_Object. Returns a new reference. */
     33PyTypeObject *pytalloc_GetObjectType(void);
    3434
    35 /* Retrieve the pointer for a py_talloc_object. Like talloc_get_type()
    36  * but for py_talloc_Objects. */
     35/* Return the PyTypeObject for pytalloc_BaseObject. Returns a new reference. */
     36PyTypeObject *pytalloc_GetBaseObjectType(void);
    3737
    38 /* FIXME: Call PyErr_SetString(PyExc_TypeError, "expected " __STR(type) ")
    39  * when talloc_get_type() returns NULL. */
    40 #define py_talloc_get_type(py_obj, type) (talloc_get_type(py_talloc_get_ptr(py_obj), type))
     38/* Check whether a specific object is a talloc Object. */
     39int pytalloc_Check(PyObject *);
    4140
    42 #define py_talloc_get_ptr(py_obj) (((py_talloc_Object *)py_obj)->ptr)
    43 #define py_talloc_get_mem_ctx(py_obj)  ((py_talloc_Object *)py_obj)->talloc_ctx
     41int pytalloc_BaseObject_check(PyObject *);
    4442
    45 PyObject *py_talloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
    46 PyObject *py_talloc_steal(PyTypeObject *py_type, void *ptr);
    47 PyObject *py_talloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
    48 #define py_talloc_reference(py_type, talloc_ptr) py_talloc_reference_ex(py_type, talloc_ptr, talloc_ptr)
     43/* Retrieve the pointer for a pytalloc_object. Like talloc_get_type()
     44 * but for pytalloc_Objects. */
     45void *_pytalloc_get_type(PyObject *py_obj, const char *type_name);
     46#define pytalloc_get_type(py_obj, type) ((type *)_pytalloc_get_type((PyObject *)(py_obj), #type))
    4947
    50 #define py_talloc_new(type, typeobj) py_talloc_steal(typeobj, talloc_zero(NULL, type))
     48void *_pytalloc_get_ptr(PyObject *py_obj);
     49#define pytalloc_get_ptr(py_obj) _pytalloc_get_ptr((PyObject *)(py_obj))
     50TALLOC_CTX *_pytalloc_get_mem_ctx(PyObject *py_obj);
     51#define pytalloc_get_mem_ctx(py_obj) _pytalloc_get_mem_ctx((PyObject *)(py_obj))
    5152
    52 PyObject *PyCObject_FromTallocPtr(void *);
     53PyObject *pytalloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
     54PyObject *pytalloc_steal(PyTypeObject *py_type, void *ptr);
     55PyObject *pytalloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
     56#define pytalloc_reference(py_type, talloc_ptr) pytalloc_reference_ex(py_type, talloc_ptr, talloc_ptr)
    5357
    54 PyObject *PyString_FromString_check_null(const char *ptr);
     58#define pytalloc_new(type, typeobj) pytalloc_steal(typeobj, talloc_zero(NULL, type))
    5559
    56 #endif /* _PY_TALLOC_H_ */
     60#if PY_MAJOR_VERSION < 3
     61PyObject *pytalloc_CObject_FromTallocPtr(void *);
     62#endif
     63
     64size_t pytalloc_BaseObject_size(void);
     65
     66int pytalloc_BaseObject_PyType_Ready(PyTypeObject *type);
     67
     68#endif /* _PYTALLOC_H_ */
Note: See TracChangeset for help on using the changeset viewer.